feat(variants): add minimum and maximum use dates to variants and update related logic

This commit is contained in:
2026-07-27 14:59:07 -03:00
parent 069867522a
commit aa4f3303fc
16 changed files with 391 additions and 28 deletions

View File

@@ -29,6 +29,15 @@ class TicketGenerationException extends RuntimeException
return new self("El producto {$catalogItem->id} alcanzó su fecha máxima de uso.");
}
public static function variantNotFound(
CatalogItem $catalogItem,
int $variantId,
): self {
return new self(
"La variante {$variantId} no pertenece al producto {$catalogItem->id}.",
);
}
public static function purchaseWithoutUser(Purchase $purchase): self
{
return new self("La compra {$purchase->id} no tiene un usuario asociado.");