16 lines
302 B
Python
16 lines
302 B
Python
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class SMessage(BaseModel):
|
|
message: str
|
|
image_url: Optional[str] = None
|
|
chat_id: int
|
|
user_id: int
|
|
created_at: datetime
|
|
user_avatar: str
|
|
|
|
class Config:
|
|
from_attributes = True
|