# -*- coding: utf-8 -*- from typing import List, Dict from pydantic import BaseModel, Field from schemas.base import ListMixin class QuestionItem(BaseModel): id: int = Field(..., description="试题ID") qno: str = Field(..., description="题号") sqno: str = Field(..., description="子题号") imgs: str = Field(..., description="试题图片URL") answer: str = Field(..., description="试题答案") analysis: str = Field(..., description="试题分析") stuff_imgs: str = Field(..., description="试题材料URL") class Config: orm_mode = True anystr_strip_whitespace = True class QuestionAnalysisItem(BaseModel): answer: QuestionItem dist: List[Dict[str, int]] = [] class QuestionList(ListMixin): data: List[QuestionAnalysisItem] = []