SurfSense/surfsense_backend/app/schemas/chunks.py

21 lines
343 B
Python
Raw Normal View History

from pydantic import BaseModel, ConfigDict
2025-03-14 18:53:14 -07:00
from .base import IDModel, TimestampModel
2025-03-14 18:53:14 -07:00
class ChunkBase(BaseModel):
content: str
document_id: int
2025-03-14 18:53:14 -07:00
class ChunkCreate(ChunkBase):
pass
2025-03-14 18:53:14 -07:00
class ChunkUpdate(ChunkBase):
pass
2025-03-14 18:53:14 -07:00
class ChunkRead(ChunkBase, IDModel, TimestampModel):
model_config = ConfigDict(from_attributes=True)