feat : request DTOs pour createEntree et createSortie
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
28
src/Bovin/Dto/CreateEntreeRequest.php
Normal file
28
src/Bovin/Dto/CreateEntreeRequest.php
Normal 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,
|
||||||
|
) {}
|
||||||
|
}
|
||||||
21
src/Bovin/Dto/CreateSortieRequest.php
Normal file
21
src/Bovin/Dto/CreateSortieRequest.php
Normal 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,
|
||||||
|
) {}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user