46 lines
969 B
PHP
46 lines
969 B
PHP
<?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();
|
|
}
|
|
}
|