feat(backend): add Pydantic schemas
This commit is contained in:
18
backend/src/schemas/common.py
Normal file
18
backend/src/schemas/common.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class PaginationParams(BaseModel):
|
||||
"""Pagination parameters."""
|
||||
|
||||
page: int = 1
|
||||
limit: int = 20
|
||||
|
||||
|
||||
class PaginatedResponse[T](BaseModel):
|
||||
"""Generic paginated response."""
|
||||
|
||||
items: list[T]
|
||||
total: int
|
||||
page: int
|
||||
limit: int
|
||||
pages: int
|
||||
Reference in New Issue
Block a user