Przeglądaj źródła

更新 'models/knowledge_base.py'

许国洋 9 miesięcy temu
rodzic
commit
6de4a084aa
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4 2
      models/knowledge_base.py

+ 4 - 2
models/knowledge_base.py

@@ -17,7 +17,8 @@ class KnowledgeFile(Base):
     file_path = Column(Text, nullable=False, comment='文件存储路径')
     file_name = Column(String(255), nullable=False, comment='文件名字')
     is_deleted = Column(Integer, default=0, comment='是否删除')
-
+    createTime = Column(DateTime, comment='创建时间')
+    updateTime = Column(DateTime, comment='更新时间')
     # 一个文件通过知识库的base_code来关联
     knowledge_base_code = Column(String(50), ForeignKey('knowledge_base.base_code'), nullable=False)
     knowledge_base = relationship("KnowledgeBase", back_populates="files")
@@ -42,7 +43,8 @@ class KnowledgeBase(Base):
     summary = Column(String(100), comment='摘要')
     # 知识类型notificationType
     notificationType = Column(String(100), comment='知识类型')
-
+    # 更新时间
+    updateTime = Column(DateTime, comment='更新时间')
     # 知识库的基础编码
     base_code = Column(String(50), unique=True, comment='知识库的基础编码')