reconstruction of the project
This commit is contained in:
@@ -7,6 +7,10 @@ use App\Models\BaseModel;
|
||||
class ManualPayment extends BaseModel
|
||||
{
|
||||
protected $table = 'manual_payments';
|
||||
|
||||
// CI: useTimestamps = false
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'invoice_number',
|
||||
'amount',
|
||||
@@ -18,5 +22,15 @@ class ManualPayment extends BaseModel
|
||||
'school_year',
|
||||
'semester',
|
||||
];
|
||||
public $timestamps = false;
|
||||
}
|
||||
|
||||
protected $casts = [
|
||||
'amount' => 'decimal:2', // adjust precision if needed
|
||||
'created_at' => 'datetime',
|
||||
];
|
||||
|
||||
/* Optional relationship if invoice_number maps to invoices.invoice_number */
|
||||
public function invoice()
|
||||
{
|
||||
return $this->belongsTo(Invoice::class, 'invoice_number', 'invoice_number');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user