84 lines
2.1 KiB
PHP
84 lines
2.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Repositories;
|
|
|
|
use App\Models\Thanatopractitioner;
|
|
use Illuminate\Support\Collection;
|
|
|
|
/**
|
|
* Contract for Thanatopractitioner repository operations.
|
|
*/
|
|
interface ThanatopractitionerRepositoryInterface
|
|
{
|
|
/**
|
|
* Get all thanatopractitioners with optional filtering.
|
|
*
|
|
* @param array<string, mixed> $filters
|
|
* @return Collection<int, Thanatopractitioner>
|
|
*/
|
|
public function getAll(array $filters = []): Collection;
|
|
|
|
/**
|
|
* Find a thanatopractitioner by ID.
|
|
*
|
|
* @param int $id
|
|
* @return Thanatopractitioner|null
|
|
*/
|
|
public function findById(int $id): ?Thanatopractitioner;
|
|
|
|
/**
|
|
* Find a thanatopractitioner by employee ID.
|
|
*
|
|
* @param int $employeeId
|
|
* @return Thanatopractitioner|null
|
|
*/
|
|
public function findByEmployeeId(int $employeeId): ?Thanatopractitioner;
|
|
|
|
/**
|
|
* Get thanatopractitioners with valid authorization.
|
|
*
|
|
* @return Collection<int, Thanatopractitioner>
|
|
*/
|
|
public function getWithValidAuthorization(): Collection;
|
|
|
|
/**
|
|
* Get thanatopractitioners with expired authorization.
|
|
*
|
|
* @return Collection<int, Thanatopractitioner>
|
|
*/
|
|
public function getWithExpiredAuthorization(): Collection;
|
|
|
|
/**
|
|
* Get thanatopractitioners with their complete data.
|
|
*
|
|
* @return Collection<int, Thanatopractitioner>
|
|
*/
|
|
public function getWithRelations(): Collection;
|
|
|
|
/**
|
|
* Get thanatopractitioners with pagination.
|
|
*
|
|
* @param int $perPage
|
|
* @return array{thanatopractitioners: Collection<int, Thanatopractitioner>, pagination: array}
|
|
*/
|
|
public function getPaginated(int $perPage = 10): array;
|
|
|
|
/**
|
|
* Get thanatopractitioner statistics.
|
|
*
|
|
* @return array<string, int>
|
|
*/
|
|
|
|
/**
|
|
* Search thanatopractitioners by employee name.
|
|
*
|
|
* @param string $query
|
|
* @return Collection<int, Thanatopractitioner>
|
|
*/
|
|
public function searchByEmployeeName(string $query): Collection;
|
|
|
|
public function getStatistics(): array;
|
|
}
|