2026-06-14 21:32:07 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace Domain\Models\ValueObjects;
|
|
|
|
|
|
|
|
|
|
use Shared\DDD\Equatable;
|
|
|
|
|
|
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-01 17:26:30 +02:00
|
|
|
/** SI RH matricule style */
|
2026-06-14 21:32:07 +02:00
|
|
|
final readonly class Matricule implements \Stringable, Equatable
|
|
|
|
|
{
|
|
|
|
|
public string $value;
|
|
|
|
|
|
|
|
|
|
public function __construct(string $matricule)
|
|
|
|
|
{
|
2026-10-05 16:33:20 +02:00
|
|
|
if (! preg_match('/^\d{7,8}$/', $matricule)) {
|
|
|
|
|
throw new \DomainException('Matricule must be a 7 ou 8 digit string');
|
2026-06-14 21:32:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->value = $matricule;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function __toString(): string
|
|
|
|
|
{
|
|
|
|
|
return $this->value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function equals(mixed $other): bool
|
|
|
|
|
{
|
|
|
|
|
return $other instanceof self && $this->value === $other->value;
|
|
|
|
|
}
|
|
|
|
|
}
|