<?php

declare(strict_types=1);

namespace App\Scolarite\Domain\Event;

use App\Scolarite\Domain\Model\Grade\GradeId;
use App\Shared\Domain\DomainEvent;
use DateTimeImmutable;
use Override;
use Ramsey\Uuid\UuidInterface;

final readonly class NoteSaisie implements DomainEvent
{
    public function __construct(
        public GradeId $gradeId,
        public string $evaluationId,
        public string $studentId,
        public ?float $value,
        public string $status,
        public string $createdBy,
        private DateTimeImmutable $occurredOn,
    ) {
    }

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

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