Skip to content

feat: 개인 일정에 색상(color) 필드 추가 - #334

Merged
rdyjun merged 3 commits into
mainfrom
feat/schedule-color
Jun 4, 2026
Merged

feat: 개인 일정에 색상(color) 필드 추가#334
rdyjun merged 3 commits into
mainfrom
feat/schedule-color

Conversation

@rdyjun

@rdyjun rdyjun commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • MemberSchedule 엔티티에 color 컬럼 추가 (HEX 형식, #RRGGBB 또는 #RGB, 최대 7자, nullable)
  • ScheduleDetails 응답 DTO에 color 필드 포함 → 리스트/상세 조회 시 색상 반환
  • CreateMemberScheduleRequestcolor 필드 추가 및 HEX 형식 유효성 검사 (@Pattern)
  • MemberScheduleUpdateRequestcolor 필드 추가 및 HEX 형식 유효성 검사 (@Pattern)
  • MemberSchedule.toEntity(), toDetails(), update() 메서드에 color 반영

Test plan

  • POST /schedule/membercolor: "#FF5733" 포함 요청 시 정상 생성 확인
  • POST /schedule/membercolor: "invalid" 포함 요청 시 400 응답 확인
  • PATCH /schedule/member/{id} — color 수정 후 조회 시 변경 반영 확인
  • GET /schedule/{yearMonth} — 응답 DTO에 color 필드 포함 확인
  • color 미입력(null) 시 정상 처리 확인

🤖 Generated with Claude Code

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능
    • 일정에 색상을 지정할 수 있는 기능이 추가되었습니다. HEX 형식(#RRGGBB 또는 #RGB)의 색상을 지원하며, 일정 생성 및 수정 시 색상을 설정하고 변경할 수 있습니다.

- MemberSchedule 엔티티에 color 컬럼 추가 (HEX 형식, 최대 7자)
- ScheduleDetails 응답 DTO에 color 필드 포함
- 일정 생성/수정 요청 DTO에 color 필드 및 HEX 형식 유효성 검사 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@rdyjun, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 45 minutes and 37 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 72e042fe-78ce-4de0-8d4e-344e788d66b6

📥 Commits

Reviewing files that changed from the base of the PR and between d951c84 and e906460.

📒 Files selected for processing (4)
  • src/main/java/com/dongsoop/dongsoop/calendar/dto/CreateMemberScheduleRequest.java
  • src/main/java/com/dongsoop/dongsoop/calendar/dto/MemberScheduleUpdateRequest.java
  • src/main/java/com/dongsoop/dongsoop/calendar/entity/MemberSchedule.java
  • src/test/java/com/dongsoop/dongsoop/notification/CalendarNotificationSettingTest.java
📝 Walkthrough

요약

일정 엔티티에 HEX 형식 검증이 포함된 색상(color) 필드가 요청부터 응답까지 전체 스택에 걸쳐 추가되었습니다.

변경 사항

Member Schedule Color Field Support

Layer / File(s) 요약
Request DTO와 HEX 검증
src/main/java/com/dongsoop/dongsoop/calendar/dto/CreateMemberScheduleRequest.java, src/main/java/com/dongsoop/dongsoop/calendar/dto/MemberScheduleUpdateRequest.java
CreateMemberScheduleRequest와 MemberScheduleUpdateRequest에 @Pattern 검증으로 HEX 형식(#RRGGBB 또는 #RGB)을 강제하는 color 필드가 추가되고, CreateMemberScheduleRequest의 toEntity()에서 color가 엔티티 빌더에 매핑됩니다.
Entity 지속성 및 업데이트 로직
src/main/java/com/dongsoop/dongsoop/calendar/entity/MemberSchedule.java
MemberSchedule 엔티티에 @Column(name="color", length=7) 매핑을 가진 color 필드가 추가되고, update() 메서드가 요청의 color 값을 조건부로 적용합니다.
Response DTO 및 조회 매핑
src/main/java/com/dongsoop/dongsoop/calendar/dto/ScheduleDetails.java, src/main/java/com/dongsoop/dongsoop/calendar/entity/MemberSchedule.java
ScheduleDetails 응답 DTO에 color 필드가 추가되고, MemberSchedule의 toDetails() 메서드가 일정 응답에 color를 포함합니다.

예상 코드 리뷰 소요 시간

🎯 2 (Simple) | ⏱️ ~10 분

시 (Poem)

🎨 색깔 들어온 일정에
HEX 정규식 맞춰 검증하고
요청부터 저장, 응답까지
라운드트립 완성한 토끼의 솜씨! 🐰

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Description check ❓ Inconclusive PR 설명이 변경사항과 테스트 계획을 상세히 포함하고 있으나, 필수 템플릿 섹션(관련 이슈, 배경)이 누락되어 있습니다. 리포지토리의 PR 템플릿에 따라 '관련 이슈' 섹션에 이슈번호를 명시하고 '배경' 섹션을 추가하여 이 기능이 필요한 배경을 설명해 주세요.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 주요 변경사항인 '개인 일정에 색상(color) 필드 추가'를 명확하고 간결하게 설명하고 있습니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/schedule-color

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/main/java/com/dongsoop/dongsoop/calendar/entity/MemberSchedule.java (1)

53-54: member_schedule.color 컬럼 반영 방식(마이그레이션 여부) 확인

리포지토리에서 Flyway/Liquibase 의존성 및 V*__*.sql, changelog*.xml 같은 마이그레이션 리소스는 확인되지 않았고, 운영 프로필(application-prod.yml)에서도 spring.jpa.hibernate.ddl-auto: update로 스키마를 자동 변경하도록 설정돼 있습니다. 따라서 마이그레이션 누락으로 인한 즉시 SQL 오류 가능성은 낮지만, 운영 배포 시에도 동일 프로파일/설정 적용 여부와 DB 계정 권한으로 ALTER가 가능한지 확인이 필요합니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/java/com/dongsoop/dongsoop/calendar/entity/MemberSchedule.java`
around lines 53 - 54, 확인: 엔티티 필드 MemberSchedule.color가 데이터베이스에 반영되는 방법을 명확히 하세요;
현재 리포지토리에 Flyway/Liquibase 마이그레이션 파일(V*__*.sql 또는 changelog*.xml)이 없고 운영
설정(application-prod.yml)에 spring.jpa.hibernate.ddl-auto: update가 사용되므로 배포 환경에서도
같은 프로파일이 적용되는지, 운영 DB 계정이 ALTER 권한을 가지고 있는지 확인하고 문서화하세요; 권한 또는 프로파일 불확실시에는
MemberSchedule.color 컬럼 추가용 마이그레이션 스크립트(또는 changelog)를 생성하여 배포 파이프라인에 포함시키고, 배포
전 스테이징에서 적용 테스트를 수행하도록 변경하세요.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/main/java/com/dongsoop/dongsoop/calendar/entity/MemberSchedule.java`:
- Around line 53-54: 확인: 엔티티 필드 MemberSchedule.color가 데이터베이스에 반영되는 방법을 명확히 하세요;
현재 리포지토리에 Flyway/Liquibase 마이그레이션 파일(V*__*.sql 또는 changelog*.xml)이 없고 운영
설정(application-prod.yml)에 spring.jpa.hibernate.ddl-auto: update가 사용되므로 배포 환경에서도
같은 프로파일이 적용되는지, 운영 DB 계정이 ALTER 권한을 가지고 있는지 확인하고 문서화하세요; 권한 또는 프로파일 불확실시에는
MemberSchedule.color 컬럼 추가용 마이그레이션 스크립트(또는 changelog)를 생성하여 배포 파이프라인에 포함시키고, 배포
전 스테이징에서 적용 테스트를 수행하도록 변경하세요.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 87efc793-b2c3-4ceb-a290-f7036f1f5132

📥 Commits

Reviewing files that changed from the base of the PR and between 922a735 and d951c84.

📒 Files selected for processing (4)
  • src/main/java/com/dongsoop/dongsoop/calendar/dto/CreateMemberScheduleRequest.java
  • src/main/java/com/dongsoop/dongsoop/calendar/dto/MemberScheduleUpdateRequest.java
  • src/main/java/com/dongsoop/dongsoop/calendar/dto/ScheduleDetails.java
  • src/main/java/com/dongsoop/dongsoop/calendar/entity/MemberSchedule.java

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rdyjun
rdyjun merged commit 056b2e0 into main Jun 4, 2026
1 check passed
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