38 lines
665 B
Python
38 lines
665 B
Python
from typing import List
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from schemas.library import QuestionRequest
|
|
|
|
|
|
class PracticeRecordRequest(BaseModel):
|
|
libraryFileId: int
|
|
totalCount: int
|
|
correctCount: int
|
|
wrongCount: int
|
|
|
|
|
|
class PracticeRecordResponse(PracticeRecordRequest):
|
|
id: int
|
|
createTime: str
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class PracticeQuestionResponse(QuestionRequest):
|
|
id: int
|
|
select: List[str]
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class PracticeCheckResult(BaseModel):
|
|
id: int
|
|
answer: List[str]
|
|
select: List[str]
|
|
isCorrect: bool
|
|
|
|
class Config:
|
|
from_attributes = True |