import os from datetime import timedelta class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess' SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:Asdf123!@localhost/system' SQLALCHEMY_TRACK_MODIFICATIONS = False # JWT 配置 JWT_SECRET_KEY = 'your-secret-key' # 在生产环境中使用更安全的密钥 JWT_ACCESS_TOKEN_EXPIRES = timedelta(hours=1) JWT_REFRESH_TOKEN_EXPIRES = timedelta(days=30)