2024-05-25 16:11:52 +04:00
|
|
|
from typing import Optional
|
|
|
|
from pydantic import BaseModel, ConfigDict
|
|
|
|
|
2024-05-25 16:51:34 +04:00
|
|
|
class SQuestionAdd(BaseModel):
|
|
|
|
id_user: int
|
|
|
|
type_question: bool
|
|
|
|
question: str
|
2024-05-25 16:11:52 +04:00
|
|
|
|
2024-05-25 16:51:34 +04:00
|
|
|
class SQuestion(SQuestionAdd):
|
2024-05-25 16:11:52 +04:00
|
|
|
id: int
|
2024-05-25 16:51:34 +04:00
|
|
|
answer: Optional[str] = None
|
2024-05-25 16:11:52 +04:00
|
|
|
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
|
2024-05-25 16:51:34 +04:00
|
|
|
class SQuestionId(BaseModel):
|
2024-05-25 16:11:52 +04:00
|
|
|
ok: bool = True
|
2024-05-25 16:51:34 +04:00
|
|
|
question_id: int
|