feat: add models part 4
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from uuid import UUID
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
@@ -7,4 +8,16 @@ class Pagination(BaseModel):
|
||||
limit: int = 20
|
||||
total: int | None = None
|
||||
has_more: bool = Field(True, alias='hasMore')
|
||||
next_cursor: UUID | None = Field(None, alias='nextCursor')
|
||||
next_cursor: UUID | None = Field(None, alias='nextCursor')
|
||||
|
||||
|
||||
class PostsPagintaion(BaseModel):
|
||||
limit: int = 20
|
||||
next_cursor: int = Field(1, alias='nextCursor')
|
||||
has_more: bool = Field(True, alias='hasMore')
|
||||
|
||||
|
||||
class LikedPostsPagintaion(BaseModel):
|
||||
limit: int = 20
|
||||
next_cursor: datetime | None = Field(None, alias='nextCursor')
|
||||
has_more: bool = Field(True, alias='hasMore')
|
||||
|
||||
Reference in New Issue
Block a user