36 lines
692 B
PHP
36 lines
692 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();
|
|
}
|
|
}
|