clqms-be/app/Models/Contact/OccupationModel.php

23 lines
544 B
PHP
Raw Normal View History

<?php
2025-10-14 18:53:06 +07:00
namespace App\Models\Contact;
2025-10-14 18:53:06 +07:00
use App\Models\BaseModel;
2025-10-14 18:53:06 +07:00
class OccupationModel extends BaseModel {
protected $table = 'occupation';
protected $primaryKey = 'OccupationID';
2025-10-15 16:08:52 +07:00
protected $allowedFields = ['OccCode', 'OccText', 'Description', 'CreateDate'];
2025-12-01 16:47:52 +07:00
public function getOccupations($OccCode, $OccText) {
if($OccCode != '') {
$this->like('OccCode', $OccCode, 'both');
}
if($OccText != '') {
$this->like('OccText', $OccText, 'both');
}
$rows = $this->findAll();
return $rows;
}
}