diff --git a/json/reseller_discount_tier.json b/json/reseller_discount_tier.json new file mode 100644 index 0000000..a33880f --- /dev/null +++ b/json/reseller_discount_tier.json @@ -0,0 +1,26 @@ +{ + "tblname": "reseller_discount_tier", + "title": "阶梯折扣管理", + "params": { + "sortby": "sort_order asc", + "logined_userorgid": "resellerid", + "browserfields": { + "exclouded": ["id"], + "alters": { + "status": { + "uitype": "code", + "data": [ + {"value": "active", "text": "启用"}, + {"value": "inactive", "text": "停用"} + ] + } + } + }, + "editexclouded": ["id", "created_at", "updated_at"], + "editable": { + "new_data_url": "{{entire_url('../api/reseller_discount_tier_create.dspy')}}", + "update_data_url": "{{entire_url('../api/reseller_discount_tier_update.dspy')}}", + "delete_data_url": "{{entire_url('../api/reseller_discount_tier_delete.dspy')}}" + } + } +} diff --git a/models/discount_customer_bind.json b/models/discount_customer_bind.json index 5a15a00..c841102 100644 --- a/models/discount_customer_bind.json +++ b/models/discount_customer_bind.json @@ -24,7 +24,7 @@ }, { "name": "resellerid", - "title": "归属商户机构id", + "title": "归属分销商机构id", "type": "str", "length": 32, "nullable": "no" @@ -38,13 +38,13 @@ }, { "name": "promo_code_id", - "title": "促销码id(可空=手动分配)", + "title": "促销码id(空=非促销码方式)", "type": "str", "length": 32 }, { "name": "bind_type", - "title": "绑定方式(1=促销码 2=手动分配)", + "title": "绑定方式(1=促销码 2=手动 3=域名注册)", "type": "char", "length": 1, "default": "1", @@ -59,9 +59,9 @@ ], "indexes": [ { - "name": "idx_dcb_customer", + "name": "idx_dcb_customer_reseller", "idxtype": "unique", - "idxfields": ["customerid"] + "idxfields": ["customerid", "resellerid"] }, { "name": "idx_dcb_reseller", diff --git a/models/reseller_discount_tier.json b/models/reseller_discount_tier.json new file mode 100644 index 0000000..aad259b --- /dev/null +++ b/models/reseller_discount_tier.json @@ -0,0 +1,113 @@ +{ + "summary": [ + { + "name": "reseller_discount_tier", + "title": "分销商阶梯折扣", + "primary": ["id"], + "catelog": "entity" + } + ], + "fields": [ + { + "name": "id", + "title": "主键ID", + "type": "str", + "length": 32, + "nullable": "no" + }, + { + "name": "resellerid", + "title": "分销商机构ID", + "type": "str", + "length": 32, + "nullable": "no" + }, + { + "name": "name", + "title": "档位名称", + "type": "str", + "length": 50, + "nullable": "no" + }, + { + "name": "min_amount", + "title": "最低消费金额", + "type": "float", + "length": 18, + "dec": 2, + "nullable": "no", + "default": "0.00" + }, + { + "name": "max_amount", + "title": "最高消费金额(NULL=无上限)", + "type": "float", + "length": 18, + "dec": 2, + "nullable": "yes" + }, + { + "name": "discount_pct", + "title": "折扣百分比", + "type": "float", + "length": 5, + "dec": 2, + "nullable": "no" + }, + { + "name": "sort_order", + "title": "排序", + "type": "int", + "length": 4, + "nullable": "no", + "default": "0" + }, + { + "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_rdt_reseller_order", + "idxtype": "index", + "idxfields": ["resellerid", "sort_order"] + }, + { + "name": "idx_rdt_amount", + "idxtype": "index", + "idxfields": ["resellerid", "min_amount"] + } + ], + "codes": [ + { + "field": "resellerid", + "table": "organization", + "valuefield": "id", + "textfield": "orgname" + }, + { + "field": "status", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='discount_tier_status'" + } + ] +}