-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: 커리큘럼 응답에 상태 필드 추가 #733
feat: 커리큘럼 응답에 상태 필드 추가 #733
Conversation
Walkthrough
Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Job Summary for GradleCheck Style and Test to Develop :: build-test
|
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: 0
Outside diff range, codebase verification and nitpick comments (1)
src/main/java/com/gdschongik/gdsc/domain/study/dto/response/StudyCurriculumResponse.java (1)
Line range hint
10-27
: 코드 개선 제안현재 구현은 PR 목표를 달성하고 있지만, 다음과 같은 개선을 고려해 볼 수 있습니다:
curriculumStatus
의 의미와 가능한 값에 대한 간단한 주석을 추가하는 것이 좋습니다.StudyStatus
가 null일 경우를 처리하는 방법을 고려해 보세요. 예를 들어,Optional
을 사용하거나 기본값을 설정할 수 있습니다.다음과 같은 변경을 고려해 보세요:
public record StudyCurriculumResponse( Long studyDetailId, Period period, Long week, String title, String description, Difficulty difficulty, + // 커리큘럼의 현재 상태를 나타냅니다 (예: 진행 중, 완료됨 등) StudyStatus curriculumStatus) { public static StudyCurriculumResponse from(StudyDetail studyDetail) { Curriculum curriculum = studyDetail.getCurriculum(); return new StudyCurriculumResponse( studyDetail.getId(), studyDetail.getPeriod(), studyDetail.getWeek(), curriculum.getTitle(), curriculum.getDescription(), curriculum.getDifficulty(), + Optional.ofNullable(curriculum.getStatus()).orElse(StudyStatus.NOT_STARTED)); } }이 변경은
curriculumStatus
에 대한 설명을 추가하고, null 값을 처리하는 방법을 제안합니다.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/main/java/com/gdschongik/gdsc/domain/study/dto/response/StudyCurriculumResponse.java (2 hunks)
Additional comments not posted (3)
src/main/java/com/gdschongik/gdsc/domain/study/dto/response/StudyCurriculumResponse.java (3)
6-6
: 새로운 import 추가 확인
StudyStatus
import가 추가되었습니다. 이는 새로운curriculumStatus
필드를 위한 것으로 보입니다.
10-16
: 레코드 선언 업데이트 확인
StudyCurriculumResponse
레코드에curriculumStatus
필드가 추가되었습니다. 이는 PR 목표와 일치합니다.
26-27
:from
메서드 업데이트 확인
from
메서드가 새로운curriculumStatus
필드를 포함하도록 업데이트되었습니다.curriculum.getStatus()
를 사용하여 값을 설정하고 있습니다.
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.
lgtm
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.
LGTM
🌱 관련 이슈
📌 작업 내용 및 특이사항
📝 참고사항
📚 기타
Summary by CodeRabbit
curriculumStatus
가 추가되어, 커리큘럼에 대한 추가 정보를 제공합니다.StudyCurriculumResponse
의 정적 메서드가 업데이트되어 커리큘럼 상태를 올바르게 처리합니다.