e13df69885
API CI/CD / Validate (composer + pint) (push) Successful in 3m6s
API CI/CD / Test (PHPUnit) (push) Failing after 4m53s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Security audit (push) Failing after 59s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
25 lines
688 B
PHP
25 lines
688 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', 'discount_number', 'proof_path', 'created_at', 'school_year', 'semester'];
|
|
|
|
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');
|
|
}
|
|
}
|