feat: 应用配置项定义功能
All checks were successful
continuous-integration/drone/push Build is passing

- 后端: App 模型添加 config_schema 字段,支持配置项定义
- 后端: apps API 支持 config_schema 的增删改查
- 前端: 应用管理页面支持定义配置项(text/radio/select/switch类型)
- 前端: 租户订阅页面根据应用 schema 动态渲染对应表单控件
- 支持设置选项、默认值、必填等属性
This commit is contained in:
2026-01-27 17:26:49 +08:00
parent e37466a7cc
commit cf4d6afbc8
4 changed files with 443 additions and 47 deletions

View File

@@ -18,6 +18,11 @@ class App(Base):
# [{"code": "brainstorm", "name": "头脑风暴", "path": "/brainstorm"}, ...]
tools = Column(Text)
# 配置项定义JSON 数组)- 定义租户可配置的参数
# [{"key": "industry", "label": "行业类型", "type": "radio", "options": [...], "default": "...", "required": false}, ...]
# type: text(文本) | radio(单选) | select(下拉多选) | switch(开关)
config_schema = Column(Text)
# 是否需要企微JS-SDK
require_jssdk = Column(SmallInteger, default=0) # 0-不需要 1-需要