Files
alrahma_sunday_school_api/app/Models/ManualPayment.php
T
2026-06-08 23:30:22 -04:00

34 lines
740 B
PHP

<?php
namespace App\Models;
class ManualPayment extends BaseModel
{
protected $table = 'manual_payments';
// legacy: useTimestamps = false
public $timestamps = false;
protected $fillable = [
'invoice_number',
'amount',
'payment_method',
'reference',
'proof_path',
'semester',
'school_year',
'created_at',
];
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');
}
}