<?php

namespace App\Models\Referensi;

use App\Models\BaseModel;

class PdkjabatanModel extends BaseModel
{
    protected $table            = 'pdk_jabatan';
    protected $primaryKey       = 'id';
    protected $allowedFields    = ['nama_jabatan', 'nama_sjab', 'nama_alt', 'urutan'];

    public function find_by_id($id)
    {
        $db = \Config\Database::connect();
        $builder = $db->table($this->table);

        //$builder->join('table2', 'table2.fk = pdk_jabatan.fk');
        $builder->where('id', $id);

        return $builder->get()->getRow();
    }
}