Files
alrahma_sunday_school_api/app/Models/PaymentError.php
T
root 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
fix unittests issues
2026-07-07 20:56:32 -04:00

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');
}
}