Files
alrahma_sunday_school_api/app/Models/InvoiceStudentList.php
T
2026-06-08 23:30:22 -04:00

43 lines
901 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',
'semester',
'created_at',
'updated_at',
];
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');
}
}