class InterviewAllocationServiceImpl implements InterviewAllocationService {

    @Override
    public ServiceResult<List<InterviewResource>> getAllocatedApplicationsByAssessorId(long competitionId, long assessorUserId) {
        List<Interview> interviews = interviewRepository.findByParticipantUserIdAndTargetCompetitionIdOrderByActivityStateAscIdAsc(
                assessorUserId,
                competitionId);

        List<InterviewResource> interviewResources = interviews.stream()
                .map(interview -> interviewMapper.mapToResource(interview))
                .collect(Collectors.toList());

        return serviceSuccess(interviewResources);
    }

}