Skip to content

refactor: 예약 시간 판단·장부 방향 부호·알림 상태를 모델로 옮긴다 - #164

Merged
ff1451 merged 11 commits into
mainfrom
refactor/domain-logic-to-model
Oct 18, 2026
Merged

ff1451 merged 11 commits into
mainfrom
refactor/domain-logic-to-model

Conversation

@ff1451

@ff1451 ff1451 commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

요약

무엇을 어디서 → 어디로
예약 구간 겹침 판단 ReservationService.overlapsExisting의 람다 → Reservation.overlaps(start, end)
예약 시작 여부 ReservationService.hasStarted의 날짜·분 계산 → Reservation.hasStartedAt(now) (시간대 변환은 Clock을 가진 서비스에 남깁니다)
입금 +, 출금 − ImportSequencer·DuesCalculator에 따로 있던 삼항식 → EntryType.signed(amount)
회비 알림 상태 문자열 "IN_PROGRESS"·"SENT" 등 문자열 비교 → NotificationBatchStatus·NotificationRecipientStatus enum
  • enum 값은 V26 체크 제약(ck_dues_notification_*_status)과 같습니다. DB에는 여전히 같은 문자열로 저장되고, 스키마 변경은 없습니다.
  • 동작 변경은 없습니다.

테스트

  • 새 단위 테스트(컨테이너 없음)
    • ReservationTest: 맞닿은 구간은 겹치지 않음, 시작 시각과 같으면 시작한 것으로 봄 등 경계값
    • EntryTypeTest
  • 로컬: 위 테스트와 DuesCalculatorTest, ShinhanXlsxParserTest 통과
  • 통합 테스트(예약·회비 알림): CI

머지 순서

#148~#157 머지 후 main으로 rebase하고 ready로 바꿉니다. 이 PR의 변경은 마지막 커밋 하나입니다. #162와 ReservationService가 겹치지만 서로 다른 줄입니다.

ff1451 added 10 commits October 18, 2026 21:52
…into chore/merge-train

# Conflicts:
#	src/main/java/com/bcsdlab/bcsdinternalapiv2/curriculum/service/AdminCurriculumService.java
- Reservation.overlaps(start, end), hasStartedAt(now): 서비스에 있던 구간 겹침·시작 여부 계산을 엔티티로 옮긴다.
- EntryType.signed(amount): ImportSequencer·DuesCalculator에 따로 있던 입금 +, 출금 - 계산을 하나로 모은다.
- 회비 알림 발송 건·회원별 상태 문자열("IN_PROGRESS"/"DONE", "PENDING"/"SENT"/"FAILED")을
  NotificationBatchStatus·NotificationRecipientStatus enum으로 바꾼다. 값은 V26 체크 제약과 같아 저장 형식은 그대로다.
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 7 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0aeabe96-a401-47c8-8fcd-5102aaa4198c
📥 Commits

Reviewing files that changed from the base of the PR and between dd4c3d0 and 9ecd358.

📒 Files selected for processing: 12
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/ledger/model/EntryType.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/ledger/model/NotificationBatchStatus.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/ledger/model/NotificationRecipientStatus.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/ledger/repository/DuesNotificationRepository.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/ledger/service/DuesCalculator.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/ledger/service/DuesNotificationService.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/ledger/service/DuesNotificationWriter.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/ledger/service/ImportSequencer.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/reservation/model/Reservation.java
  • src/main/java/com/bcsdlab/bcsdinternalapiv2/reservation/service/ReservationService.java
  • src/test/java/com/bcsdlab/bcsdinternalapiv2/ledger/model/EntryTypeTest.java
  • src/test/java/com/bcsdlab/bcsdinternalapiv2/reservation/model/ReservationTest.java
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ff1451
ff1451 merged commit df082a2 into main Oct 18, 2026
3 checks passed
@ff1451
ff1451 deleted the refactor/domain-logic-to-model branch October 18, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant