mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-29 02:46:25 +02:00
Implemented serverside pagination;
Enabled searchspace file mgmt panel to use serverside pagination;
This commit is contained in:
parent
54326be56c
commit
797fe26f53
7 changed files with 374 additions and 62 deletions
|
|
@ -1,11 +1,14 @@
|
|||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
from typing import Generic, TypeVar
|
||||
|
||||
from app.db import DocumentType
|
||||
|
||||
from .chunks import ChunkRead
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
|
||||
class ExtensionDocumentMetadata(BaseModel):
|
||||
BrowsingSessionId: str
|
||||
|
|
@ -53,3 +56,8 @@ class DocumentWithChunksRead(DocumentRead):
|
|||
chunks: list[ChunkRead] = []
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
|
||||
class PaginatedResponse(BaseModel, Generic[T]):
|
||||
items: list[T]
|
||||
total: int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue