Some checks failed
continuous-integration/drone/push Build is failing
- Add Vue 3 frontend with Element Plus - Implement login, dashboard, tenant management - Add app configuration, logs viewer, stats pages - Add user management for admins - Update Drone CI to build and deploy frontend - Frontend ports: 3001 (test), 4001 (prod)
32 lines
1.1 KiB
Python
32 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)
|
|
|
|
# 鉴权配置
|
|
token_secret = Column(String(64))
|
|
token_required = Column(SmallInteger, default=0)
|
|
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)
|