added docs
This commit is contained in:
@@ -372,8 +372,11 @@ class Document(Base):
|
||||
user_id: Mapped[int] = mapped_column(ForeignKey("users.id", ondelete="CASCADE"), index=True)
|
||||
title: Mapped[str] = mapped_column(String(255), default="")
|
||||
filename: Mapped[str] = mapped_column(String(255), default="")
|
||||
mime_type: Mapped[str] = mapped_column(String(128), default="")
|
||||
content_hash: Mapped[str] = mapped_column(String(64), default="", index=True)
|
||||
size_bytes: Mapped[int] = mapped_column(Integer, default=0)
|
||||
chunk_count: Mapped[int] = mapped_column(Integer, default=0)
|
||||
index_status: Mapped[str] = mapped_column(String(32), default="indexed")
|
||||
created_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), server_default=func.now()
|
||||
)
|
||||
@@ -394,5 +397,13 @@ class DocumentChunk(Base):
|
||||
)
|
||||
chunk_index: Mapped[int] = mapped_column(Integer, default=0)
|
||||
content: Mapped[str] = mapped_column(Text, default="")
|
||||
source_filename: Mapped[str] = mapped_column(String(255), default="")
|
||||
mime_type: Mapped[str] = mapped_column(String(128), default="")
|
||||
page_start: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
page_end: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
section_title: Mapped[str] = mapped_column(String(500), default="")
|
||||
section_path: Mapped[str] = mapped_column(Text, default="")
|
||||
paragraph_index: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
source_ref: Mapped[str] = mapped_column(String(500), default="")
|
||||
|
||||
document: Mapped["Document"] = relationship(back_populates="chunks")
|
||||
|
||||
Reference in New Issue
Block a user