Skip to content

Conversation

@wjdrjs00
Copy link
Collaborator

@wjdrjs00 wjdrjs00 commented Jan 12, 2026

Relatedissue 🛠

Work Description ✏️

  • Quiz 정답 제출 API 변경사항을 반영했습니다.

Screenshot 📸

  • N/A

Uncompleted Tasks 😅

  • N/A

Summary by CodeRabbit

새로운 기능

  • 퀴즈 결과에 카테고리 정보가 추가되어 일일 퀴즈와 일반 연습 등 다양한 유형의 퀴즈를 구분하여 관리할 수 있게 되었습니다. 학습 진행 상황을 카테고리별로 더욱 체계적으로 추적할 수 있습니다.

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

@wjdrjs00 wjdrjs00 self-assigned this Jan 12, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 12, 2026

Walkthrough

Quiz 정답 제출 요청 모델에 새로운 카테고리 필드를 추가하고, 도메인 모델과 요청 DTO에 해당 필드를 전파합니다. DailyQuizViewModel에서 "TODAY" 카테고리 값으로 QuizScore를 구성하여 사용합니다.

Changes

Cohort / File(s) 변경 사항
도메인 모델 확장
domain/src/main/kotlin/com/moa/app/domain/quiz/model/QuizScore.kt
category: String = "PRACTICE" 필드 추가
데이터 요청 모델 및 매퍼
data/src/main/kotlin/com/moa/app/data/quiz/model/request/QuizScoreRequest.kt
@SerialName("category") val category: String 필드 추가, toDto() 매퍼에서 카테고리 값 설정
Daily Quiz 뷰모델 통합
feature/senior/src/main/kotlin/com/moa/app/feature/senior/quiz/daily/DailyQuizViewModel.kt
QuizScore 생성 시 category = "TODAY" 파라미터 전달

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Quiz의 여정을 분류하는 마법,
TODAY와 PRACTICE, 카테고리의 경로,
데이터는 흐르고 모델은 진화하네,
작은 필드 하나, 큰 의미를 담아,
정답 제출의 새 장을 엽니다! ✨

🚥 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
Title check ✅ Passed Pull request title clearly reflects the main change: applying Quiz API changes to add a category field to the quiz score submission.
Description check ✅ Passed PR description follows the required template with all sections completed, though Work Description is brief but sufficient for the scope.
Linked Issues check ✅ Passed Code changes successfully implement the objective of issue #79: adding category field to quiz submission API across domain, data, and feature modules.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue #79 objective of reflecting quiz API changes by adding category field; no out-of-scope modifications detected.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

🧹 Nitpick comments (1)
domain/src/main/kotlin/com/moa/app/domain/quiz/model/QuizScore.kt (1)

7-7: category에 String 대신 enum 사용을 고려해 보세요.

현재 "PRACTICE", "TODAY" 등 고정된 값들이 사용되고 있습니다. QuizCategory처럼 enum 또는 sealed class로 정의하면 타입 안전성을 확보하고 잘못된 값 입력을 컴파일 타임에 방지할 수 있습니다.

♻️ enum 사용 제안
enum class QuizScoreCategory {
    PRACTICE,
    TODAY
}
 data class QuizScore(
     val totalNumber: Int,
     val correctNumber: Int,
     val type: QuizCategory,
-    val category: String = "PRACTICE",
+    val category: QuizScoreCategory = QuizScoreCategory.PRACTICE,
 )
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9bf677f and 711cadb.

📒 Files selected for processing (3)
  • data/src/main/kotlin/com/moa/app/data/quiz/model/request/QuizScoreRequest.kt
  • domain/src/main/kotlin/com/moa/app/domain/quiz/model/QuizScore.kt
  • feature/senior/src/main/kotlin/com/moa/app/feature/senior/quiz/daily/DailyQuizViewModel.kt
⏰ 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: Run Unit Tests
🔇 Additional comments (3)
data/src/main/kotlin/com/moa/app/data/quiz/model/request/QuizScoreRequest.kt (1)

12-14: LGTM!

새로운 category 필드가 올바르게 추가되었고, @SerialName 어노테이션과 toDto() 매핑이 정확하게 구현되었습니다.

feature/senior/src/main/kotlin/com/moa/app/feature/senior/quiz/daily/DailyQuizViewModel.kt (2)

207-212: LGTM!

Daily Quiz 결과 제출 시 category = "TODAY"를 올바르게 설정하고 있습니다. 이를 통해 일일 퀴즈와 연습 퀴즈를 API 레벨에서 구분할 수 있습니다.


211-211: 카테고리 값이 퀴즈 유형별로 올바르게 설정되어 있습니다.

검증 결과, 구현이 의도대로 작동하고 있습니다:

  • DailyQuizViewModel: category = "TODAY" (명시적 설정)
  • 다른 퀴즈 경로들 (연습 퀴즈): category = "PRACTICE" (기본값 사용)

QuizScore 모델의 category 필드가 "PRACTICE"를 기본값으로 가지고 있어, 일일 퀴즈와 연습 퀴즈가 적절히 구분됩니다.

@wjdrjs00 wjdrjs00 merged commit 0c71871 into develop Jan 12, 2026
4 checks passed
@wjdrjs00 wjdrjs00 deleted the refctor/78-quiz-result-api branch January 12, 2026 06:43
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.

[Refactor] Quiz 정답 제출 API 변경사항을 반영합니다.

2 participants