
- Add requirements.txt file to git - Add project files to git - Fix linting issues in task.py and env.py - Update SQLAlchemy queries to use 'not' instead of '== False' - Fix import ordering in env.py
17 lines
625 B
Python
17 lines
625 B
Python
from typing import Generic, List, Optional, TypeVar
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
T = TypeVar('T')
|
|
|
|
|
|
class PaginationParams(BaseModel):
|
|
skip: int = Field(0, ge=0, description="Number of items to skip")
|
|
limit: int = Field(100, gt=0, le=1000, description="Maximum number of items to return")
|
|
|
|
|
|
class PaginatedResponse(BaseModel, Generic[T]):
|
|
items: List[T] = Field(..., description="List of items")
|
|
total: int = Field(..., description="Total number of items")
|
|
skip: int = Field(..., description="Number of items skipped")
|
|
limit: int = Field(..., description="Maximum number of items returned") |