update user table

This commit is contained in:
2026-05-17 22:35:05 +08:00
parent 8940876694
commit a4c30b0557
3 changed files with 10 additions and 1 deletions
+5
View File
@@ -14,3 +14,8 @@ preset:
- "app/models/user.py" - "app/models/user.py"
- "app/utils/s3.py" - "app/utils/s3.py"
- "app/auth.py" - "app/auth.py"
db_model:
- "app/models/*"
- "app/db.py"
- "app/auth.py"
+2
View File
@@ -17,3 +17,5 @@ wheels/
.DS_Store .DS_Store
.git .git
prompts/
+2
View File
@@ -9,6 +9,8 @@ class User(Base, AutoID):
google_id = Column(String, unique=True, index=True) google_id = Column(String, unique=True, index=True)
email = Column(String, unique=True, index=True) email = Column(String, unique=True, index=True)
name = Column(String) name = Column(String)
# 类似 Twitter 的 @code 唯一标识
handle = Column(String, unique=True, index=True, nullable=True)
avatar = Column(String) avatar = Column(String)
created_at = Column(DateTime(timezone=True), server_default=func.now()) created_at = Column(DateTime(timezone=True), server_default=func.now())