Gurucool_Test / schemas /quiz_answer.py
ashwinR's picture
Upload 245 files
b7a7f32
from typing import Optional, List, Dict, Any # noqa
from pydantic import BaseModel
from schemas import Name
class QuizAnswerBase(BaseModel):
marks_obtained: int = None
options_selected: Dict[int, Any]
quiz_id: int
student_id: int
class QuizAnswerCreate(QuizAnswerBase):
pass
class QuizAnswerUpdate(QuizAnswerBase):
marks_obtained: int = None
options_selected: Dict[int, Any] = None
quiz_id: int = None
student_id: int = None
class QuizAnswerInDBBase(QuizAnswerBase):
id: Optional[int]
class Config:
orm_mode = True
class QuizAnswerInDB(QuizAnswerInDBBase):
pass
class QuizAnswer(QuizAnswerInDBBase):
pass
class QuizAnsweronlySelected(BaseModel):
id: Optional[int]
options_selected: Dict[int, Any]
quiz_id: int
student_id: int
class Config:
orm_mode = True
class QuizAnswerwithName(BaseModel):
id: Optional[int]
marks_obtained: int
options_selected: Dict[int, Any]
quiz_id: int
student: Name
class Config:
orm_mode = True