Skip to content

Conversation

@sosow0212
Copy link
Contributor

@sosow0212 sosow0212 commented Nov 30, 2025

📄 작업 내용

Reservation 생성

  • Reservation, ReservationSlot 생성 (Package와 ReservationTimeslot, PacakgeTag|Products 의 생명주기 일치, Reservation은 ReservationSlot 의존 관계. 따라서 추후 패키지가 제거될 때 Event를 통해 Reservation 제거 필요)
  • 예약시 동시성 문제 해결을 위해 비관적락 사용 (단일 인스턴스, 단일 DB이기 때문에 비관적락 사용했고, 추후 확장시 분산락이 필요할 것 같아요!)
  • 패키지 도메인에서 Tag 제거 및 package_tag만 사용하도록 변경 (생명주기 패키지와 동일)
  • 도메인 테스트 추가

루트 애그리거트로 Pacakge, Reservation이 되도록 수정했습니다! 피그마 기획보고 정책 + 누락되어 보이는 정책을 테스트로 추가했습니다. 확인 부탁드릴게요~

그리고 Package 생성 시에 ReservationSlot도 기획서에 맞게 09:00 ~ 16:00 한 시간 단위로 추가되게 만들었습니다. (단, dto에 시간 값을 넣는 경우 해당 값에 맞게 설정)

🙋🏻 이슈 / 궁금증 / 추가사항

close #9

@sosow0212 sosow0212 requested a review from gustj3104 November 30, 2025 08:19
@sosow0212 sosow0212 self-assigned this Nov 30, 2025
@sosow0212 sosow0212 added the feat 기능 추가 label Nov 30, 2025
Copy link
Contributor

@gustj3104 gustj3104 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!
궁금한 점이 서비스에서 domain의 Repository 인터페이스를 통해 save를 호출하게 되면 런타임에는 infrastructure의 구현체(JpaRepository 등)을 통해서 실제 DB 저장이 이루어지는 구조로 이해하는 게 맞을까요??

Comment on lines 75 to 76
startHour: Int = 9,
endHour: Int = 16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

시작시간, 종료시간을 상수로 선언하고, createWithTimeSlots의 slotStartHour, slotEndHour에도 같이 사용하는 건 어떤가요??

val packageId: Long,
val reservationSlotId: Long, // 예약 가능한 타임슬롯 id
val userId: Long,
val headCount: Int, // 인원 수
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

인원 수, 예약 요청 메시지는 피그마 상으로는 예약 시에 입력받고 있는 것 같지 않은데 어떤 방식으로 입력받는 건가요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앗 그러네요 예약 요청 메시지 같은 게 보통 있어서 관성적으로 추가한 것 같은데 제거하겠습니다.

@sosow0212
Copy link
Contributor Author

수고하셨습니다! 궁금한 점이 서비스에서 domain의 Repository 인터페이스를 통해 save를 호출하게 되면 런타임에는 infrastructure의 구현체(JpaRepository 등)을 통해서 실제 DB 저장이 이루어지는 구조로 이해하는 게 맞을까요??

넵넵 가급적 domain 패키지안에는 pojo를 유지하고(jpa를 사용하니 일단 jpa가 pojo는 아니지만 논외로), infrastructure안에서 외부 라이브러리나 구현체를 확장해서 두는 걸 선호하고 있습니다!

@sosow0212 sosow0212 merged commit 9e3f132 into develop Dec 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

일정 / 예약 도메인 추가

3 participants