Skip to content

Conversation

@lepitaaar
Copy link
Contributor

@lepitaaar lepitaaar commented Jan 15, 2026

#️⃣연관된 이슈

#1045

📝작업 내용

Award의 타입을 변경하였습니다
기존

class Award {
    String semester,
    List<String> achivements
}

변경 후

class Award {
    int year,
    SemesterTerm semesterTerm,
    List<String> achivements
}

year 의 허용 범위는 1900~2050 입니다

Type of SemesterTerm

enum SemesterTerm {
    FIRST,
    SECOND
}

SemesterTerm은

const SemesterTerm = {
    FIRST: 'FIRST',
    SECOND: 'SECOND'
} as const

로 정의해서 사용하시면될꺼같습니다~

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

Summary by CodeRabbit

릴리스 노트

  • 업데이트된 기능
    • 동아리 수상 정보의 학기 표현을 하나의 문자열에서 연도와 학기 구분으로 분리하여 보다 명확하게 표시 및 입력할 수 있습니다.
    • 연도 입력에 범위 검증이 추가되어 잘못된 연도 입력을 방지합니다.

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

@lepitaaar lepitaaar self-assigned this Jan 15, 2026
@lepitaaar lepitaaar added 🔨 Refactor 코드 리팩토링 💾 BE Backend labels Jan 15, 2026
@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
moadong Ready Ready Preview, Comment Jan 15, 2026 1:23am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 15, 2026

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "**" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

ClubAward의 기존 semester 문자열 필드를 제거하고 정수형 year 및 열거형 semesterTerm으로 분리하여 엔티티와 DTO 매핑을 변경합니다. (성과 목록은 변경 없음)

Changes

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

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ 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%. 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 65f8d62 and 76e4eef.

📒 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!

SemesterTerm enum과 @Range 검증 어노테이션 import가 적절하게 추가되었습니다.


17-20: LGTM!

null 체크 후 엔티티 필드를 올바르게 매핑하고 있습니다.


22-28: LGTM!

yearsemesterTerm 필드가 빌더 패턴을 통해 엔티티로 정확하게 변환됩니다.

✏️ 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.

❤️ Share

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

@github-actions
Copy link

github-actions bot commented Jan 15, 2026

Test Results

75 tests   72 ✅  17s ⏱️
14 suites   3 💤
14 files     0 ❌

Results for commit 76e4eef.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@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: 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입니다. 현재 int primitive 타입은 기본값이 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 7932434 and 65f8d62.

📒 Files selected for processing (2)
  • backend/src/main/java/moadong/club/entity/ClubAward.java
  • 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
  • backend/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.

Copy link
Member

@seongwon030 seongwon030 left a comment

Choose a reason for hiding this comment

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

타입 분리 수고하셨습니다

@seongwon030 seongwon030 merged commit 8072b54 into develop/be Jan 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💾 BE Backend 🔨 Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants