feat: add models part 2

This commit is contained in:
firedotguy
2026-01-31 18:28:23 +03:00
parent a388426d8d
commit 2a9f7da9a9
9 changed files with 183 additions and 48 deletions

View File

@@ -1,11 +1,13 @@
from pydantic import Field
from itd.models._text import TextObject
from itd.models.user import UserPost
class CommentShort(TextObject):
class Comment(TextObject):
likes_count: int = Field(0, alias='likesCount')
replies_count: int = Field(0, alias='repliesCount')
is_liked: bool = Field(False, alias='isLiked')
replies: list['CommentShort'] = []
replies: list['Comment'] = []
reply_to: UserPost | None = None # author of replied comment, if this comment is reply