feat(coll): 대댓글 기능 구현 #287
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 요약(Summary)
대댓글 기능을 구현했습니다.
parentId가 null이면 원댓글, 그렇지 않으면 대댓글이며, 댓글 조회 api의 응답으로 부모-자식 관계에 따라 트리 구조로 반환됩니다. 대댓글은 정책 상 depth 최대 1로 제한됩니다.
status 필드는, 대댓글이 있는 원댓글의 경우 soft delete가 필요하여 추가했습니다. deleted_at 대신 status를 썼기에 신고로 차단된 댓글과 직접 삭제한 댓글을 분리해서 표현할 수 있습니다. 이를 위한 content 대치 설정도 추가했습니다.
comment 생성 api의 요청 바디에 commentId를 담아서 보낼 수 있습니다(optional). 이걸 담아 보내면 답글로 생성됩니다.
📸스크린샷 (선택)
💬 공유사항
✅ PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.