From b093c446193ae8158be1905d8c0a009f0f68dff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E5=A4=A7?= Date: Fri, 20 Mar 2026 20:34:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4last=5Flogin=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=98=A0=E5=B0=84=E4=BB=A5=E9=80=82=E9=85=8DA?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/models/models.py | 2 +- start.sh | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 start.sh diff --git a/backend/app/models/models.py b/backend/app/models/models.py index 6a3b975..e857f99 100644 --- a/backend/app/models/models.py +++ b/backend/app/models/models.py @@ -25,7 +25,7 @@ class User(Base): bio = Column(Text, nullable=True) password = Column(String(255), nullable=False) role = Column(String(50), default="user") - last_login = Column(DateTime(timezone=True), nullable=True) # 最后登录时间 + # last_login = Column(DateTime(timezone=True), nullable=True) f99_92_created_at = Column(DateTime(timezone=True), server_default=func.now()) f99_93_updated_at = Column(DateTime(timezone=True), onupdate=func.now()) diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..c6dcf0a --- /dev/null +++ b/start.sh @@ -0,0 +1,12 @@ +#!/bin/bash +cd /root/jiachenlong/backend +export DATABASE_URL=postgresql://caibot:caibot123@47.98.171.101:5432/zodiac +export SECRET_KEY=production-secret-key-a-env +export OSS_ACCESS_KEY_ID=LTAI5t6HUnpFBLEK9194kPVG +export OSS_ACCESS_KEY_SECRET=LEr4Q8yRxb8D5b24cKfCwlt4MMoke1 +export SMS_ACCESS_KEY_ID=LTAI5tQAx5niD7JQVqGE5acE +export SMS_ACCESS_KEY_SECRET=QsQFAEKBkaNynIoKyvdIi3BUyWVZu1 +export SMS_SIGN_NAME=苏州算力 +export SMS_TEMPLATE_CODE=SMS_501590956 +nohup python3 -m uvicorn app.main:app --host 0.0.0.0 --port 3000 > /tmp/uvicorn.log 2>&1 & +echo "后端服务已启动"