sub_distributors添加sub_distributorid(org_id)字段+唯一索引,对齐sub_resellers
This commit is contained in:
parent
8bb688374c
commit
bfd691f9ac
@ -304,6 +304,7 @@ CREATE TABLE sub_distributors
|
|||||||
|
|
||||||
`id` VARCHAR(32) NOT NULL comment '主键ID',
|
`id` VARCHAR(32) NOT NULL comment '主键ID',
|
||||||
`resellerid` VARCHAR(32) NOT NULL comment '所属主分销商机构ID',
|
`resellerid` VARCHAR(32) NOT NULL comment '所属主分销商机构ID',
|
||||||
|
`sub_distributorid` VARCHAR(32) NOT NULL comment '二级分销商机构ID',
|
||||||
`sub_dist_name` VARCHAR(255) NOT NULL comment '二级分销商名称',
|
`sub_dist_name` VARCHAR(255) NOT NULL comment '二级分销商名称',
|
||||||
`contact_person` VARCHAR(100) comment '联系人',
|
`contact_person` VARCHAR(100) comment '联系人',
|
||||||
`contact_phone` VARCHAR(50) comment '联系电话',
|
`contact_phone` VARCHAR(50) comment '联系电话',
|
||||||
@ -330,6 +331,7 @@ comment '二级分销商表'
|
|||||||
;
|
;
|
||||||
|
|
||||||
CREATE INDEX sub_distributors_idx_sd_reseller ON sub_distributors(resellerid);
|
CREATE INDEX sub_distributors_idx_sd_reseller ON sub_distributors(resellerid);
|
||||||
|
CREATE UNIQUE INDEX sub_distributors_idx_sd_sub_distributorid ON sub_distributors(resellerid,sub_distributorid);
|
||||||
CREATE INDEX sub_distributors_idx_sd_manager ON sub_distributors(managed_by);
|
CREATE INDEX sub_distributors_idx_sd_manager ON sub_distributors(managed_by);
|
||||||
|
|
||||||
-- ./platform_supply_relations.json
|
-- ./platform_supply_relations.json
|
||||||
|
|||||||
@ -24,6 +24,14 @@
|
|||||||
"length": 32,
|
"length": 32,
|
||||||
"nullable": "no"
|
"nullable": "no"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "sub_distributorid",
|
||||||
|
"title": "二级分销商机构ID",
|
||||||
|
"type": "str",
|
||||||
|
"length": 32,
|
||||||
|
"nullable": "no",
|
||||||
|
"default": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "sub_dist_name",
|
"name": "sub_dist_name",
|
||||||
"title": "二级分销商名称",
|
"title": "二级分销商名称",
|
||||||
@ -121,6 +129,14 @@
|
|||||||
"resellerid"
|
"resellerid"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "idx_sd_sub_distributorid",
|
||||||
|
"idxtype": "unique",
|
||||||
|
"idxfields": [
|
||||||
|
"resellerid",
|
||||||
|
"sub_distributorid"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "idx_sd_manager",
|
"name": "idx_sd_manager",
|
||||||
"idxtype": "index",
|
"idxtype": "index",
|
||||||
@ -136,6 +152,12 @@
|
|||||||
"valuefield": "id",
|
"valuefield": "id",
|
||||||
"textfield": "orgname"
|
"textfield": "orgname"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"field": "sub_distributorid",
|
||||||
|
"table": "organization",
|
||||||
|
"valuefield": "id",
|
||||||
|
"textfield": "orgname"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"field": "status",
|
"field": "status",
|
||||||
"table": "appcodes_kv",
|
"table": "appcodes_kv",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user