2024-05-25 16:11:52 +04:00
|
|
|
from typing import Optional
|
|
|
|
from pydantic import BaseModel, ConfigDict
|
2024-06-02 15:51:14 +04:00
|
|
|
from datetime import datetime
|
2024-05-25 16:11:52 +04:00
|
|
|
|
2024-05-25 16:51:34 +04:00
|
|
|
class SQuestionAdd(BaseModel):
|
2024-06-02 15:51:14 +04:00
|
|
|
email_user: str
|
2024-05-25 16:51:34 +04:00
|
|
|
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-06-02 15:51:14 +04:00
|
|
|
question_time: datetime
|
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
|