49 lines
1.5 KiB
PHP
49 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Contracts\Repositories;
|
|
|
|
use App\Contracts\Repository;
|
|
use App\Models\Employee;
|
|
use Domain\Models\ValueObjects\Code;
|
|
use Domain\Models\ValueObjects\Matricule;
|
|
use Illuminate\Support\Collection;
|
|
use Ramsey\Uuid\UuidInterface;
|
|
|
|
/**
|
|
* @extends Repository<Employee, UuidInterface>
|
|
*/
|
|
interface EmployeeRepository extends Repository
|
|
{
|
|
public function find(UuidInterface $id): ?Employee;
|
|
|
|
public function persist(Employee $employee): void;
|
|
|
|
public function delete(Employee $employee): void;
|
|
|
|
/** @return array<array-key, Employee> */
|
|
public function getAll(): array;
|
|
|
|
public function findByMatriculeAndCode(Matricule $matricule, Code $code): ?Employee;
|
|
|
|
public function findByMatricule(Matricule $matricule): ?Employee;
|
|
|
|
/**
|
|
* @param array<array-key, Matricule>|Collection<array-key, Matricule> $matricules
|
|
* @return array<int, Employee>
|
|
*/
|
|
public function getWhereMatriculeIn(array | Collection $matricules): array;
|
|
|
|
/**
|
|
* @param array<array-key, Matricule>|Collection<array-key, Matricule> $matricules
|
|
* @return array<string, Employee>
|
|
*/
|
|
public function getWithCustomerWhereMatriculeIn(array | Collection $matricules): array;
|
|
|
|
/**
|
|
* @param array<array-key, Matricule>|Collection<array-key, Matricule> $excludedMatricules
|
|
* @return array<int, Employee>
|
|
*/
|
|
public function getWithCustomerWhereMatriculeNotIn(array | Collection $excludedMatricules): array;
|
|
}
|