feat: ajout des notifications d'entrées/sorties #5

Merged
tristan merged 9 commits from feat/phase2-create-entree-sortie into develop 2026-04-22 13:28:23 +00:00
2 changed files with 49 additions and 0 deletions
Showing only changes of commit 7c028f79c7 - Show all commits

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,
) {}
}