[Refactor] commentSystem을 commentEvent로 변경#69
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
CommentType 구조 변경
USER
SYSTEM
USER
APPLY
APPROVE
REJECT
CANCEL
이벤트 댓글을 타입으로 구분하도록 변경했습니다.
이벤트 댓글 생성 로직 추가
createSystemComment()
createEventComment()
이벤트 타입을 전달받아 댓글을 생성하도록 수정했습니다.
createEventComment(
Long feedId,
Long participationId,
String message,
CommentType type
)
ParticipationService 이벤트 댓글 생성 추가
참가 이벤트 발생 시 댓글이 생성되도록 추가했습니다.
참가 신청
CommentType.APPLY
참가 승인
CommentType.APPROVE
참가 거절
CommentType.REJECT
이벤트 댓글 삭제 방지 로직 수정
기존
SYSTEM 댓글 삭제 불가
변경
USER 댓글만 삭제 가능
if (comment.getCommentType() != CommentType.USER)
변경된 흐름
참가 신청
Participation 생성
↓
Comment (APPLY) 생성
참가 승인
Participation status → APPROVED
↓
Comment (APPROVE) 생성
↓
Notification 전송
참가 거절
Participation status → REJECTED
↓
Comment (REJECT) 생성
↓
Notification 전송