fix: standardize summary format to list with primary=id in all models
This commit is contained in:
parent
8c2ffa87d8
commit
eab031e502
@ -1,90 +1,100 @@
|
||||
{
|
||||
"summary": {
|
||||
"name": "dashboard_config",
|
||||
"label": "仪表板配置",
|
||||
"comment": "统一仪表板配置信息"
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"title": "ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "主键UUID"
|
||||
},
|
||||
{
|
||||
"name": "dashboard_name",
|
||||
"title": "仪表板名称",
|
||||
"type": "str",
|
||||
"length": 100,
|
||||
"nullable": false,
|
||||
"comments": "仪表板显示名称"
|
||||
},
|
||||
{
|
||||
"name": "dashboard_type",
|
||||
"title": "仪表板类型",
|
||||
"type": "str",
|
||||
"length": 50,
|
||||
"nullable": false,
|
||||
"comments": "sales/finance/customer/executive"
|
||||
},
|
||||
{
|
||||
"name": "config_json",
|
||||
"title": "配置JSON",
|
||||
"type": "str",
|
||||
"length": 2000,
|
||||
"nullable": false,
|
||||
"comments": "仪表板布局和组件配置"
|
||||
},
|
||||
{
|
||||
"name": "is_default",
|
||||
"title": "是否默认",
|
||||
"type": "str",
|
||||
"length": 1,
|
||||
"nullable": false,
|
||||
"comments": "Y/N"
|
||||
},
|
||||
{
|
||||
"name": "org_id",
|
||||
"title": "组织ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "多租户组织隔离"
|
||||
},
|
||||
{
|
||||
"name": "created_by",
|
||||
"title": "创建人",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "创建用户ID"
|
||||
},
|
||||
{
|
||||
"name": "created_at",
|
||||
"title": "创建时间",
|
||||
"type": "timestamp",
|
||||
"nullable": false,
|
||||
"comments": "创建时间"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"name": "idx_dashboard_org",
|
||||
"idxtype": "index",
|
||||
"fields": ["org_id"]
|
||||
},
|
||||
{
|
||||
"name": "idx_dashboard_type",
|
||||
"idxtype": "index",
|
||||
"fields": ["dashboard_type"]
|
||||
},
|
||||
{
|
||||
"name": "uk_dashboard_name_org",
|
||||
"idxtype": "unique",
|
||||
"fields": ["dashboard_name", "org_id"]
|
||||
}
|
||||
],
|
||||
"codes": []
|
||||
"summary": [
|
||||
{
|
||||
"name": "dashboard_config",
|
||||
"title": "仪表板配置",
|
||||
"primary": "id",
|
||||
"catelog": "entity"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"title": "ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "主键UUID"
|
||||
},
|
||||
{
|
||||
"name": "dashboard_name",
|
||||
"title": "仪表板名称",
|
||||
"type": "str",
|
||||
"length": 100,
|
||||
"nullable": false,
|
||||
"comments": "仪表板显示名称"
|
||||
},
|
||||
{
|
||||
"name": "dashboard_type",
|
||||
"title": "仪表板类型",
|
||||
"type": "str",
|
||||
"length": 50,
|
||||
"nullable": false,
|
||||
"comments": "sales/finance/customer/executive"
|
||||
},
|
||||
{
|
||||
"name": "config_json",
|
||||
"title": "配置JSON",
|
||||
"type": "str",
|
||||
"length": 2000,
|
||||
"nullable": false,
|
||||
"comments": "仪表板布局和组件配置"
|
||||
},
|
||||
{
|
||||
"name": "is_default",
|
||||
"title": "是否默认",
|
||||
"type": "str",
|
||||
"length": 1,
|
||||
"nullable": false,
|
||||
"comments": "Y/N"
|
||||
},
|
||||
{
|
||||
"name": "org_id",
|
||||
"title": "组织ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "多租户组织隔离"
|
||||
},
|
||||
{
|
||||
"name": "created_by",
|
||||
"title": "创建人",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "创建用户ID"
|
||||
},
|
||||
{
|
||||
"name": "created_at",
|
||||
"title": "创建时间",
|
||||
"type": "timestamp",
|
||||
"nullable": false,
|
||||
"comments": "创建时间"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"name": "idx_dashboard_org",
|
||||
"idxtype": "index",
|
||||
"fields": [
|
||||
"org_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_dashboard_type",
|
||||
"idxtype": "index",
|
||||
"fields": [
|
||||
"dashboard_type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "uk_dashboard_name_org",
|
||||
"idxtype": "unique",
|
||||
"fields": [
|
||||
"dashboard_name",
|
||||
"org_id"
|
||||
]
|
||||
}
|
||||
],
|
||||
"codes": []
|
||||
}
|
||||
@ -1,109 +1,116 @@
|
||||
{
|
||||
"summary": {
|
||||
"name": "report_template",
|
||||
"label": "报表模板",
|
||||
"comment": "统一报表模板定义"
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"title": "ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "主键UUID"
|
||||
},
|
||||
{
|
||||
"name": "template_name",
|
||||
"title": "模板名称",
|
||||
"type": "str",
|
||||
"length": 100,
|
||||
"nullable": false,
|
||||
"comments": "报表模板名称"
|
||||
},
|
||||
{
|
||||
"name": "report_type",
|
||||
"title": "报表类型",
|
||||
"type": "str",
|
||||
"length": 50,
|
||||
"nullable": false,
|
||||
"comments": "sales/finance/customer/contract"
|
||||
},
|
||||
{
|
||||
"name": "sql_query",
|
||||
"title": "SQL查询",
|
||||
"type": "str",
|
||||
"length": 2000,
|
||||
"nullable": false,
|
||||
"comments": "报表数据查询SQL"
|
||||
},
|
||||
{
|
||||
"name": "columns_config",
|
||||
"title": "列配置",
|
||||
"type": "str",
|
||||
"length": 1000,
|
||||
"nullable": true,
|
||||
"comments": "JSON格式的列配置"
|
||||
},
|
||||
{
|
||||
"name": "filters_config",
|
||||
"title": "过滤器配置",
|
||||
"type": "str",
|
||||
"length": 1000,
|
||||
"nullable": true,
|
||||
"comments": "JSON格式的过滤器配置"
|
||||
},
|
||||
{
|
||||
"name": "chart_config",
|
||||
"title": "图表配置",
|
||||
"type": "str",
|
||||
"length": 1000,
|
||||
"nullable": true,
|
||||
"comments": "JSON格式的图表配置"
|
||||
},
|
||||
{
|
||||
"name": "org_id",
|
||||
"title": "组织ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "多租户组织隔离"
|
||||
},
|
||||
{
|
||||
"name": "created_by",
|
||||
"title": "创建人",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "创建用户ID"
|
||||
},
|
||||
{
|
||||
"name": "created_at",
|
||||
"title": "创建时间",
|
||||
"type": "timestamp",
|
||||
"nullable": false,
|
||||
"comments": "创建时间"
|
||||
},
|
||||
{
|
||||
"name": "is_active",
|
||||
"title": "是否激活",
|
||||
"type": "str",
|
||||
"length": 1,
|
||||
"nullable": false,
|
||||
"comments": "Y/N"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"name": "idx_template_org",
|
||||
"idxtype": "index",
|
||||
"fields": ["org_id"]
|
||||
},
|
||||
{
|
||||
"name": "idx_template_type",
|
||||
"idxtype": "index",
|
||||
"fields": ["report_type"]
|
||||
}
|
||||
],
|
||||
"codes": []
|
||||
"summary": [
|
||||
{
|
||||
"name": "report_template",
|
||||
"title": "报表模板",
|
||||
"primary": "id",
|
||||
"catelog": "entity"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"title": "ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "主键UUID"
|
||||
},
|
||||
{
|
||||
"name": "template_name",
|
||||
"title": "模板名称",
|
||||
"type": "str",
|
||||
"length": 100,
|
||||
"nullable": false,
|
||||
"comments": "报表模板名称"
|
||||
},
|
||||
{
|
||||
"name": "report_type",
|
||||
"title": "报表类型",
|
||||
"type": "str",
|
||||
"length": 50,
|
||||
"nullable": false,
|
||||
"comments": "sales/finance/customer/contract"
|
||||
},
|
||||
{
|
||||
"name": "sql_query",
|
||||
"title": "SQL查询",
|
||||
"type": "str",
|
||||
"length": 2000,
|
||||
"nullable": false,
|
||||
"comments": "报表数据查询SQL"
|
||||
},
|
||||
{
|
||||
"name": "columns_config",
|
||||
"title": "列配置",
|
||||
"type": "str",
|
||||
"length": 1000,
|
||||
"nullable": true,
|
||||
"comments": "JSON格式的列配置"
|
||||
},
|
||||
{
|
||||
"name": "filters_config",
|
||||
"title": "过滤器配置",
|
||||
"type": "str",
|
||||
"length": 1000,
|
||||
"nullable": true,
|
||||
"comments": "JSON格式的过滤器配置"
|
||||
},
|
||||
{
|
||||
"name": "chart_config",
|
||||
"title": "图表配置",
|
||||
"type": "str",
|
||||
"length": 1000,
|
||||
"nullable": true,
|
||||
"comments": "JSON格式的图表配置"
|
||||
},
|
||||
{
|
||||
"name": "org_id",
|
||||
"title": "组织ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "多租户组织隔离"
|
||||
},
|
||||
{
|
||||
"name": "created_by",
|
||||
"title": "创建人",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "创建用户ID"
|
||||
},
|
||||
{
|
||||
"name": "created_at",
|
||||
"title": "创建时间",
|
||||
"type": "timestamp",
|
||||
"nullable": false,
|
||||
"comments": "创建时间"
|
||||
},
|
||||
{
|
||||
"name": "is_active",
|
||||
"title": "是否激活",
|
||||
"type": "str",
|
||||
"length": 1,
|
||||
"nullable": false,
|
||||
"comments": "Y/N"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"name": "idx_template_org",
|
||||
"idxtype": "index",
|
||||
"fields": [
|
||||
"org_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_template_type",
|
||||
"idxtype": "index",
|
||||
"fields": [
|
||||
"report_type"
|
||||
]
|
||||
}
|
||||
],
|
||||
"codes": []
|
||||
}
|
||||
@ -1,70 +1,78 @@
|
||||
{
|
||||
"summary": {
|
||||
"name": "user_dashboard",
|
||||
"label": "用户仪表板",
|
||||
"comment": "用户个性化仪表板配置"
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"title": "ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "主键UUID"
|
||||
},
|
||||
{
|
||||
"name": "user_id",
|
||||
"title": "用户ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "关联用户"
|
||||
},
|
||||
{
|
||||
"name": "dashboard_config_id",
|
||||
"title": "仪表板配置ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "关联的仪表板配置"
|
||||
},
|
||||
{
|
||||
"name": "layout_json",
|
||||
"title": "布局JSON",
|
||||
"type": "str",
|
||||
"length": 2000,
|
||||
"nullable": true,
|
||||
"comments": "用户自定义布局"
|
||||
},
|
||||
{
|
||||
"name": "is_favorite",
|
||||
"title": "是否收藏",
|
||||
"type": "str",
|
||||
"length": 1,
|
||||
"nullable": false,
|
||||
"comments": "Y/N"
|
||||
},
|
||||
{
|
||||
"name": "org_id",
|
||||
"title": "组织ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "多租户组织隔离"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"name": "idx_user_dashboard_user",
|
||||
"idxtype": "unique",
|
||||
"fields": ["user_id", "dashboard_config_id"]
|
||||
},
|
||||
{
|
||||
"name": "idx_user_dashboard_org",
|
||||
"idxtype": "index",
|
||||
"fields": ["org_id"]
|
||||
}
|
||||
],
|
||||
"codes": []
|
||||
"summary": [
|
||||
{
|
||||
"name": "user_dashboard",
|
||||
"title": "用户仪表板",
|
||||
"primary": "id",
|
||||
"catelog": "entity"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"title": "ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "主键UUID"
|
||||
},
|
||||
{
|
||||
"name": "user_id",
|
||||
"title": "用户ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "关联用户"
|
||||
},
|
||||
{
|
||||
"name": "dashboard_config_id",
|
||||
"title": "仪表板配置ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "关联的仪表板配置"
|
||||
},
|
||||
{
|
||||
"name": "layout_json",
|
||||
"title": "布局JSON",
|
||||
"type": "str",
|
||||
"length": 2000,
|
||||
"nullable": true,
|
||||
"comments": "用户自定义布局"
|
||||
},
|
||||
{
|
||||
"name": "is_favorite",
|
||||
"title": "是否收藏",
|
||||
"type": "str",
|
||||
"length": 1,
|
||||
"nullable": false,
|
||||
"comments": "Y/N"
|
||||
},
|
||||
{
|
||||
"name": "org_id",
|
||||
"title": "组织ID",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": false,
|
||||
"comments": "多租户组织隔离"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"name": "idx_user_dashboard_user",
|
||||
"idxtype": "unique",
|
||||
"fields": [
|
||||
"user_id",
|
||||
"dashboard_config_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_user_dashboard_org",
|
||||
"idxtype": "index",
|
||||
"fields": [
|
||||
"org_id"
|
||||
]
|
||||
}
|
||||
],
|
||||
"codes": []
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user