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