-
Notifications
You must be signed in to change notification settings - Fork 5
Refactor/S-01 #171 : TravelResponse 값에 scheduleDayId 누락으로 인한 CURD 오류 수정 #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,9 @@ public class TravelResponse { | |
| @JsonProperty("travel_id") | ||
| private Long id; | ||
|
|
||
| @JsonProperty("schedule_day_id") | ||
| private Long scheduleDayId; | ||
|
|
||
| @JsonProperty("id") | ||
| private String kakaomapId; | ||
|
|
||
|
|
@@ -36,6 +39,7 @@ public class TravelResponse { | |
| public static TravelResponse from(TravelEntity travelEntity) { | ||
| return TravelResponse.builder() | ||
| .id(travelEntity.getId()) | ||
| .scheduleDayId(travelEntity.getScheduleDay().getId()) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TravelResponse 객체 생성 시 |
||
| .kakaomapId(travelEntity.getKakaomapId()) | ||
| .location(travelEntity.getLocation()) | ||
| .category(travelEntity.getCategory()) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TravelResponse DTO에
scheduleDayId필드가 추가되었습니다.@JsonProperty어노테이션을 사용하여 JSON 응답 시 필드명을schedule_day_id로 변환하는 것이 적절한지 확인해야 합니다. 카멜 케이스(scheduleDayId)를 사용하는 것이 더 나은 선택일 수 있습니다. 또한,scheduleDayId필드의 null 가능성을 고려하여Long대신Long타입을 사용하는 것이 좋습니다. 필드에 대한 자세한 설명(Javadoc)을 추가하는 것을 고려해 보세요.