<?php

declare(strict_types=1);

namespace App\Scolarite\Domain\Repository;

use App\Administration\Domain\Model\SchoolClass\ClassId;
use App\Administration\Domain\Model\User\UserId;
use App\Scolarite\Domain\Exception\HomeworkNotFoundException;
use App\Scolarite\Domain\Model\Homework\Homework;
use App\Scolarite\Domain\Model\Homework\HomeworkId;
use App\Shared\Domain\Tenant\TenantId;

interface HomeworkRepository
{
    public function save(Homework $homework): void;

    /** @throws HomeworkNotFoundException */
    public function get(HomeworkId $id, TenantId $tenantId): Homework;

    public function findById(HomeworkId $id, TenantId $tenantId): ?Homework;

    /** @return array<Homework> */
    public function findByTeacher(UserId $teacherId, TenantId $tenantId): array;

    /** @return array<Homework> */
    public function findByClass(ClassId $classId, TenantId $tenantId): array;

    public function delete(HomeworkId $id, TenantId $tenantId): void;
}
