<?php

declare(strict_types=1);

namespace App\SuperAdmin\Domain\Event;

use App\Shared\Domain\DomainEvent;
use App\SuperAdmin\Domain\Model\Establishment\EstablishmentId;
use DateTimeImmutable;
use Override;
use Ramsey\Uuid\UuidInterface;

final readonly class EtablissementDesactive implements DomainEvent
{
    public function __construct(
        public EstablishmentId $establishmentId,
        private DateTimeImmutable $occurredOn,
    ) {
    }

    #[Override]
    public function occurredOn(): DateTimeImmutable
    {
        return $this->occurredOn;
    }

    #[Override]
    public function aggregateId(): UuidInterface
    {
        return $this->establishmentId->value;
    }
}
