refactor(models): convert to json format per database-table-definition-spec
This commit is contained in:
parent
3bb53fcaf7
commit
314b4763ae
@ -3,7 +3,9 @@
|
||||
{
|
||||
"name": "customer_handover",
|
||||
"title": "客户交接表",
|
||||
"primary": "id",
|
||||
"primary": [
|
||||
"id"
|
||||
],
|
||||
"catelog": "relation"
|
||||
}
|
||||
],
|
||||
@ -119,27 +121,37 @@
|
||||
{
|
||||
"name": "idx_handover_customer",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["customer_id"]
|
||||
"idxfields": [
|
||||
"customer_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_handover_from_owner",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["from_owner_id"]
|
||||
"idxfields": [
|
||||
"from_owner_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_handover_to_owner",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["to_owner_id"]
|
||||
"idxfields": [
|
||||
"to_owner_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_handover_stage",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["current_stage"]
|
||||
"idxfields": [
|
||||
"current_stage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_handover_created",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["created_at"]
|
||||
"idxfields": [
|
||||
"created_at"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -3,7 +3,9 @@
|
||||
{
|
||||
"name": "customer_handover_items",
|
||||
"title": "客户交接项目明细表",
|
||||
"primary": "id",
|
||||
"primary": [
|
||||
"id"
|
||||
],
|
||||
"catelog": "relation"
|
||||
}
|
||||
],
|
||||
@ -75,17 +77,23 @@
|
||||
{
|
||||
"name": "idx_handover_items_handover",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["handover_id"]
|
||||
"idxfields": [
|
||||
"handover_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_handover_items_type",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["item_type"]
|
||||
"idxfields": [
|
||||
"item_type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_handover_items_item_id",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["item_id"]
|
||||
"idxfields": [
|
||||
"item_id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -3,7 +3,9 @@
|
||||
{
|
||||
"name": "customer_pool",
|
||||
"title": "客户公海池表",
|
||||
"primary": "id",
|
||||
"primary": [
|
||||
"id"
|
||||
],
|
||||
"catelog": "relation"
|
||||
}
|
||||
],
|
||||
@ -90,27 +92,37 @@
|
||||
{
|
||||
"name": "idx_pool_customer",
|
||||
"idxtype": "unique",
|
||||
"idxfields": ["customer_id"]
|
||||
"idxfields": [
|
||||
"customer_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_pool_original_owner",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["original_owner_id"]
|
||||
"idxfields": [
|
||||
"original_owner_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_pool_assigned_to",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["assigned_to"]
|
||||
"idxfields": [
|
||||
"assigned_to"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_pool_status",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["pool_status"]
|
||||
"idxfields": [
|
||||
"pool_status"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_pool_recycled",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["recycled_at"]
|
||||
"idxfields": [
|
||||
"recycled_at"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -3,7 +3,9 @@
|
||||
{
|
||||
"name": "customers",
|
||||
"title": "客户档案表",
|
||||
"primary": "id",
|
||||
"primary": [
|
||||
"id"
|
||||
],
|
||||
"catelog": "entity"
|
||||
}
|
||||
],
|
||||
@ -131,37 +133,51 @@
|
||||
{
|
||||
"name": "idx_customers_phone",
|
||||
"idxtype": "unique",
|
||||
"idxfields": ["phone"]
|
||||
"idxfields": [
|
||||
"phone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_customers_tax_id",
|
||||
"idxtype": "unique",
|
||||
"idxfields": ["tax_id"]
|
||||
"idxfields": [
|
||||
"tax_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_customers_owner",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["owner_id"]
|
||||
"idxfields": [
|
||||
"owner_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_customers_name",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["customer_name"]
|
||||
"idxfields": [
|
||||
"customer_name"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_customers_level",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["customer_level"]
|
||||
"idxfields": [
|
||||
"customer_level"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_customers_status",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["status"]
|
||||
"idxfields": [
|
||||
"status"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_customers_last_follow",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["last_follow_up"]
|
||||
"idxfields": [
|
||||
"last_follow_up"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user