-
Notifications
You must be signed in to change notification settings - Fork 2
feat: 댓글 작성시 res DTO 데이터 추가 #196
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,14 @@ public class CommentResponseDTO { | |||||||
| @AllArgsConstructor | ||||||||
| @NoArgsConstructor | ||||||||
| public static class WriteCommentResponseDTO{ | ||||||||
|
|
||||||||
| @NotNull | ||||||||
| private String nameId; | ||||||||
| @NotNull | ||||||||
| private String nickname; | ||||||||
| @NotNull | ||||||||
|
||||||||
| private String profileImageUrl; | ||||||||
|
Comment on lines
+22
to
+23
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.
Suggested change
|
||||||||
|
|
||||||||
| @NotNull | ||||||||
| private Long commentId; | ||||||||
| @NotNull | ||||||||
|
|
@@ -24,6 +32,7 @@ public static class WriteCommentResponseDTO{ | |||||||
| private Long userId; | ||||||||
| @NotNull | ||||||||
| private String content; | ||||||||
|
|
||||||||
| } | ||||||||
|
|
||||||||
| @Getter | ||||||||
|
|
||||||||
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.
코드 가독성과 유지보수성을 향상시키기 위해,
CommentConverter에서WriteCommentResponseDTO객체를 생성할 때 빌더의 메서드 호출 순서를 DTO 클래스에 선언된 필드 순서(nameId,nickname,profileImageUrl)와 동일하게 맞추는 것을 제안합니다. 이렇게 하면 코드를 읽는 사람이 DTO의 구조를 더 쉽게 파악할 수 있습니다.