feat : request DTOs pour createEntree et createSortie

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-22 14:52:35 +02:00
parent efb85a3fcf
commit 7c028f79c7
2 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
namespace Malio\EdnotifBundle\Bovin\Dto;
use DateTimeInterface;
use Malio\EdnotifBundle\Bovin\Enum\CategorieBovinIPG;
use Malio\EdnotifBundle\Bovin\Enum\CauseEntree;
/**
* Paramètres d'une déclaration d'entrée bovin (opération `IpBCreateEntree`).
*
* `codeAtelier` suit le pattern XSD `[LABEM][1-9]` (L=Lait, A=Allaitant,
* B=Veaux de boucherie, E=Engraissement autre, M=Manade). Non validé côté
* bundle : EDNOTIF rejette la valeur malformée via `EdnotifException`.
*/
final readonly class CreateEntreeRequest
{
public function __construct(
public BovinRef $bovin,
public DateTimeInterface $date,
public CauseEntree $cause,
public ExploitationRef $provenance,
public ?string $codeAtelier = null,
public ?CategorieBovinIPG $codeCategorieBovin = null,
) {}
}

View File

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace Malio\EdnotifBundle\Bovin\Dto;
use DateTimeInterface;
use Malio\EdnotifBundle\Bovin\Enum\CauseSortie;
/**
* Paramètres d'une déclaration de sortie bovin (opération `IpBCreateSortie`).
*/
final readonly class CreateSortieRequest
{
public function __construct(
public BovinRef $bovin,
public DateTimeInterface $date,
public CauseSortie $cause,
public ExploitationRef $destination,
) {}
}