Files
minicrm/app/Models/Handover.php
phuongtc fc9158b928
Some checks failed
Tests / PHP 8.3 (push) Has been cancelled
Tests / PHP 8.4 (push) Has been cancelled
Tests / PHP 8.5 (push) Has been cancelled
Refactor: Enforce type safety, fix close deadlock, implement assignee restrictions and notify admin fallbacks
2026-05-20 10:42:30 +00:00

31 lines
694 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use App\Enums\HandoverStatus;
#[Fillable(['product_id', 'customer_id', 'handover_date', 'status', 'remark'])]
class Handover extends Model
{
protected function casts(): array
{
return [
'status' => HandoverStatus::class,
'handover_date' => 'date',
];
}
public function product(): BelongsTo
{
return $this->belongsTo(Product::class);
}
public function customer(): BelongsTo
{
return $this->belongsTo(Customer::class);
}
}