24 lines
368 B
Python
24 lines
368 B
Python
from typing import List
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class MistakeRequest(BaseModel):
|
|
subject: str
|
|
module: str
|
|
name: str
|
|
type: str
|
|
question: str
|
|
options: List[str]
|
|
answer: List[str]
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class MistakeResponse(MistakeRequest):
|
|
id: int
|
|
|
|
class Config:
|
|
from_attributes = True
|