22 lines
344 B
Python
22 lines
344 B
Python
from typing import Generic, List, TypeVar
|
|
|
|
from pydantic import BaseModel
|
|
|
|
T = TypeVar("T")
|
|
|
|
|
|
class ListResponse(BaseModel, Generic[T]):
|
|
"""Generic list response model"""
|
|
|
|
items: List[T]
|
|
total: int
|
|
skip: int
|
|
limit: int
|
|
|
|
|
|
class StatusResponse(BaseModel):
|
|
"""Generic status response"""
|
|
|
|
success: bool
|
|
message: str
|