<?php

namespace App\Modules\Academic\Entities;

use CodeIgniter\Entity\Entity;

/**
 * Student Entity
 * 
 * Represents a student in the system.
 */
class Student extends Entity
{
    /**
     * Attributes that can be mass assigned
     * 
     * @var array<string>
     */
    protected $allowedFields = [
        'nisn',
        'name',
        'gender',
        'class_id',
        'is_active',
        'face_external_id',
        'face_hash',
        'dapodik_id',
        'parent_link_code',
    ];

    /**
     * Attributes that should be cast to specific types
     *
     * @var array<string, string>
     */
    protected $casts = [
        'id'           => 'integer',
        'class_id'     => '?integer',
        'is_active'    => 'integer',
        'face_hash'    => '?string',
        'created_at'   => 'datetime',
        'updated_at'   => 'datetime',
    ];
}
