-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refactor seeders, factories and model names
- Loading branch information
1 parent
28396d2
commit 89af6ce
Showing
51 changed files
with
635 additions
and
524 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use App\Relations\Belongs\BelongsToClient; | ||
use App\Relations\Belongs\BelongsToEmployee; | ||
use App\Relations\Has\HasManyDeals; | ||
use App\Relations\Has\HasManyFinances; | ||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Eloquent\SoftDeletes; | ||
|
||
class Company extends Model | ||
{ | ||
use HasFactory, SoftDeletes, BelongsToClient, HasManyDeals, HasManyFinances, BelongsToEmployee; | ||
|
||
protected $fillable = ['name', 'tax_number', 'phone', 'city', 'billing_address', 'country', 'postal_code', | ||
'employees_size', 'fax', 'description', 'client_id', 'created_at', 'is_active', 'admin_id' | ||
]; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use App\Relations\Belongs\BelongsToCompany; | ||
use App\Relations\Has\HasManyDealTerms; | ||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Eloquent\SoftDeletes; | ||
|
||
class Deal extends Model | ||
{ | ||
use HasFactory, SoftDeletes, BelongsToCompany, HasManyDealTerms; | ||
|
||
protected $fillable = ['name', 'start_time', 'end_time', 'company_id', 'is_active', 'admin_id']; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Eloquent\SoftDeletes; | ||
|
||
class DealTerm extends Model | ||
{ | ||
use HasFactory, SoftDeletes; | ||
|
||
protected $fillable = ['body', 'deal_id']; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use App\Relations\Belongs\BelongsToClient; | ||
use App\Relations\Belongs\BelongsToDeal; | ||
use App\Relations\Has\HasManyCompanies; | ||
use App\Relations\Has\HasManyTasks; | ||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Eloquent\SoftDeletes; | ||
|
||
class Employee extends Model | ||
{ | ||
use HasFactory, SoftDeletes, HasManyCompanies, BelongsToDeal, BelongsToClient, HasManyTasks; | ||
|
||
protected $fillable = ['full_name', 'email', 'phone', 'client_id', 'is_active', 'job', 'note', 'admin_id', 'created_at', | ||
'updated_at', 'deleted_at' | ||
]; | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use App\Relations\Belongs\BelongsToCompany; | ||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Eloquent\SoftDeletes; | ||
|
||
class Finance extends Model | ||
{ | ||
use HasFactory, SoftDeletes, BelongsToCompany; | ||
|
||
protected $fillable = ['name', 'company_id', 'gross', 'net', 'vat', 'description', 'category', 'type', 'date', | ||
'is_active', 'created_at', 'updated_at' ]; | ||
|
||
protected $casts = [ | ||
'date' => 'datetime', | ||
]; | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use App\Relations\Belongs\BelongsToProduct; | ||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Eloquent\SoftDeletes; | ||
|
||
class Sale extends Model | ||
{ | ||
use HasFactory, SoftDeletes, BelongsToProduct; | ||
|
||
protected $fillable = ['name', 'quantity', 'price', 'date_of_payment', 'product_id', 'is_active', 'admin_id']; | ||
|
||
protected $casts = [ | ||
'date_of_payment' => 'datetime' | ||
]; | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class Setting extends Model | ||
{ | ||
use HasFactory; | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.