22 lines
489 B
Python
22 lines
489 B
Python
from typing import Optional
|
|
from pydantic import BaseModel, ConfigDict
|
|
from datetime import datetime
|
|
from enums import TypeMood, TypeModel
|
|
|
|
class SQuestionAdd(BaseModel):
|
|
email_user: str
|
|
type_mood: TypeMood
|
|
type_model: TypeModel
|
|
question: str
|
|
|
|
class SQuestion(SQuestionAdd):
|
|
id: int
|
|
answer: Optional[str] = None
|
|
question_time: datetime
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
class SQuestionId(BaseModel):
|
|
ok: bool = True
|
|
question_id: int
|