clqms-be/app/Models/Contact/OccupationModel.php
OpenCode Bot 9946978487 chore: refresh CLQMS backend baseline
Re-synced controllers, configs, libraries, seeds, and docs with the latest API expectations and response helpers.
2026-04-08 16:07:19 +07:00

23 lines
566 B
PHP
Executable File

<?php
namespace App\Models\Contact;
use App\Models\BaseModel;
class OccupationModel extends BaseModel {
protected $table = 'occupation';
protected $primaryKey = 'OccupationID';
protected $allowedFields = ['OccCode', 'OccText', 'Description', 'CreateDate'];
public function getOccupations($OccCode, $OccText) {
if($OccCode != '') {
$this->like('OccCode', $OccCode, 'both');
}
if($OccText != '') {
$this->like('OccText', $OccText, 'both');
}
$rows = $this->findAll();
return $rows;
}
}