reconstruction of the project

This commit is contained in:
root
2026-03-08 16:33:24 -04:00
parent 23b7db1107
commit c8de5f7edc
9157 changed files with 77877 additions and 1073823 deletions
+20 -14
View File
@@ -6,11 +6,11 @@ use App\Models\BaseModel;
class InvoiceStudentList extends BaseModel
{
// Specify the table name
protected $table = 'invoice_students_list'; // Primary key for the table
protected $primaryKey = 'id';
protected $table = 'invoice_students_list';
// ✅ CI: useTimestamps = true (created_at/updated_at)
public $timestamps = true;
// Specify which fields are allowed for mass assignment
protected $fillable = [
'invoice_id',
'student_id',
@@ -24,15 +24,21 @@ class InvoiceStudentList extends BaseModel
'semester',
];
// Enable auto-incrementing primary key
protected $useAutoIncrement = true;
protected $casts = [
'invoice_id' => 'integer',
'student_id' => 'integer',
'school_id' => 'integer',
'enrolled' => 'boolean',
];
// Specify return type as an array
/* Optional relationships */
public function invoice()
{
return $this->belongsTo(Invoice::class, 'invoice_id');
}
// Automatically set `created_at` and `updated_at` fields
public $timestamps = true;
// Specify the names of the timestamp fields
const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at';
}
public function student()
{
return $this->belongsTo(Student::class, 'student_id');
}
}