17 lines
283 B
Python
17 lines
283 B
Python
from typing import Generic, TypeVar
|
|
|
|
from pydantic import BaseModel
|
|
from pydantic.generics import GenericModel
|
|
|
|
T = TypeVar("T")
|
|
|
|
|
|
class PaginatedResponse(GenericModel, Generic[T]):
|
|
items: list[T]
|
|
total: int
|
|
|
|
|
|
class MessageResponse(BaseModel):
|
|
code: str
|
|
message: str
|