2026-03-16 07:24:50 +07:00
|
|
|
<?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;
|
|
|
|
|
}
|
|
|
|
|
}
|