19 lines
334 B
Python
19 lines
334 B
Python
import datetime
|
|
from typing import Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class TaskAnswerEntity(BaseModel):
|
|
id: Optional[int] = None
|
|
answer_date: datetime.datetime
|
|
text: str
|
|
is_current: Optional[bool]
|
|
comment: Optional[str]
|
|
|
|
user_id: int
|
|
task_id: int
|
|
|
|
class Config:
|
|
from_attributes = True
|