nang cap san sang import

This commit is contained in:
2026-05-01 04:33:00 +00:00
parent 6c74c17b48
commit 6ef2e9fe4e
93 changed files with 6542 additions and 12 deletions

27
app/Models/Contract.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
#[Fillable(['product_id', 'customer_id', 'type', 'start_date', 'end_date', 'status', 'printed_at', 'signed_status'])]
class Contract extends Model
{
public function product(): BelongsTo
{
return $this->belongsTo(Product::class);
}
public function customer(): BelongsTo
{
return $this->belongsTo(Customer::class);
}
public function feedbacks(): HasMany
{
return $this->hasMany(Feedback::class);
}
}