nhance/app/Models/MotorMasterNcbModel.php

22 lines
606 B
PHP

<?php
namespace App\Models;
use CodeIgniter\Model;
class MotorMasterNcbModel extends Model
{
protected $table = 'motor_master_ncb';
protected $primaryKey = 'ncb_code';
protected $returnType = 'array';
protected $useAutoIncrement = false;
protected $protectFields = true;
protected $allowedFields = ['ncb_code', 'sort_order', 'is_active', 'imported_at'];
protected $useTimestamps = false;
public function activeList(): array
{
return $this->where('is_active', 1)->orderBy('sort_order')->orderBy('ncb_code')->findAll();
}
}