<?php

declare(strict_types=1);

namespace App\Scolarite\Domain\Repository;

use App\Administration\Domain\Model\User\UserId;
use App\Scolarite\Domain\Model\Competency\CompetencyEvaluationId;
use App\Scolarite\Domain\Model\Competency\CompetencyId;
use App\Scolarite\Domain\Model\Competency\StudentCompetencyResult;
use App\Shared\Domain\Tenant\TenantId;

interface StudentCompetencyResultRepository
{
    public function save(StudentCompetencyResult $result): void;

    public function delete(StudentCompetencyResult $result): void;

    /** @return array<StudentCompetencyResult> */
    public function findByCompetencyEvaluation(
        CompetencyEvaluationId $competencyEvaluationId,
        TenantId $tenantId,
    ): array;

    public function findByCompetencyEvaluationAndStudent(
        CompetencyEvaluationId $competencyEvaluationId,
        UserId $studentId,
        TenantId $tenantId,
    ): ?StudentCompetencyResult;

    /** @return array<StudentCompetencyResult> */
    public function findByStudentAndCompetency(
        UserId $studentId,
        CompetencyId $competencyId,
        TenantId $tenantId,
    ): array;
}
