Conversation
ymkim97
left a comment
There was a problem hiding this comment.
고생하셨습니다!!!~🔥🔥🔥🔥🔥🔥
수정할 거 반영 후 말해주세요!
| return new TraineeInfo(trainee.getId(), trainee.getMember().getName(), | ||
| ptTrainerTrainee.getFinishedPtCount(), ptTrainerTrainee.getTotalPtCount(), trainee.getCautionNote(), | ||
| ptGoals); | ||
| trainee.getMember().getProfileImageUrl(), ptTrainerTrainee.getFinishedPtCount(), |
There was a problem hiding this comment.
메모 부분은 추후에 넣어주어야 하니까 나중을 위해 위에다가 주석 하나 달아주세요!
ex) // Memo 추가 구현
|
|
||
| public static final int DIET_IMAGE_URL_LENGTH = 255; | ||
| public static final int MEMO_LENGTH = 100; | ||
| public static final int DIET_TYPE_LENGTH = 5; |
There was a problem hiding this comment.
BREAKFAST가 5를 넘습니다!
넉넉하게 20 정도 어떨까요??
| } | ||
|
|
||
| private String validateDietImageUrl(String dietImageUrl) { | ||
| if (dietImageUrl.length() > DIET_IMAGE_URL_LENGTH) { |
There was a problem hiding this comment.
사진 없으면 디폴트를 "" 로 저장하고 싶은데 isBlank가 막더라구요 그래서 뺐습니다 !
| @Column(name = "date", nullable = false) | ||
| private LocalDate date; | ||
|
|
||
| @Column(name = "time", nullable = false) | ||
| private LocalTime time; |
There was a problem hiding this comment.
따로 받도록 구현하신 이유가 있을까요!?
시간과 날짜는 한번에 LocalDateTime으로 받는건 어떨까요??
There was a problem hiding this comment.
이것도 수정해서 반영하겠습니다 !
| @Schema(description = "식사 날짜", example = "2025-01-01", nullable = true) | ||
| @PastOrPresent(message = "식사 날짜는 현재거나 과거 날짜여야 합니다.") | ||
| LocalDate date, | ||
|
|
||
| @Schema(description = "식사 시간", example = "19:30", nullable = true) | ||
| @PastOrPresent(message = "식사 시간은 현재거나 과거 시간이어야 합니다.") | ||
| LocalTime time, |
There was a problem hiding this comment.
여기도 Entity 쪽 참고 부탁드려요!
그리고 기획쪽에서 이전 날짜는 안되도록 하지는 않았던걸로 기억해서,,
한번 확인 부탁드립니다. 사용자가 이전 시간 날짜에 기록 못하는 것이 어색한거 같아요.
| DietType dietType, | ||
|
|
||
| @Schema(description = "메모", example = "아 배부르다.", nullable = false) | ||
| @NotBlank(message = "메모는 필수입니다.") |
There was a problem hiding this comment.
100자 이하로 받기 때문에
@Size(min = 1, max = 100, message = "메모는 100자 이하여야 합니다.") 추가 부탁드려요~!
|
|
||
| import com.tnt.domain.trainee.Diet; | ||
|
|
||
| public interface DietRepository extends JpaRepository<Diet, Integer> { |
There was a problem hiding this comment.
JpaRepository<Diet, Long>으로 수정해야할 거 같아요!
|
|
||
| @Operation(summary = "트레이니 식단 등록 API") | ||
| @ResponseStatus(CREATED) | ||
| @PostMapping(value = "/create-diet", consumes = MULTIPART_FORM_DATA_VALUE) |
There was a problem hiding this comment.
RESTful API 규칙에 더 따르자면 /diets는 어떠신가요!?
There was a problem hiding this comment.
제가 까먹고 안 바꿔놨네요 수정하겠습니다 !
|



📋 Checklist
[APP2-77] feat: 회원 인증 Filter 구현)🎟️ Issue
✅ Tasks
트레이니 식단 등록 API
""가 리턴됩니다.이미지 회전되어서 저장되는 버그
🙋🏻 More