<?php

declare(strict_types=1);

namespace App\Administration\Domain\Repository;

use App\Administration\Domain\Model\ClassAssignment\ClassAssignment;
use App\Administration\Domain\Model\ClassAssignment\ClassAssignmentId;
use App\Administration\Domain\Model\SchoolClass\AcademicYearId;
use App\Administration\Domain\Model\SchoolClass\ClassId;
use App\Administration\Domain\Model\User\UserId;
use App\Shared\Domain\Tenant\TenantId;

interface ClassAssignmentRepository
{
    public function save(ClassAssignment $assignment): void;

    public function findById(ClassAssignmentId $id, TenantId $tenantId): ?ClassAssignment;

    public function findByStudent(UserId $studentId, AcademicYearId $academicYearId, TenantId $tenantId): ?ClassAssignment;

    public function countByClass(ClassId $classId): int;

    /** @return ClassAssignment[] */
    public function findByClass(ClassId $classId, TenantId $tenantId): array;
}
