<?php
require_once __DIR__ . '/../init.php';
require_once PROJECT_ROOT . '/backend/controllers/common_function.php';
require_once PROJECT_ROOT . '/backend/controllers/db_select_helper.php';

class AksesController
{
    private $conn;
    private $table = "akses A";
    private $pk = "IDAkses";

    protected $displayedColumn = [
        'A.IDAkses',
        'A.AksesName',
        'A.Kategori',
        'A.Deskripsi',
        'A.CreateBy',
        'A.CreateAt',
        'A.LastUpdateBy',
        'A.LastUpdateAt'
    ];

    public function __construct($conn)
    {
        $this->conn = $conn;
    }

    public function select($post)
    {
        return runSelect(
            $this->conn,
            $this->table,
            $this->pk,
            $this->displayedColumn,
            $post
        );
    }
}
?>
