29 lines
445 B
Python
29 lines
445 B
Python
from typing import List
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class RecordRequest(BaseModel):
|
|
type: str
|
|
totalCount: int
|
|
correctCount: int
|
|
wrongCount: int
|
|
|
|
|
|
class RecordResponse(RecordRequest):
|
|
id: int
|
|
createTime: str
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class CheckResult(BaseModel):
|
|
id: int
|
|
answer: List[str]
|
|
select: List[str]
|
|
isCorrect: bool
|
|
|
|
class Config:
|
|
from_attributes = True
|