Repository navigation
Conversation
📝 WalkthroughWalkthrough
Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@codin-ticketing-api/src/main/java/inu/codin/codinticketingapi/domain/admin/entity/Event.java`:
- Around line 167-169: updateEventTime 메서드가 `@Column`(nullable = false)인 eventTime
필드에 null을 바로 대입해 검증을 flush 시점까지 지연하므로, updateEventTime(LocalDateTime eventTime)
내부에서 즉시 null 방어를 추가해 null 입력 시 IllegalArgumentException(또는
NullPointerException)으로 즉시 예외를 던지도록 변경하세요; 대상은 메서드 updateEventTime과 필드
eventTime입니다.
In
`@codin-ticketing-api/src/main/java/inu/codin/codinticketingapi/domain/admin/service/EventAdminService.java`:
- Around line 224-226: Before changing the event to ACTIVE and updating times,
validate that the event's end time is in the future: check
findEvent.getEventEndTime() (or the domain property representing event end)
against LocalDateTime.now() and if eventEndTime.isBefore(now) ||
eventEndTime.isEqual(now) throw a validation exception (e.g.
IllegalStateException or a domain-specific exception) to prevent reopening
expired events; only when the check passes call
findEvent.updateStatus(EventStatus.ACTIVE),
findEvent.updateEventTime(LocalDateTime.now()), and then
eventStatusScheduler.deleteOpenEventScheduler(eventId). Ensure the guard is
added in the method performing these calls (the block that currently calls
findEvent.updateStatus/updateEventTime and
eventStatusScheduler.deleteOpenEventScheduler).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3df2f4d0-4a06-4055-936d-15cdc0142705
📒 Files selected for processing (2)
codin-ticketing-api/src/main/java/inu/codin/codinticketingapi/domain/admin/entity/Event.javacodin-ticketing-api/src/main/java/inu/codin/codinticketingapi/domain/admin/service/EventAdminService.java
#️⃣ 연관된 이슈
📝 작업 내용
스크린샷 (선택)
💬 리뷰 요구사항(선택)
Summary by CodeRabbit
릴리스 노트