<?php
namespace App\Models;

use CodeIgniter\Model;


class CategoryModel extends Model
{
protected $table = 'tbcategories';
protected $primaryKey = 'category_id';
protected $allowedFields = ['category_id','category_name','category_status','category_created_at','category_created_by','category_edited_by'];


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

// CREATE TABLE tbcategories (
//     category_id SERIAL PRIMARY KEY,
//     category_name VARCHAR(100) NOT NULL,
//     category_status VARCHAR(10) NOT NULL DEFAULT 'Active'
//     category_created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
//     category_created_by INTEGER NOT NULL,
//     category_edited_by INTEGER NOT NULL,
// );