45 lines
939 B
PHP
45 lines
939 B
PHP
<?php
|
|
|
|
namespace App\Modules\Notification\Entities;
|
|
|
|
use CodeIgniter\Entity\Entity;
|
|
|
|
/**
|
|
* Student Parent Entity
|
|
*
|
|
* Represents the relationship between a student and a parent.
|
|
*/
|
|
class StudentParent extends Entity
|
|
{
|
|
/**
|
|
* Relationship constants
|
|
*/
|
|
public const RELATIONSHIP_AYAH = 'AYAH';
|
|
public const RELATIONSHIP_IBU = 'IBU';
|
|
public const RELATIONSHIP_WALI = 'WALI';
|
|
|
|
/**
|
|
* Attributes that can be mass assigned
|
|
*
|
|
* @var array<string>
|
|
*/
|
|
protected $allowedFields = [
|
|
'student_id',
|
|
'parent_id',
|
|
'relationship',
|
|
];
|
|
|
|
/**
|
|
* Attributes that should be cast to specific types
|
|
*
|
|
* @var array<string, string>
|
|
*/
|
|
protected $casts = [
|
|
'id' => 'integer',
|
|
'student_id' => 'integer',
|
|
'parent_id' => 'integer',
|
|
'created_at' => 'datetime',
|
|
'updated_at' => 'datetime',
|
|
];
|
|
}
|