<?php

namespace App\Models;

use CodeIgniter\Model;

class KelasPerkuliahanModel extends Model
{
    protected $table            = 'kelas_perkuliahan';
    protected $primaryKey       = 'id';
    protected $useAutoIncrement = true;
    protected $returnType       = 'array';
    protected $useSoftDeletes   = false;
    protected $protectFields    = true;
    protected $allowedFields    = [
        'id_kelas_kuliah_pddikti',
        'id_program_studi',
        'id_semester',
        'id_mata_kuliah',
        'nama_mata_kuliah',
        'nama_kelas_kuliah',
        'sks',
        'jumlah_mahasiswa'
    ];

    protected bool $allowEmptyInserts = false;
    protected bool $updateOnlyChanged = true;

    protected array $casts = [];
    protected array $castHandlers = [];

    // Dates
    protected $useTimestamps = true;
    protected $dateFormat    = 'datetime';
    protected $createdField  = 'created_at';
    protected $updatedField  = 'updated_at';
    protected $deletedField  = 'deleted_at';
}
