ldc-boutique-cnc-sable/domain/Models/ValueObjects/SessionId.php

20 lines
387 B
PHP
Raw Permalink Normal View History

2026-06-14 21:32:07 +02:00
<?php
declare(strict_types=1);
namespace Domain\Models\ValueObjects;
use Ramsey\Uuid\UuidInterface;
use Shared\Helpers\UuidHelper;
final readonly class SessionId
{
public function __construct(
public readonly UuidInterface $value
) {
if (! UuidHelper::isV7($value)) {
throw new \DomainException('value must be a valid UUID v7');
}
}
}