first change
This commit is contained in:
45
Modules/Client/app/Models/Client.php
Normal file
45
Modules/Client/app/Models/Client.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Client\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Client\Database\Factories\ClientFactory;
|
||||
use Modules\Product\Models\Product;
|
||||
use Modules\User\Traits\HasActivityLogs;
|
||||
|
||||
class Client extends Model
|
||||
{
|
||||
use HasFactory, HasActivityLogs;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'company_name',
|
||||
'contact',
|
||||
'logo',
|
||||
'manager_name',
|
||||
'manager_contact',
|
||||
'poc_name',
|
||||
'poc_contact',
|
||||
'promised_document',
|
||||
'poc_document',
|
||||
'description',
|
||||
'status',
|
||||
'order',
|
||||
'createdby',
|
||||
'updatedby',
|
||||
];
|
||||
|
||||
public function products()
|
||||
{
|
||||
return $this->hasMany(Product::class, 'client_id');
|
||||
}
|
||||
|
||||
protected static function newFactory(): ClientFactory
|
||||
{
|
||||
return ClientFactory::new();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user