ldc-arcadia-api/src/Domain/Models/ValueObjects/Inco/StorageCondition.php

24 lines
485 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace Domain\Models\ValueObjects\Inco;
/**
* Represents the storage/conservation conditions of a product.
*
* Maps to CONDIT_CONSERV.
*/
final readonly class StorageCondition
{
public function __construct(
public readonly string $instructions,
) {
if (empty(trim($this->instructions))) {
throw new \DomainException(
'Invalid instructions: must not be empty'
);
}
}
}