<?php

namespace App\Models;

use CodeIgniter\Model;

class DosenPengajarKelasModel extends Model
{
    protected $table            = 'dosen_pengajar_kelas';
    protected $primaryKey       = 'id';
    protected $useAutoIncrement = true;
    protected $returnType       = 'array';
    protected $useSoftDeletes   = false;
    protected $protectFields    = true;
    protected $allowedFields    = [
        'id_aktivitas_mengajar_pddikti',
        'id_kelas_kuliah',
        'id_dosen',
        'nama_dosen',
        'sks_substansi_total',
        'rencana_tatap_muka',
        'realisasi_tatap_muka'
    ];

    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';
}
