107 lines
2.0 KiB
JSON
107 lines
2.0 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "discount_promo_code",
|
|
"title": "促销码",
|
|
"primary": [
|
|
"id"
|
|
],
|
|
"catelog": "entity"
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"title": "促销码(即id本身)",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "marketing_id",
|
|
"title": "营销方案id(可空=纯邀请码)",
|
|
"type": "str",
|
|
"length": 32
|
|
},
|
|
{
|
|
"name": "resellerid",
|
|
"title": "所属商户机构id",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "sale_id",
|
|
"title": "生成销售id",
|
|
"type": "str",
|
|
"length": 32
|
|
},
|
|
{
|
|
"name": "code_type",
|
|
"title": "码类型(1=促销码 2=邀请码)",
|
|
"type": "char",
|
|
"length": 1,
|
|
"default": "1",
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"title": "状态",
|
|
"type": "char",
|
|
"length": 1,
|
|
"default": "1"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"title": "生成时间",
|
|
"type": "timestamp",
|
|
"nullable": "no"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx_dpc_reseller",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"resellerid"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_dpc_sale",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"sale_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_dpc_marketing",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"marketing_id"
|
|
]
|
|
}
|
|
],
|
|
"codes": [
|
|
{
|
|
"field": "marketing_id",
|
|
"table": "discount_marketing",
|
|
"valuefield": "id",
|
|
"textfield": "name",
|
|
"cond": "resellerid=[[userorgid]]"
|
|
},
|
|
{
|
|
"field": "code_type",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='promo_code_type'"
|
|
},
|
|
{
|
|
"field": "status",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='product_status'"
|
|
}
|
|
]
|
|
} |