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