-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor/bookmark postservice : 북마크 서비스에 댓글 추가 및 댓글 서비스 수정 (#164)
* refactor/bookmark-postservice-1: 북마크에 댓글 추가 - 다대일로 댓글-북마크 관계 - 북마크 생성할 때 DTO에 type 추가해 활용 - 게시글 반응 DTO에 댓글 추가 - 댓글 생성 엔드포인트 수정 * refactor/bookmark-postservice-2: 북마크 두번 생성할 수 없도록 - JPA를 이용해 중복된 북마크를 만들 수 없도록 함 * refactor/bookmark-postservice-3: 댓글 서비스 수정 - CommentService: - 댓글/대댓글은 게시글 번호에 따른 댓글 조회 시 포함되게 됨 - 대댓글 또한 DTO 조회 시에 좋아요와 스크랩수를 포함해야 하기 때문에 기존에 DTO에 포함했던 대댓글 정보를 댓글 DTO처럼 밖으로 빼고 parent_id로 구별함 -> parent_id가 null이라면 최초 댓글인것이고 null이 아니라면 대댓글인 것임 * refactor/bookmark-postservice-4: 북마크 취소 - 북마크 취소 버튼을 누를 시 북마크가 삭제됨 (좋아요 서비스와 동일) * refactor/bookmark-postservice-5: consume 타입 application/json 삭제 * refactor/bookmark-postservice-6: 게시글&댓글 불러오기 피드백 반영 - CommentResponseDto, CommentService: - 댓글 응답 DTO에 부모 댓글 ID가 아닌 부모 댓글 엔티티를 가져옴 - PostResponseDto: - 게시글 조회 시 댓글 리스트는 보이지 않음 -> 댓글은 댓글 조회 엔드포인트를 통해 이루어짐 * refactor/bookmark-postservice-7: 누락된 List import 추가
- Loading branch information
Showing
17 changed files
with
156 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/main/java/com/dife/api/exception/DuplicateBookmarkException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.dife.api.exception; | ||
|
||
public class DuplicateBookmarkException extends DuplicateException { | ||
|
||
public DuplicateBookmarkException() { | ||
super("이미 북마크를 눌렀습니다!"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.dife.api.model; | ||
|
||
public enum BookmarkType { | ||
CHAT, | ||
POST, | ||
COMMENT | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters