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
32 lines
814 B
PHP
32 lines
814 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class InvoiceStudentList extends BaseModel
|
|
{
|
|
protected $table = 'invoice_students_list';
|
|
|
|
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
|
public $timestamps = true;
|
|
|
|
protected $fillable = ['invoice_id', 'student_id', 'student_firstname', 'student_lastname', 'school_id', 'enrolled', 'school_year', 'created_at', 'updated_at', 'semester'];
|
|
|
|
protected $casts = [
|
|
'invoice_id' => 'integer',
|
|
'student_id' => 'integer',
|
|
'school_id' => 'integer',
|
|
'enrolled' => 'boolean',
|
|
];
|
|
|
|
/* Optional relationships */
|
|
public function invoice()
|
|
{
|
|
return $this->belongsTo(Invoice::class, 'invoice_id');
|
|
}
|
|
|
|
public function student()
|
|
{
|
|
return $this->belongsTo(Student::class, 'student_id');
|
|
}
|
|
}
|