class ReviewStatisticsServiceImpl implements ReviewStatisticsService {

    @Override
    public ServiceResult<ReviewKeyStatisticsResource> getReviewPanelKeyStatistics(long competitionId) {
        ReviewKeyStatisticsResource reviewKeyStatisticsResource = new ReviewKeyStatisticsResource();
        List<Long> assessmentPanelInviteIds = simpleMap(reviewInviteRepository.getByCompetitionId(competitionId), Invite::getId);

        reviewKeyStatisticsResource.setApplicationsInPanel(getApplicationPanelAssignedCountStatistic(competitionId));
        reviewKeyStatisticsResource.setAssessorsAccepted(getReviewParticipantCountStatistic(competitionId, ACCEPTED, assessmentPanelInviteIds));
        reviewKeyStatisticsResource.setAssessorsPending(reviewInviteRepository.countByCompetitionIdAndStatusIn(competitionId, singleton(SENT)));

        return serviceSuccess(reviewKeyStatisticsResource);
    }

    public  ReviewStatisticsServiceImpl();
    @Autowired public  ReviewStatisticsServiceImpl(ReviewInviteRepository reviewInviteRepository,
                                       ReviewParticipantRepository reviewParticipantRepository,
                                       ApplicationRepository applicationRepository);

}