接口跑通,基础功能全部实现

This commit is contained in:
2026-03-16 16:14:08 +08:00
parent f81aec48ca
commit 2f2d5c3795
38 changed files with 3352 additions and 1754 deletions

View File

@@ -24,7 +24,11 @@ class SharedSettings(BaseSettings):
# Cookie encryption
COOKIE_ENCRYPTION_KEY: str = "change-me-in-production"
# 微信小程序
WX_APPID: str = ""
WX_SECRET: str = ""
# Environment
ENVIRONMENT: str = "development"

View File

@@ -14,8 +14,11 @@ class User(Base):
id = Column(String(36), primary_key=True, default=lambda: str(uuid.uuid4()))
username = Column(String(50), unique=True, nullable=False, index=True)
email = Column(String(255), unique=True, nullable=False, index=True)
hashed_password = Column(String(255), nullable=False)
email = Column(String(255), unique=True, nullable=True, index=True)
hashed_password = Column(String(255), nullable=True)
wx_openid = Column(String(64), unique=True, nullable=True, index=True)
wx_nickname = Column(String(100), nullable=True)
wx_avatar = Column(String(500), nullable=True)
created_at = Column(DateTime, server_default=func.now())
is_active = Column(Boolean, default=True)