You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.5 KiB
36 lines
1.5 KiB
from sqlalchemy import Column, Integer, String, DateTime, Boolean, Text
|
|
from config.database import Base
|
|
from datetime import datetime
|
|
|
|
|
|
class AiChatHistory(Base):
|
|
"""
|
|
菜单权限表
|
|
"""
|
|
__tablename__ = 'ai_chat_history'
|
|
|
|
chatId = Column(String(50), primary_key=True, comment='问答id')
|
|
sessionId = Column(String(50), default='', comment='聊天记录id')
|
|
sessionName = Column(String(50), default='', comment='聊天记录标题')
|
|
type = Column(String(50), default='', comment='类型,问题 or 回答')
|
|
isEnd = Column(Boolean, default=None, comment='是否结束')
|
|
isStop = Column(Boolean, default=None, comment='是否停止')
|
|
user = Column(Integer, default=None, comment='所属用户')
|
|
time = Column(String(50), default=None, comment='问答时间')
|
|
content = Column(Text, default=None, comment='问答内容')
|
|
operate = Column(String(50), default=None, comment='点赞,差评等操作')
|
|
thumbDownReason = Column(String(255), default=None, comment='差评原因')
|
|
file = Column(String(255), default=None, comment='文件id集合')
|
|
|
|
|
|
class AiChatSession(Base):
|
|
"""
|
|
菜单权限表
|
|
"""
|
|
__tablename__ = 'ai_chat_session'
|
|
|
|
sessionId = Column(String(50), primary_key=True, comment='聊天记录id')
|
|
sessionName = Column(String(50), default='', comment='聊天记录标题')
|
|
user = Column(Integer, default=None, comment='所属用户')
|
|
time = Column(String(50), default=None, comment='问答时间')
|
|
|
|
|