ldc-boutique-cnc-sable/app/Contracts/Repositories/EmployeeRepository.php

52 lines
1.5 KiB
PHP
Raw Permalink Normal View History

2026-06-14 21:32:07 +02:00
<?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;
public function getMostRecentSyncDate(): ?\DateTimeInterface;
2026-06-14 21:32:07 +02:00
}