<?php

declare(strict_types=1);

namespace App\Scolarite\Domain\Event;

use App\Scolarite\Domain\Model\Homework\HomeworkId;
use App\Shared\Domain\DomainEvent;
use DateTimeImmutable;
use Override;
use Ramsey\Uuid\UuidInterface;

final readonly class DevoirSupprime implements DomainEvent
{
    public function __construct(
        public HomeworkId $homeworkId,
        private DateTimeImmutable $occurredOn,
    ) {
    }

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

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