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
39 lines
1.0 KiB
PHP
39 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class PaymentError extends BaseModel
|
|
{
|
|
protected $table = 'payment_error';
|
|
|
|
// legacy: useTimestamps = false (logged_at managed manually)
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = ['payment_id', 'invoice_id', 'parent_id', 'wrong_paid_amount', 'wrong_payment_method', 'wrong_check_file', 'error_note', 'logged_at', 'logged_by', 'school_year', 'semester'];
|
|
|
|
protected $casts = [
|
|
'payment_id' => 'integer',
|
|
'invoice_id' => 'integer',
|
|
'parent_id' => 'integer',
|
|
'wrong_paid_amount' => 'decimal:2', // adjust precision if needed
|
|
'logged_by' => 'integer',
|
|
'logged_at' => 'datetime',
|
|
];
|
|
|
|
/* Optional relationships */
|
|
public function invoice()
|
|
{
|
|
return $this->belongsTo(Invoice::class, 'invoice_id');
|
|
}
|
|
|
|
public function parent()
|
|
{
|
|
return $this->belongsTo(User::class, 'parent_id');
|
|
}
|
|
|
|
public function logger()
|
|
{
|
|
return $this->belongsTo(User::class, 'logged_by');
|
|
}
|
|
}
|