<?php

declare(strict_types=1);

namespace App\Administration\Domain\Model\SchoolCalendar;

use App\Administration\Domain\Exception\CalendrierNonTrouveException;
use App\Administration\Domain\Model\SchoolClass\AcademicYearId;
use App\Shared\Domain\Tenant\TenantId;

interface SchoolCalendarRepository
{
    public function save(SchoolCalendar $calendar): void;

    public function findByTenantAndYear(
        TenantId $tenantId,
        AcademicYearId $academicYearId,
    ): ?SchoolCalendar;

    /**
     * @throws CalendrierNonTrouveException
     */
    public function getByTenantAndYear(
        TenantId $tenantId,
        AcademicYearId $academicYearId,
    ): SchoolCalendar;
}
