feat: add models and enum
This commit is contained in:
17
itd/models/_text.py
Normal file
17
itd/models/_text.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from uuid import UUID
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from itd.models.user import UserPost
|
||||
|
||||
|
||||
class _TextObject(BaseModel):
|
||||
id: UUID
|
||||
content: str
|
||||
author: UserPost
|
||||
attachments: list[UUID]
|
||||
|
||||
created_at: datetime = Field(alias='createdAt')
|
||||
|
||||
model_config = {'populate_by_name': True}
|
||||
Reference in New Issue
Block a user