class ReviewStatisticsServiceImpl implements ReviewStatisticsService {

    @Override
    public ServiceResult<ReviewInviteStatisticsResource> getReviewInviteStatistics(long competitionId) {
        List<Long> reviewPanelInviteIds = simpleMap(reviewInviteRepository.getByCompetitionId(competitionId), Invite::getId);

        int totalAssessorsInvited = reviewInviteRepository.countByCompetitionIdAndStatusIn(competitionId, EnumSet.of(OPENED, SENT));
        int assessorsAccepted = getReviewParticipantCountStatistic(competitionId, ACCEPTED, reviewPanelInviteIds);
        int assessorsDeclined = getReviewParticipantCountStatistic(competitionId, REJECTED, reviewPanelInviteIds);

        return serviceSuccess(
                new ReviewInviteStatisticsResource(totalAssessorsInvited, assessorsAccepted, assessorsDeclined)
        );
    }

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

}