Procházet zdrojové kódy

更新 'models/knowledge_base.py'

许国洋 před 8 měsíci
rodič
revize
cbc219c398
1 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. 4 2
      models/knowledge_base.py

+ 4 - 2
models/knowledge_base.py

@@ -12,7 +12,7 @@ from sqlalchemy.orm import relationship
 class KnowledgeFile(Base):
     __tablename__ = 'knowledge_file'
 
-    id = Column(Integer, primary_key=True)
+    id = Column(Integer, primary_key=True, autoincrement=True, comment="id")
     file_identifier = Column(String(50), unique=True, nullable=False, comment='文件唯一标识符')
     file_path = Column(Text, nullable=False, comment='文件路径')
     file_name = Column(String(255), nullable=False, comment='文件名字')
@@ -26,7 +26,9 @@ class KnowledgeFile(Base):
 
 class KnowledgeBase(Base):
     __tablename__ = 'knowledge_base'
-    reportId = Column(String(255), primary_key=True)
+    id = Column(Integer, primary_key=True, autoincrement=True, comment="id")
+    reportId = Column(String(255),comment='报告ID')
+    reportUid = Column(String(255),comment='报告UUID')
     reportName = Column(String(400), comment='报告名称')
     subject = Column(String(100), comment='主题词')
     eventType = Column(String(10), comment='事件类型')