[FEATURE] Member soft-delete 관련 Reservation 서비스 메서드 추가#217
Merged
Conversation
friox
requested review from
EndlessMilkyway,
Jimin730,
Ogu1208,
Yunsung-Jo and
chanwonlee
August 6, 2025 02:45
EndlessMilkyway
approved these changes
Aug 6, 2025
EndlessMilkyway
left a comment
Contributor
There was a problem hiding this comment.
확인 완료했습니다! 서비스 레이어와 관련된 고민을 진행하다보니 이게 바로 기술부채인가 하는 생각이 드네요...
설계 단계의 중요성을 깨닫게 되는 귀중한 경험이었던 것 같습니다. 고생많으셨습니다!
chanwonlee
approved these changes
Aug 6, 2025
chanwonlee
left a comment
Contributor
There was a problem hiding this comment.
코드 잘 확인했습니다! 저도 이번 기회에 서비스 아키텍처에 대해 한 번 공부해보겠습니다. 수고 많으셨습니다!
Jimin730
approved these changes
Aug 6, 2025
Jimin730
left a comment
Contributor
There was a problem hiding this comment.
확인했습니다 ! 👍
Service 에서 다른 Service 를 끌어와 쓰는 부분이 크게 문제가 있다라고 생각하지 않았는데 이번에 승훈님의 고민으로 처음 알게 되었네요
저도 이 부분에 대해서 추가로 공부해야봐야겠네요! 고생하셨습니다 :)
friox
force-pushed
the
feature/209-member-reservation-method
branch
from
August 6, 2025 04:51
15ae9dd to
83307ed
Compare
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.
관련 Issue (필수)
주요 변경 사항 (필수)
리뷰어 참고 사항
코드는 별거없습니다, 멤버 ID로 모든 Reservation을 삭제하는 레포지토리 메서드를 이용하는것이 전부입니다.
최근 Payment, Member 관련하여 Reservation쪽 메서드를 작업하다 보니 서비스에서 서비스를 호출하는 문제로,
어떻게 개선하면 좋을까 고민하는 탓에 사소한 코드임에도 불구하고 늦었습니다. 죄송합니다 😢
Service Layer를 단위 서비스인 Module Service와 단위 서비스를 조합하여 하나의 동작을 수행하는 Component Service로
구분하여 나누려했으나, 그렇게 한다면 Booking 도메인을 싹 다 갈아엎어야 하기때문에
서비스에서 서비스를 호출하는것으로 가정하여 작업 후 올려둔 상태입니다.
또 다른 대안으로 현재 지금까지 Payment, Member 를 위한 Reservation 관련 메서드들은 전부 Repository 메서드를
간접적으로 호출하는 단순한 구조입니다.
각 서비스에서 Reservation, SeatReservation, Ticket 레포지토리를 직접 주입하여 바로 사용하는건 어떨까 합니다.
서비스 아키텍처를 어떻게 가져가야할지 고민이네요.
MemberService의memberDelete메서드에서 Member 인스턴스를 사용하고 있기 때문에Member 인스턴스를 통해 Reservation 들을 삭제하도록 구현했습니다.
임의로 컨트롤러를 생성하여 테스트 한 결과
Reservation,SeatReservation,Ticket모두 삭제되는것을 확인했습니다.만약 해당 PR을 사용한다고 하신다면, Merge 전
memberDelete메서드를 제가 업데이트하도록 하겠습니다.추가 정보
서비스를 어떻게 나누면 좋을 지 관련한 블로그 게시물입니다.
PR 작성 체크리스트 (필수)