36 lines
689 B
PHP
36 lines
689 B
PHP
<?php
|
|
|
|
namespace lib\Services;
|
|
|
|
use lib\Entities\ClientEntity as Entity;
|
|
use lib\Models\ClientModel as Model;
|
|
|
|
class ClientService extends CommonService
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
final public function getClassName(): string
|
|
{
|
|
return "Client";
|
|
}
|
|
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 $value): mixed
|
|
{
|
|
$this->getModel()->where("Client_Code", $value);
|
|
return $this->getEntity();
|
|
}
|
|
}
|