-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor model factories for better clarity
- Loading branch information
Showing
7 changed files
with
6 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
namespace App\Models; | ||
|
||
use Carbon\Carbon; | ||
use Database\Factories\DatahubPriceListFactory; | ||
use Illuminate\Database\Eloquent\Builder; | ||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\SoftDeletes; | ||
|
@@ -50,6 +51,7 @@ | |
*/ | ||
class DatahubPriceList extends BaseModel | ||
{ | ||
/** @use HasFactory<DatahubPriceListFactory> */ | ||
use HasFactory; | ||
Check failure on line 55 in app/Models/DatahubPriceList.php GitHub Actions / build-test
|
||
use SoftDeletes; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
use App\Casts\CopenhagenDate; | ||
use App\Enums\SourceEnum; | ||
use Carbon\Carbon; | ||
use Database\Factories\MeteringPointFactory; | ||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Relations\BelongsTo; | ||
|
||
|
@@ -40,6 +41,7 @@ | |
*/ | ||
class MeteringPoint extends BaseModel | ||
{ | ||
/** @use HasFactory<MeteringPointFactory> */ | ||
use HasFactory; | ||
Check failure on line 45 in app/Models/MeteringPoint.php GitHub Actions / build-test
|
||
|
||
protected $appends = ['source']; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
namespace App\Models; | ||
|
||
use Carbon\Carbon; | ||
use Database\Factories\UserFactory; | ||
use Illuminate\Contracts\Auth\MustVerifyEmail; | ||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Relations\HasMany; | ||
|
@@ -26,6 +27,7 @@ | |
*/ | ||
class User extends Authenticatable implements MustVerifyEmail | ||
{ | ||
/** @use HasFactory<UserFactory> */ | ||
use HasApiTokens, HasFactory, Notifiable; | ||
Check failure on line 31 in app/Models/User.php GitHub Actions / build-test
|
||
|
||
/** | ||
|