class AdviceTranslateMapper extends AbstractConverter<AdviceTranslation, AdviceDTO> {

    @Override
    public AdviceDTO convert(AdviceTranslation entity) {
        AdviceDTO adviceDto = new AdviceDTO();
        HabitDictionaryDto habitDictionaryDto = new HabitDictionaryDto();
        habitDictionaryDto.setId(entity.getAdvice().getHabitDictionary().getId());
        habitDictionaryDto.setImage(entity.getAdvice().getHabitDictionary().getImage());
        adviceDto.setId(entity.getId());
        adviceDto.setContent(entity.getContent());
        adviceDto.setHabitDictionary(habitDictionaryDto);
        return adviceDto;
    }

}