ldc-boutique-cnc-sable/app/Contracts/Repositories/EmployeeRepository.php
Jérémy Munsch 3b3997d547
feat(employees): automated sync with Arcadia API, BO settings, Shopper value objects, and pagination migration
- Implement automated synchronization of employees via Arcadia API (EmployeeSyncService, SynchronizeEmployeesWithArcadiaApi, FetchAndUpsertArcadiaEmployees)
- Add Back-Office application settings for employee sites (Setting singleton, GetSettingsQuery, UpdateSettings, SettingsController, EmployeeSitesInputComponent.vue)
- Strongly type Employee attributes using Domain Value Objects (ShopperEstablishmentCode, ShopperSiteCode, ShopperServiceCode) and Eloquent Casts
- Migrate pagination from Domain to Shared\Pagination namespace across queries and inputs
- Remove legacy and dead CSV employee import/export code
- Restore Domain\Ports\Services\CsvGenerator interface for Regate order generation
- Add comprehensive Pest unit, integration, and feature test coverage
2026-10-27 09:58:44 +01:00

51 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;
public function getMostRecentSyncDate(): ?\DateTimeInterface;
}