class HabitFactServiceImpl implements HabitFactService {

    @Override
    public HabitFactDTO getHabitFactByName(String language, String name) {
        return modelMapper.map(factTranslationRepo.findFactTranslationByLanguage_CodeAndHabitFact(language, name)
                .orElseThrow(() -> new NotFoundException(ErrorMessage.HABIT_FACT_NOT_FOUND_BY_ID + name)),
            HabitFactDTO.class);
    }

    @Autowired public  HabitFactServiceImpl(ModelMapper modelMapper, HabitFactRepo habitFactRepo,
                                HabitDictionaryRepo habitDictionaryRepo, FactTranslationRepo factTranslationRepo);

}