<?php

declare(strict_types=1);

namespace App\Framework\EventSourcing;

final readonly class AggregateId
{
    public function __construct(
        private string $id
    ) {
    }

    public function __toString(): string
    {
        return $this->id;
    }

    public static function generate(): self
    {
        return new self(uniqid('aggregate_', true));
    }
}
