refactor: Refactor storage system (#937)

This commit is contained in:
Fangyin Cheng
2023-12-15 16:35:45 +08:00
committed by GitHub
parent a1e415d68d
commit aed1c3fb2b
55 changed files with 3780 additions and 680 deletions

View File

@@ -0,0 +1,14 @@
from typing import TypeVar, Generic, List
from dbgpt._private.pydantic import BaseModel, Field
T = TypeVar("T")
class PaginationResult(BaseModel, Generic[T]):
"""Pagination result"""
items: List[T] = Field(..., description="The items in the current page")
total_count: int = Field(..., description="Total number of items")
total_pages: int = Field(..., description="total number of pages")
page: int = Field(..., description="Current page number")
page_size: int = Field(..., description="Number of items per page")