Skip to content

Conversation

@zyovn
Copy link
Member

@zyovn zyovn commented Jan 3, 2026

🔗 연관된 이슈

🚀 변경 유형

  • ✨ 기능 추가 (feature)
  • 🐛 버그 수정 (fix)
  • 📝 문서 변경 (docs)
  • ♻️ 리팩토링 (refactor)
  • 🧪 테스트 추가 / 수정 (test)
  • ⚙️ 설정 변경 (chore)

📝 작업 내용

  • 사용자 일주일 생성 앨범 3개로 제한
  • 앨범 최대 사진 수 2000장으로 수정

📸 스크린샷

image

💬 리뷰 요구사항

📜 리뷰 규칙

Reviewer는 아래 P5 Rule을 참고하여 리뷰를 진행합니다.
P5 Rule을 통해 Reviewer는 Reviewee에게 리뷰의 의도를 보다 정확히 전달할 수 있습니다.

  • P1: 꼭 반영해주세요 (Comment)
  • P2: 적극적으로 고려해주세요 (Comment)
  • P3: 웬만하면 반영해 주세요 (Comment)
  • P4: 반영해도 좋고 넘어가도 좋습니다 (Approve)
  • P5: 그냥 사소한 의견입니다 (Approve)

Summary by CodeRabbit

릴리스 노트

  • 새 기능

    • 앨범당 최대 사진 업로드 용량이 2,000장으로 증가했습니다.
  • 버그 수정

    • 주간 앨범 생성 제한이 재활성화되어 사용자는 최근 7일 기준으로 주당 최대 3개의 앨범만 생성할 수 있습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@zyovn zyovn self-assigned this Jan 3, 2026
@zyovn zyovn added the ✨feature New feature or request label Jan 3, 2026
@zyovn zyovn linked an issue Jan 3, 2026 that may be closed by this pull request
2 tasks
@coderabbitai
Copy link

coderabbitai bot commented Jan 3, 2026

Walkthrough

createAlbum이 사용자 주간 생성 수(최근 7일)를 계산해 AlbumValidator.validateAlbumCreation(createdThisWeek, request)를 호출하도록 변경되고, AlbumMapper에서 새 앯범의 최대 사진 수가 300→2000으로 상향되었습니다.

Changes

코호트 / 파일 변경 사항
앨범 생성 흐름
src/main/java/com/cheeeese/album/application/AlbumService.java, src/main/java/com/cheeeese/album/application/validator/AlbumValidator.java
AlbumService가 최근 7일간 사용자 앨범 수를 계산(countUserAlbumsCreatedThisWeek 사용)하여 validateAlbumCreation(long createdThisWeek, AlbumCreationRequest)로 전달하도록 변경. Validator 시그니처 변경 및 주간 생성 한도 검증 재활성화(createdThisWeek >= 3ALBUM_CREATION_LIMIT_EXCEEDED).
앨범 매핑/제약 변경
src/main/java/com/cheeeese/album/infrastructure/mapper/AlbumMapper.java
AlbumMapper.toEntity에서 새 앨범의 최대 사진 허용 수를 300에서 2000으로 증가.

Sequence Diagram(s)

(생성/검증 흐름이 단순하여 시퀀스 다이어그램은 생략합니다.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers

  • dahyun24

Poem

🐰 바삭한 발로 코드를 밟으며,
지난 7일을 세고 또 세어,
세개의 문턱을 맞추었네.
사진은 더 늘리고, 규칙은 다시 깨어나니,
치즈같이 기쁜 업데이트야! 🧀

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 변경사항의 주요 내용을 정확하게 반영합니다. 앨범 생성 제한(주간 3개) 도입과 최대 사진 수(2000장) 수정이라는 두 가지 핵심 변경을 명확하게 요약합니다.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 521073d and cededf2.

📒 Files selected for processing (1)
  • src/main/java/com/cheeeese/album/application/AlbumService.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/com/cheeeese/album/application/AlbumService.java

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/main/java/com/cheeeese/album/application/AlbumService.java (1)

274-280: 시간 범위 계산 오류로 인한 잘못된 주간 제한

종료 시간 계산에 LocalTime.now()를 사용하여 의도한 것보다 긴 기간을 조회하고 있습니다.

문제점:

  • 현재 구현: 다음 주 월요일 + 현재 시각까지 조회
  • 예시: 금요일 오후 2시에 실행 시
    • 시작: 이번 주 월요일 00:00:00
    • 종료: 다음 주 월요일 14:00:00
    • 실제 조회 범위: 8일 14시간 (7일이 아님)

영향:

  • 사용자가 이번 주에 생성한 앨범 수를 정확히 계산하지 못함
  • 주간 제한이 의도대로 작동하지 않을 수 있음
🔎 제안하는 수정 방안
 private long countUserAlbumsCreatedThisWeek(User user) {
     return albumRepository.countByUserAndCreatedAtBetween(
             user.getId(),
             LocalDate.now().with(DayOfWeek.MONDAY).atTime(LocalTime.MIN),
-            LocalDate.now().with(DayOfWeek.MONDAY).plusWeeks(1).atTime(LocalTime.now())
+            LocalDate.now().with(DayOfWeek.MONDAY).plusWeeks(1).atTime(LocalTime.MIN)
     );
 }

또는 더 명확하게:

 private long countUserAlbumsCreatedThisWeek(User user) {
+    LocalDateTime startOfWeek = LocalDate.now().with(DayOfWeek.MONDAY).atTime(LocalTime.MIN);
+    LocalDateTime startOfNextWeek = startOfWeek.plusWeeks(1);
     return albumRepository.countByUserAndCreatedAtBetween(
             user.getId(),
-            LocalDate.now().with(DayOfWeek.MONDAY).atTime(LocalTime.MIN),
-            LocalDate.now().with(DayOfWeek.MONDAY).plusWeeks(1).atTime(LocalTime.now())
+            startOfWeek,
+            startOfNextWeek
     );
 }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4f40cf3 and 521073d.

📒 Files selected for processing (3)
  • src/main/java/com/cheeeese/album/application/AlbumService.java
  • src/main/java/com/cheeeese/album/application/validator/AlbumValidator.java
  • src/main/java/com/cheeeese/album/infrastructure/mapper/AlbumMapper.java
🔇 Additional comments (3)
src/main/java/com/cheeeese/album/infrastructure/mapper/AlbumMapper.java (1)

37-37: 변경사항 확인 완료

앨범당 최대 사진 개수를 2000장으로 증가시킨 변경이 PR 목표와 일치합니다.

src/main/java/com/cheeeese/album/application/validator/AlbumValidator.java (1)

29-29: 주간 앨범 생성 제한 로직 검증 완료

메서드 시그니처 변경과 주간 생성 제한 검증 로직(createdThisWeek >= 3)이 올바르게 구현되었습니다. 예외 처리도 적절합니다.

Also applies to: 50-52

src/main/java/com/cheeeese/album/application/AlbumService.java (1)

74-76: 검증 로직 통합 확인

주간 앨범 생성 개수를 계산하고 검증자에 전달하는 로직이 올바르게 구현되었습니다. 단, countUserAlbumsCreatedThisWeek 메서드의 정확성에 의존합니다.

Copy link
Contributor

@dahyun24 dahyun24 left a comment

Choose a reason for hiding this comment

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

구웃!

@zyovn zyovn merged commit 1d44fd7 into develop Jan 6, 2026
1 check passed
@zyovn zyovn deleted the feat/#106-photo-max branch January 6, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 사진 생성 제한 및 최대 사진 수 수정

3 participants