DocumentModel

class DocumentModel(Base):
    __tablename__ = "document_table"

    document_id = Column(Integer, primary_key=True, autoincrement=True)
    knowledge_id = Column(Integer, comment="Knowledge base ID," nullable = False)
    knowledge_name = Column(String, comment="Knowledge base name")
    document_name = Column(String, comment="Document name")
    document_file_path = Column(String, comment="Document path")
    create_time = Column(DateTime, comment="Creation time", default = datetime.datetime.utcnow)
    __table_args__ = (
        UniqueConstraint('knowledge_id', 'document_name', name="knowledge_id"),
        {"sqlite_autoincrement": True}
    )