<?php
namespace App\Models;

use CodeIgniter\Model;


class UnitModel extends Model
{
protected $table = 'tbunits';
protected $primaryKey = 'unit_id';
protected $allowedFields = ['unit_id','unit_name','unit_short_name','unit_status','unit_created_at','unit_created_by','unit_edited_by'];

public function getUnits()
    {
        return $this->findAll();
    }
}


// CREATE TABLE tbunits (
//     unit_id SERIAL PRIMARY KEY,
//     unit_name VARCHAR(100) NOT NULL,
//     unit_status VARCHAR(10) NOT NULL DEFAULT 'Active'
//     unit_created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
//     unit_created_by INTEGER NOT NULL,
//     unit_edited_by INTEGER NOT NULL,
// );
