23 lines
351 B
Python
23 lines
351 B
Python
from typing import Any, Generic, TypeVar
|
|
|
|
from pydantic import BaseModel
|
|
|
|
T = TypeVar("T")
|
|
|
|
|
|
class ResponseModel(BaseModel):
|
|
success: bool = True
|
|
message: str = "ok"
|
|
data: Any | None = None
|
|
|
|
|
|
class Page(BaseModel, Generic[T]):
|
|
items: list[T]
|
|
total: int
|
|
page: int
|
|
page_size: int
|
|
|
|
|
|
class IdsIn(BaseModel):
|
|
ids: list[str]
|