Refactor script

This commit is contained in:
furen81
2026-02-07 04:52:11 +07:00
parent 6e681c4ad3
commit c1ef2df512
20 changed files with 1608 additions and 118 deletions

View File

@ -19,6 +19,8 @@ class Customer extends Model
'longitude',
'city',
'pic_sales_id',
'category', // Added for consistency with Merchant
'agent_id', // Added for ownership
];
/**
@ -28,4 +30,12 @@ class Customer extends Model
{
return $this->belongsTo(User::class, 'pic_sales_id');
}
/**
* Get the agent associated with the customer.
*/
public function agent(): BelongsTo
{
return $this->belongsTo(Agent::class, 'agent_id');
}
}