38 lines
698 B
PHP
38 lines
698 B
PHP
<?php
|
|
|
|
namespace App\Modules\Academic\Entities;
|
|
|
|
use CodeIgniter\Entity\Entity;
|
|
|
|
/**
|
|
* Class Entity
|
|
*
|
|
* Represents a class/kelas in the system.
|
|
*/
|
|
class ClassEntity extends Entity
|
|
{
|
|
/**
|
|
* Attributes that can be mass assigned
|
|
*
|
|
* @var array<string>
|
|
*/
|
|
protected $allowedFields = [
|
|
'name',
|
|
'grade',
|
|
'major',
|
|
'wali_user_id',
|
|
];
|
|
|
|
/**
|
|
* Attributes that should be cast to specific types
|
|
*
|
|
* @var array<string, string>
|
|
*/
|
|
protected $casts = [
|
|
'id' => 'integer',
|
|
'wali_user_id' => '?integer',
|
|
'created_at' => 'datetime',
|
|
'updated_at' => 'datetime',
|
|
];
|
|
}
|