<?php

namespace App\Models;

use CodeIgniter\Model;

class PpdbModel extends Model
{
    protected $table = 'ppdb_registrations';
    protected $primaryKey = 'id';
    protected $returnType = 'array';
    protected $useTimestamps = true;

    protected $allowedFields = [

        // ================= REGISTRASI =================
        'reg_no',
        'school_level',
        'registration_path',

        // ================= IDENTITAS SISWA =================
        'name',
        'nickname',
        'gender',
        'nisn',
        'nik',
        'akta_number',
        'birth_place',
        'birth_date',
        'religion',
        'citizenship',
        'child_order',
        'siblings',
        'special_needs',

        // ================= ALAMAT =================
        'address_street',
        'rt_rw',
        'postal_code',
        'province',
        'city',
        'district',
        'village',
        'live_with',
        'transport_mode',
        'distance_to_school',
        'travel_time',

        // ================= ORANG TUA =================
        'parent_status',

        'father_name',
        'father_nik',
        'father_birth_year',
        'father_address',
        'father_education',
        'father_job',
        'father_income',
        'father_phone',

        'mother_name',
        'mother_nik',
        'mother_birth_year',
        'mother_address',
        'mother_education',
        'mother_job',
        'mother_income',
        'mother_phone',

        // ================= WALI =================
        'guardian_name',
        'guardian_nik',
        'guardian_birth_year',
        'guardian_address',
        'guardian_education',
        'guardian_job',
        'guardian_income',
        'guardian_phone',

        // ================= SEKOLAH ASAL =================
        'origin_school_level',
        'school_status',
        'school_origin',
        'school_npsn',
        'school_city',
        'graduation_year',
        'certificate_number',

        // ================= PRESTASI =================
        'prestasi_type',

        // AKADEMIK
        'prestasi_academic_level',
        'prestasi_academic_rank',
        'prestasi_academic_subject',
        'prestasi_academic_year',

        // NON AKADEMIK
        'prestasi_non_type',
        'prestasi_non_level',
        'prestasi_non_rank',
        'prestasi_non_year',
        'prestasi_non_organizer',
        'prestasi_certificate_file',

        // ================= FILE =================
        'photo_file',
        'kk_file',
        'akta_file',
        'ktp_parent_file',
        'rapor_file',
        'kip_file',
        'ijazah_file',
        'skl_file',

        // ================= SYSTEM =================
        'status',
        'announcement_token',
        'reject_note',
    ];
}
