Files
item_bank/app/schemas/notebook.py
T
2026-08-01 16:50:55 +08:00

30 lines
667 B
Python

"""首页概览与复习清单的 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