File: /www/wwwroot/erp.nhatnamsst.com/domains/Customer/Models/CustomerContact.php
<?php
namespace Domains\Customer\Models;
use Domains\Core\Traits\ModelTrait;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class CustomerContact extends Model
{
use HasFactory, ModelTrait;
protected $fillable = [
'customer_id',
'fullname',
'phone',
'account_number',
'bank',
'position',
'status',
];
protected function casts(): array
{
return [
'status' => 'boolean',
];
}
/**
* Get the customer that owns this contact
*/
public function customer(): BelongsTo
{
return $this->belongsTo(Customer::class);
}
}