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
31 lines
772 B
PHP
31 lines
772 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class InvoiceEvent extends BaseModel
|
|
{
|
|
protected $table = 'invoice_event';
|
|
|
|
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
|
public $timestamps = true;
|
|
|
|
protected $fillable = ['invoice_id', 'event_name', 'description', 'amount', 'semester', 'school_year', 'updated_by', 'created_at', 'updated_at'];
|
|
|
|
protected $casts = [
|
|
'invoice_id' => 'integer',
|
|
'amount' => 'decimal:2', // adjust precision if needed
|
|
'updated_by' => 'integer',
|
|
];
|
|
|
|
/* Optional relationships */
|
|
public function invoice()
|
|
{
|
|
return $this->belongsTo(Invoice::class, 'invoice_id');
|
|
}
|
|
|
|
public function updatedByUser()
|
|
{
|
|
return $this->belongsTo(User::class, 'updated_by');
|
|
}
|
|
}
|