From 31f43e12d107aa0858aafeba58d3fc44cf2cf131 Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期三, 15 一月 2025 16:47:04 +0800
Subject: [PATCH] 修改密码接口增加密码保护
---
app/models/session_model.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/app/models/session_model.py b/app/models/session_model.py
index 9536471..b7fae97 100644
--- a/app/models/session_model.py
+++ b/app/models/session_model.py
@@ -1,11 +1,17 @@
import json
from datetime import datetime
from enum import IntEnum
+
+import pytz
from sqlalchemy import Column, String, Enum as SQLAlchemyEnum, Integer, DateTime, JSON, TEXT
-from app.models import AgentType, current_time
+from app.models.agent_model import AgentType
+# from app.models import current_time
from app.models.base_model import Base
+def current_time():
+ tz = pytz.timezone('Asia/Shanghai')
+ return datetime.now(tz)
class SessionModel(Base):
__tablename__ = "sessions"
@@ -17,6 +23,7 @@
update_date = Column(DateTime, default=current_time, onupdate=current_time) # 鏇存柊鏃堕棿锛岄粯璁ゅ�间负褰撳墠鏃跺尯鏃堕棿锛屾洿鏂版椂鑷姩鏇存柊
tenant_id = Column(Integer) # 鍒涘缓浜�
message = Column(TEXT) # 璇存槑
+ conversation_id = Column(String(64))
# to_dict 鏂规硶
def to_dict(self):
--
Gitblit v1.8.0