class CustomGoalServiceImpl implements CustomGoalService {

    @Transactional
    @Override
    public List<CustomGoalResponseDto> findAllByUser(Long userId) {
        List<CustomGoalResponseDto> customGoals = customGoalRepo.findAllByUserId(userId).stream()
            .map(customGoal -> modelMapper.map(customGoal, CustomGoalResponseDto.class))
            .collect(Collectors.toList());
        if (!customGoals.isEmpty()) {
            return customGoals;
        } else {
            throw new NotFoundException(CUSTOM_GOAL_NOT_FOUND);
        }
    }

}