34 lines
853 B
PHP
34 lines
853 B
PHP
<?php
|
|
|
|
namespace App\Services\Api\ServiceClient;
|
|
|
|
use App\Repositories\Api\ServiceClient\ServiceClientRepositoryInterface;
|
|
|
|
class ServiceClientService
|
|
{
|
|
protected $serviceClientRepository;
|
|
|
|
public function __construct(ServiceClientRepositoryInterface $serviceClientRepository)
|
|
{
|
|
$this->serviceClientRepository = $serviceClientRepository;
|
|
}
|
|
|
|
/**
|
|
* Lấy danh sách dịch vụ đang hoạt động
|
|
*/
|
|
public function getActiveServices(int $limit = 10)
|
|
{
|
|
return $this->serviceClientRepository->getActiveServices($limit);
|
|
}
|
|
|
|
public function findActiveBySlug(string $slug)
|
|
{
|
|
return $this->serviceClientRepository->findActiveBySlug($slug);
|
|
}
|
|
|
|
public function getDetailService(string $uuid)
|
|
{
|
|
return $this->serviceClientRepository->getDetailService($uuid);
|
|
}
|
|
}
|