-
Notifications
You must be signed in to change notification settings - Fork 3
[refactor] 동아리 설명 award의 semesterTerm과 year를 분리한다 #1046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[refactor] 동아리 설명 award의 semesterTerm과 year를 분리한다 #1046
Conversation
- year는 1900~2050년 사이만 가능하다
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning
|
| Cohort / File(s) | 변경 사항 |
|---|---|
Semester 필드 분리 backend/src/main/java/moadong/club/entity/ClubAward.java, backend/src/main/java/moadong/club/payload/dto/ClubAwardDto.java |
- semester(String) 필드 제거 및 year(int)와 semesterTerm(SemesterTerm) 추가- ClubAwardDto 레코드 시그니처 변경 및 검증 애노테이션(@Range) 추가- from() 팩토리 메서드와 toEntity() 매핑 업데이트- SemesterTerm import 추가 |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related issues
- [refactor] MOA-521 동아리 설명 award의 semester와 year를 분리한다 #1045 — ClubAward의
semester필드를year와semesterTerm으로 분리하는 변경과 직접적으로 일치합니다.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | PR 제목이 주요 변경사항을 명확하게 반영하고 있습니다. semester 필드를 year와 semesterTerm으로 분리하는 리팩토링이 정확하게 전달됩니다. |
| Linked Issues check | ✅ Passed | PR의 코드 변경사항이 MOA-521의 주요 요구사항을 충족합니다. ClubAward 엔티티와 ClubAwardDto에서 semester를 year(int)와 semesterTerm(SemesterTerm)으로 분리 구현되었습니다. |
| Out of Scope Changes check | ✅ Passed | 모든 변경사항이 semester/year 필드 분리 리팩토링의 범위 내에 있습니다. 관련 없는 변경사항이나 추가 수정은 없습니다. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
- 📝 Generate docstrings
📜 Recent review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
backend/src/main/java/moadong/club/payload/dto/ClubAwardDto.java
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-30T05:26:41.788Z
Learnt from: alsdddk
Repo: Moadong/moadong PR: 765
File: backend/src/main/java/moadong/club/service/ClubApplyService.java:431-435
Timestamp: 2025-09-30T05:26:41.788Z
Learning: In the Moadong codebase's club application feature (backend/src/main/java/moadong/club/), multiple ClubApplicationForm entities can have ACTIVE status for the same clubId, semesterYear, and semesterTerm simultaneously. There is no uniqueness constraint requiring only one ACTIVE form per semester.
Applied to files:
backend/src/main/java/moadong/club/payload/dto/ClubAwardDto.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: test
🔇 Additional comments (3)
backend/src/main/java/moadong/club/payload/dto/ClubAwardDto.java (3)
5-6: LGTM!
SemesterTermenum과@Range검증 어노테이션 import가 적절하게 추가되었습니다.
17-20: LGTM!null 체크 후 엔티티 필드를 올바르게 매핑하고 있습니다.
22-28: LGTM!
year와semesterTerm필드가 빌더 패턴을 통해 엔티티로 정확하게 변환됩니다.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
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 @coderabbitai help to get the list of available commands and usage tips.
Test Results75 tests 72 ✅ 17s ⏱️ Results for commit 76e4eef. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@backend/src/main/java/moadong/club/payload/dto/ClubAwardDto.java`:
- Around line 9-14: The ClubAwardDto record is missing validation on year and
semesterTerm; add bean validation annotations to the record components: annotate
the year component with `@Min`(1900) and `@Max`(2050) to enforce the allowed range,
and annotate the semesterTerm component with `@NotNull` to prevent null input;
update imports to use the correct javax/jakarta.validation constraints and
ensure the List<@Size(max = 100) String> component remains unchanged.
🧹 Nitpick comments (1)
backend/src/main/java/moadong/club/entity/ClubAward.java (1)
17-19: PR 목표에 명시된 year 범위 검증이 누락되었습니다.PR 목표에 따르면 year의 허용 범위는 1900 ~ 2050입니다. 현재
intprimitive 타입은 기본값이 0이며, 이는 유효 범위 밖입니다. 또한semesterTerm에 대한 null 검증도 고려해야 합니다.♻️ 검증 어노테이션 추가 제안
+import jakarta.validation.constraints.Max; +import jakarta.validation.constraints.Min; +import jakarta.validation.constraints.NotNull; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import moadong.club.enums.SemesterTerm; import java.util.List; `@Getter` `@Builder` `@AllArgsConstructor` `@NoArgsConstructor` public class ClubAward { + `@Min`(1900) + `@Max`(2050) private int year; + `@NotNull` private SemesterTerm semesterTerm; private List<String> achievements; }
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
backend/src/main/java/moadong/club/entity/ClubAward.javabackend/src/main/java/moadong/club/payload/dto/ClubAwardDto.java
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-30T05:26:41.788Z
Learnt from: alsdddk
Repo: Moadong/moadong PR: 765
File: backend/src/main/java/moadong/club/service/ClubApplyService.java:431-435
Timestamp: 2025-09-30T05:26:41.788Z
Learning: In the Moadong codebase's club application feature (backend/src/main/java/moadong/club/), multiple ClubApplicationForm entities can have ACTIVE status for the same clubId, semesterYear, and semesterTerm simultaneously. There is no uniqueness constraint requiring only one ACTIVE form per semester.
Applied to files:
backend/src/main/java/moadong/club/payload/dto/ClubAwardDto.javabackend/src/main/java/moadong/club/entity/ClubAward.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: test
🔇 Additional comments (2)
backend/src/main/java/moadong/club/payload/dto/ClubAwardDto.java (2)
15-18: from() 메서드의 null 처리가 적절합니다.null 체크 후 early return 패턴을 사용하여 안전하게 처리하고 있습니다.
20-26: toEntity() 매핑 로직이 정확합니다.Builder 패턴을 사용하여 year, semesterTerm, achievements 필드를 올바르게 매핑하고 있습니다.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
seongwon030
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
타입 분리 수고하셨습니다
#️⃣연관된 이슈
#1045
📝작업 내용
Award의 타입을 변경하였습니다기존
변경 후
year 의 허용 범위는 1900~2050 입니다
Type of SemesterTerm
SemesterTerm은
로 정의해서 사용하시면될꺼같습니다~
중점적으로 리뷰받고 싶은 부분(선택)
논의하고 싶은 부분(선택)
🫡 참고사항
Summary by CodeRabbit
릴리스 노트
✏️ Tip: You can customize this high-level summary in your review settings.