Normalize formatting/line endings across configs, controllers, models, tests, and OpenAPI specs. Update rule expression/rule engine implementation and remove obsolete RuleAction controller/model. Add unit tests for rule expression syntax and multi-action behavior, and include docs updates.
23 lines
566 B
PHP
23 lines
566 B
PHP
<?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;
|
|
}
|
|
}
|