dbms_primeidc/extdbms/lib/Services/AddDbService.php
2025-04-11 14:25:56 +09:00

41 lines
839 B
PHP

<?php
namespace lib\Services;
use lib\Entities\AddDbEntity as Entity;
use lib\Models\AddDbModel as Model;
class AddDbService extends CommonService
{
public function __construct()
{
parent::__construct();
}
final public function getClassName(): string
{
return "Adddb";
}
final public function getClassPath(): string
{
return $this->getClassName();
}
public function getModelClass(): string
{
return Model::class;
}
public function getEntityClass(): string
{
return Entity::class;
}
public function getEntityByCode(string $key): Entity|null|false
{
$this->getModel()->where('addDB_code', $key);
return $this->getEntity();
}
public function getEntitiesByCode(string $key): array
{
$this->getModel()->where('addDB_code', $key);
return $this->getEntities();
}
}