feat: add is_chat field to board memory and task_id to approvals, update pagination and response models
This commit is contained in:
21
backend/app/schemas/pagination.py
Normal file
21
backend/app/schemas/pagination.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TypeVar
|
||||
|
||||
from fastapi import Query
|
||||
from fastapi_pagination.customization import CustomizedPage, UseParamsFields
|
||||
from fastapi_pagination.limit_offset import LimitOffsetPage
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
|
||||
# Project-wide default pagination response model.
|
||||
# - Keep `limit` / `offset` naming (matches existing API conventions).
|
||||
# - Cap list endpoints to 200 items per request (matches prior route-level constraints).
|
||||
DefaultLimitOffsetPage = CustomizedPage[
|
||||
LimitOffsetPage[T],
|
||||
UseParamsFields(
|
||||
limit=Query(200, ge=1, le=200),
|
||||
offset=Query(0, ge=0),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user