All checks were successful
continuous-integration/drone/push Build is passing
- 将 token_secret 改为 access_token(长期有效) - 移除 token_required 字段,统一使用 token 验证 - 生成链接简化为 ?tid=xxx&token=xxx 格式 - 前端移除签名验证开关,链接永久有效
31 lines
1.1 KiB
Python
31 lines
1.1 KiB
Python
"""租户应用配置模型"""
|
|
from datetime import datetime
|
|
from sqlalchemy import Column, BigInteger, Integer, String, Text, SmallInteger, TIMESTAMP
|
|
from ..database import Base
|
|
|
|
|
|
class TenantApp(Base):
|
|
"""租户应用配置表"""
|
|
__tablename__ = "platform_tenant_apps"
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
tenant_id = Column(String(50), nullable=False)
|
|
app_code = Column(String(50), nullable=False, default='tools')
|
|
app_name = Column(String(100))
|
|
|
|
# 企业微信配置
|
|
wechat_corp_id = Column(String(100))
|
|
wechat_agent_id = Column(String(50))
|
|
wechat_secret_encrypted = Column(Text)
|
|
|
|
# 鉴权配置
|
|
access_token = Column(String(64)) # 访问令牌(长期有效)
|
|
allowed_origins = Column(Text) # JSON 数组
|
|
|
|
# 功能权限
|
|
allowed_tools = Column(Text) # JSON 数组
|
|
|
|
status = Column(SmallInteger, default=1)
|
|
created_at = Column(TIMESTAMP, default=datetime.now)
|
|
updated_at = Column(TIMESTAMP, default=datetime.now, onupdate=datetime.now)
|