refactor(models): convert to json format per database-table-definition-spec
This commit is contained in:
parent
805f7fc94f
commit
dc1fa5e753
@ -3,7 +3,9 @@
|
||||
{
|
||||
"name": "contract",
|
||||
"title": "合同表",
|
||||
"primary": "id"
|
||||
"primary": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
@ -17,7 +19,7 @@
|
||||
},
|
||||
{
|
||||
"name": "contract_number",
|
||||
"title": "合同编号",
|
||||
"title": "合同编号",
|
||||
"type": "str",
|
||||
"length": 50,
|
||||
"nullable": "no",
|
||||
@ -190,17 +192,23 @@
|
||||
{
|
||||
"name": "idx_contract_number",
|
||||
"idxtype": "unique",
|
||||
"idxfields": ["contract_number"]
|
||||
"idxfields": [
|
||||
"contract_number"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_contract_org",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["org_id"]
|
||||
"idxfields": [
|
||||
"org_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_contract_status",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["status"]
|
||||
"idxtype": "index",
|
||||
"idxfields": [
|
||||
"status"
|
||||
]
|
||||
}
|
||||
],
|
||||
"codes": [
|
||||
|
||||
@ -3,7 +3,9 @@
|
||||
{
|
||||
"name": "contract_ai_config",
|
||||
"title": "AI配置表",
|
||||
"primary": "id"
|
||||
"primary": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
@ -58,7 +60,9 @@
|
||||
{
|
||||
"name": "idx_ai_config_org",
|
||||
"idxtype": "unique",
|
||||
"idxfields": ["org_id"]
|
||||
"idxfields": [
|
||||
"org_id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -3,7 +3,9 @@
|
||||
{
|
||||
"name": "contract_attachment",
|
||||
"title": "合同附件表",
|
||||
"primary": "id"
|
||||
"primary": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
@ -98,17 +100,24 @@
|
||||
{
|
||||
"name": "idx_attachment_contract",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["contract_id"]
|
||||
"idxfields": [
|
||||
"contract_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_attachment_org",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["org_id"]
|
||||
"idxfields": [
|
||||
"org_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_attachment_version",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["file_name", "version"]
|
||||
"idxfields": [
|
||||
"file_name",
|
||||
"version"
|
||||
]
|
||||
}
|
||||
],
|
||||
"codes": [
|
||||
|
||||
@ -3,7 +3,9 @@
|
||||
{
|
||||
"name": "contract_milestones",
|
||||
"title": "合同里程碑管理表",
|
||||
"primary": "id",
|
||||
"primary": [
|
||||
"id"
|
||||
],
|
||||
"catelog": "relation"
|
||||
}
|
||||
],
|
||||
@ -107,17 +109,23 @@
|
||||
{
|
||||
"name": "idx_milestones_contract",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["contract_id"]
|
||||
"idxfields": [
|
||||
"contract_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_milestones_status",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["status"]
|
||||
"idxfields": [
|
||||
"status"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_milestones_planned",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["planned_date"]
|
||||
"idxfields": [
|
||||
"planned_date"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -3,7 +3,9 @@
|
||||
{
|
||||
"name": "contract_versions",
|
||||
"title": "合同版本管理表",
|
||||
"primary": "id",
|
||||
"primary": [
|
||||
"id"
|
||||
],
|
||||
"catelog": "relation"
|
||||
}
|
||||
],
|
||||
@ -82,17 +84,25 @@
|
||||
{
|
||||
"name": "idx_contract_versions_contract",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["contract_id"]
|
||||
"idxfields": [
|
||||
"contract_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_contract_versions_version",
|
||||
"idxtype": "unique",
|
||||
"idxfields": ["contract_id", "version_number"]
|
||||
"idxfields": [
|
||||
"contract_id",
|
||||
"version_number"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_contract_versions_current",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["contract_id", "is_current"]
|
||||
"idxfields": [
|
||||
"contract_id",
|
||||
"is_current"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -3,7 +3,9 @@
|
||||
{
|
||||
"name": "order_payments",
|
||||
"title": "订单付款记录表",
|
||||
"primary": "id",
|
||||
"primary": [
|
||||
"id"
|
||||
],
|
||||
"catelog": "relation"
|
||||
}
|
||||
],
|
||||
@ -99,17 +101,23 @@
|
||||
{
|
||||
"name": "idx_payments_order",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["order_id"]
|
||||
"idxfields": [
|
||||
"order_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_payments_status",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["status"]
|
||||
"idxfields": [
|
||||
"status"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_payments_date",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["payment_date"]
|
||||
"idxfields": [
|
||||
"payment_date"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -3,7 +3,9 @@
|
||||
{
|
||||
"name": "orders",
|
||||
"title": "订单表",
|
||||
"primary": "id",
|
||||
"primary": [
|
||||
"id"
|
||||
],
|
||||
"catelog": "entity"
|
||||
}
|
||||
],
|
||||
@ -150,27 +152,37 @@
|
||||
{
|
||||
"name": "idx_orders_number",
|
||||
"idxtype": "unique",
|
||||
"idxfields": ["order_number"]
|
||||
"idxfields": [
|
||||
"order_number"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_orders_contract",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["contract_id"]
|
||||
"idxfields": [
|
||||
"contract_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_orders_customer",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["customer_id"]
|
||||
"idxfields": [
|
||||
"customer_id"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_orders_status",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["status"]
|
||||
"idxfields": [
|
||||
"status"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "idx_orders_owner",
|
||||
"idxtype": "index",
|
||||
"idxfields": ["owner_id"]
|
||||
"idxfields": [
|
||||
"owner_id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user