dbms_primeidc/extdbms/lib/Services/KCSService.php
2025-04-01 16:19:12 +09:00

40 lines
862 B
PHP

<?php
namespace lib\Services;
use lib\Entities\KCSEntity as Entity;
use lib\Models\KCSModel as Model;
class KCSService extends CommonService
{
private ?Model $_model = null;
public function __construct()
{
parent::__construct();
}
final public function getClassName(): string
{
return "KCS";
}
final public function getClassPath(): string
{
return $this->getClassName();
}
protected function getModel(): Model
{
if ($this->_model === null) {
$this->_model = new Model();
// $this->_model->setDebug(true);
}
return $this->_model;
}
public function getCountByServiceCode(string $service_code): int
{
$this->getModel()->where("service_code", $service_code);
$count = $this->getModel()->countAllResults();
// echo "<BR>" . $this->getModel()->getLastQuery();
return $count;
}
}