51 lines
1.1 KiB
PHP
51 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Modules\Academic\Entities;
|
|
|
|
use CodeIgniter\Entity\Entity;
|
|
|
|
/**
|
|
* Schedule Entity
|
|
*
|
|
* Represents a class schedule in the system.
|
|
*/
|
|
class Schedule extends Entity
|
|
{
|
|
/**
|
|
* Attributes that can be mass assigned
|
|
*
|
|
* @var array<string>
|
|
*/
|
|
protected $allowedFields = [
|
|
'class_id',
|
|
'subject_id',
|
|
'teacher_user_id',
|
|
'teacher_name',
|
|
'lesson_slot_id',
|
|
'day_of_week',
|
|
'start_time',
|
|
'end_time',
|
|
'room',
|
|
'is_active',
|
|
];
|
|
|
|
/**
|
|
* Attributes that should be cast to specific types
|
|
*
|
|
* @var array<string, string>
|
|
*/
|
|
protected $casts = [
|
|
'id' => 'integer',
|
|
'class_id' => 'integer',
|
|
'subject_id' => 'integer',
|
|
'teacher_user_id' => 'integer',
|
|
'lesson_slot_id' => 'integer',
|
|
'day_of_week' => 'integer',
|
|
'is_active' => 'boolean',
|
|
'start_time' => 'string',
|
|
'end_time' => 'string',
|
|
'created_at' => 'datetime',
|
|
'updated_at' => 'datetime',
|
|
];
|
|
}
|