Đóng gói cuối tuần

This commit is contained in:
2026-04-18 04:46:01 +00:00
parent 761b34916b
commit 3cef1c40df
37 changed files with 1266 additions and 301 deletions

30
app/Models/Payment.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Payment extends Model
{
use HasUuids, HasFactory;
protected $guarded = [];
protected $casts = [
'amount' => 'decimal:2',
'paid_date' => 'date',
'metadata' => 'array',
];
public function contract()
{
return $this->belongsTo(Contract::class);
}
public function scheduleItem()
{
return $this->belongsTo(PaymentScheduleItem::class, 'schedule_item_id');
}
}