<?php

declare(strict_types=1);

namespace App\Scolarite\Domain\Event;

use App\Scolarite\Domain\Model\Evaluation\EvaluationId;
use App\Shared\Domain\DomainEvent;
use DateTimeImmutable;
use Override;
use Ramsey\Uuid\UuidInterface;

final readonly class EvaluationModifiee implements DomainEvent
{
    public function __construct(
        public EvaluationId $evaluationId,
        public string $title,
        public DateTimeImmutable $evaluationDate,
        private DateTimeImmutable $occurredOn,
    ) {
    }

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

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