Step 03 — ACL (LegacyFulfillment)

- LegacyShipmentAcl : mapping explicite sales.v1.OrderConfirmed → LegacyCreateShipmentCommand
- LegacyCreateShipmentCommand : modèle legacy (champs abrégés, codification date/status)
- WhenOrderConfirmed (LegacyFulfillment) : consumer Messenger via ACL
- Tests unitaires mapping ACL + test d'intégration
This commit is contained in:
2026-03-04 00:32:11 +01:00
parent dcc81ec9bb
commit f8be8166b7
5 changed files with 253 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
namespace MiniShop\LegacyFulfillment\Infrastructure\AntiCorruption;
/**
* Modele legacy : champs abreges et codifications imposees par le systeme d'expedition historique.
* Ce format ne doit jamais fuiter en dehors de l'ACL.
*/
final readonly class LegacyCreateShipmentCommand
{
public function __construct(
public string $ord_ref, // reference commande (format legacy: prefixe LEG-)
public string $rcpt_nm, // nom destinataire (tronque a 35 chars)
public string $rcpt_addr, // adresse sur une ligne
public string $rcpt_zip, // code postal
public string $rcpt_cty, // code pays ISO 2
public int $wgt_g, // poids en grammes
public string $desc, // description colis
public string $req_dt, // date demande format legacy YYYYMMDD
public string $sts, // statut: NEW, DIS (dispatched)
) {}
}