<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class School_district_model extends MY_Model {
    
    public $short = "sd";
    public $table;
    public $tbl;
    public $database = 'default';
    
    public function __construct() {
        parent::__construct();
        $this->tbl = 'school_district';
        $this->table = $this->tbl . ' ' . $this->short;
    }

    public function district()
    {
        $fields = [$this->short . '.id', $this->short . '.chi_name', $this->short . '.eng_name'];
        return $this->getAll($this->database, $this->table, $fields);
    }

    public function one($school_district_id)
    {
        $fields = [
            $this->short . '.id',
            $this->short . '.chi_name',
            $this->short . '.eng_name',
        ];
        return $this->getOne($this->database, $this->table, $fields, $school_district_id);
    }

}
