package com.davos.assessment.assessment;

import com.davos.assessment.user.AppUser;
import com.davos.assessment.project.Project;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;

public interface UserAssessmentAccessRepository extends JpaRepository<UserAssessmentAccess, Long> {
  Optional<UserAssessmentAccess> findByUserAndAssessment(AppUser user, Assessment assessment);
  Optional<UserAssessmentAccess> findByProjectAndUserAndAssessment(Project project, AppUser user, Assessment assessment);
  List<UserAssessmentAccess> findByUser(AppUser user);
  List<UserAssessmentAccess> findByProjectAndUser(Project project, AppUser user);
}
