- tenant_domain 表: domain → resellerid 映射, UNIQUE(domain) - init.py: get_domain_by_host() 根据域名查找分销商 - index.ui: Tabular CRUD 管理界面 - load_path.py: RBAC 权限注册
93 lines
2.2 KiB
JSON
93 lines
2.2 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "tenant_domain",
|
|
"title": "租户域名",
|
|
"primary": ["id"],
|
|
"catelog": "entity"
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"title": "主键ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "domain",
|
|
"title": "域名",
|
|
"type": "str",
|
|
"length": 200,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "resellerid",
|
|
"title": "分销商机构ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "orgid",
|
|
"title": "所属平台机构ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"title": "状态",
|
|
"type": "str",
|
|
"length": 10,
|
|
"nullable": "no",
|
|
"default": "active"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"title": "创建时间",
|
|
"type": "timestamp",
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "updated_at",
|
|
"title": "更新时间",
|
|
"type": "timestamp",
|
|
"nullable": "no"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx_tenant_domain_domain",
|
|
"idxtype": "unique",
|
|
"idxfields": ["domain"]
|
|
},
|
|
{
|
|
"name": "idx_tenant_domain_reseller",
|
|
"idxtype": "index",
|
|
"idxfields": ["resellerid"]
|
|
},
|
|
{
|
|
"name": "idx_tenant_domain_orgid",
|
|
"idxtype": "index",
|
|
"idxfields": ["orgid"]
|
|
}
|
|
],
|
|
"codes": [
|
|
{
|
|
"field": "resellerid",
|
|
"table": "organization",
|
|
"valuefield": "id",
|
|
"textfield": "orgname"
|
|
},
|
|
{
|
|
"field": "status",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='domain_status'"
|
|
}
|
|
]
|
|
}
|