2026-03-16 07:24:50 +07:00
|
|
|
<?php
|
|
|
|
|
namespace App\Models\Contact;
|
|
|
|
|
|
|
|
|
|
use App\Models\BaseModel;
|
|
|
|
|
|
|
|
|
|
class MedicalSpecialtyModel extends BaseModel {
|
|
|
|
|
protected $table = 'medicalspecialty';
|
|
|
|
|
protected $primaryKey = 'SpecialtyID';
|
|
|
|
|
protected $allowedFields = ['SpecialtyID', 'SpecialtyText', 'Parent', 'Title', 'CreateDate', 'EndDate'];
|
|
|
|
|
|
|
|
|
|
public function getOccupations($Parent, $SpecialtyText) {
|
|
|
|
|
if($Parent != '') {
|
|
|
|
|
$this->like('Parent', $Parent, 'both');
|
|
|
|
|
}
|
|
|
|
|
if($SpecialtyText != '') {
|
|
|
|
|
$this->like('SpecialtyText', $SpecialtyText, 'both');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$rows = $this->findAll();
|
|
|
|
|
return $rows;
|
|
|
|
|
}
|
|
|
|
|
}
|