第一次提交
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""首页概览与复习清单的 schema。"""
|
||||
from pydantic import BaseModel
|
||||
|
||||
from app.schemas.question import QuestionOut
|
||||
|
||||
|
||||
class TagStat(BaseModel):
|
||||
name: str
|
||||
count: int
|
||||
needs_review_count: int
|
||||
|
||||
|
||||
class NotebookOverview(BaseModel):
|
||||
"""首页一次拿全:知识点导航 + 待复习计数 + 最近记录。"""
|
||||
|
||||
total_notes: int
|
||||
review_count: int
|
||||
untagged_count: int
|
||||
tags: list[TagStat]
|
||||
recent: list[QuestionOut]
|
||||
|
||||
|
||||
class ReviewItem(BaseModel):
|
||||
question: QuestionOut
|
||||
# 为什么在复习清单里:手动标记 / 最近一次答错
|
||||
marked: bool
|
||||
last_wrong: bool
|
||||
wrong_count: int
|
||||
last_wrong_at: str | None
|
||||
Reference in New Issue
Block a user