feat:增加训练场和错题集接口
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel
|
||||
from typing import List
|
||||
|
||||
|
||||
18
schemas/mistake.py
Normal file
18
schemas/mistake.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class MistakeResponse(BaseModel):
|
||||
id: int
|
||||
subject: str
|
||||
module: str
|
||||
name: str
|
||||
type: str
|
||||
question: str
|
||||
options: List[str]
|
||||
answer: List[str]
|
||||
wrongCount: int
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
38
schemas/practice.py
Normal file
38
schemas/practice.py
Normal file
@@ -0,0 +1,38 @@
|
||||
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
|
||||
Reference in New Issue
Block a user