[REFACTOR] #485 어플리케이션 레이어의 검증 메서드들의 책임을 도메인으로 위임#485
Merged
huncozyboy merged 15 commits intodevfrom Mar 11, 2026
Merged
Conversation
1 task
Contributor
Walkthrough검증 책임을 애플리케이션 계층에서 도메인으로 위임하는 리팩토링이 적용되었습니다. 캠페인 리뷰 검증 유틸 삭제 후 검증 로직은 새로운 서비스 및 도메인 엔티티(Contributor/Creator/Campaign/CampaignReview)에 분산되었습니다. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Related issue 🛠
작업 내용 💻
이번 작업 목표 : usecase 비대화 해소를 위해 책임 위임
고민한점 : usecase에 과중되어 있던 로직들 중에, 위임하는 책임을 모두 domain에 두는 게 맞을지
Campaign이 참여 가능 여부, 관리자 승인 가능 여부, 수정 가능 여부, 승인 정원 초과 여부 도메인에서 검증하도록 수정CampaignReview가 리뷰 수정 요청 가능 상태를 도메인에서 검증하도록 수정User,Creator가 역할, SNS 연결 여부를 도메인으로 위임CreatorCampaign참여 상태 계산 로직은 별도 계산 객체인CreatorCampaignStatusResolver로 분리CampaignReviewValidationPolicy는 제거하고, DTO/command 입력 조합 검증 책임은campaignReview/application/service/CampaignReviewValidationService로 이동같이 얘기해보고 싶은 내용이 있다면 작성 📢
CampaignReviewValidationPolicy가 맡고 있던 검증은 aggregate 상태 전이라기보다 DTO/command 입력 검증에 더 가까워서, 이 책임까지 모두 domain으로 올리는 건 과하다고 판단했습니다.campaignReview/application/service에CampaignReviewValidationService로 두는 쪽으로 두었습니다.CampaignReviewUsecase내부에 일부MediaValidationUtil직접 호출이 남아 있어서, 리뷰 업로드 검증 책임을CampaignReviewValidationService로 분리할지 여부는 같이 얘기해보면 좋을거같아요추후 작업할 내용
CampaignReviewUsecase내부에 일부MediaValidationUtil직접 호출이 남아 있어서, 리뷰 업로드 검증 책임을CampaignReviewValidationService로 분리할지 여부는 같이 얘기해보면 좋을거같아요Summary by CodeRabbit
릴리스 노트
리팩토링
버그 픽스
테스트