121 lines
2.9 KiB
JSON
121 lines
2.9 KiB
JSON
{
|
|
"table_name": "approval_instance",
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(32)",
|
|
"not_null": true,
|
|
"comment": "主键ID"
|
|
},
|
|
{
|
|
"name": "workflow_id",
|
|
"type": "varchar(32)",
|
|
"not_null": true,
|
|
"comment": "工作流ID"
|
|
},
|
|
{
|
|
"name": "business_type",
|
|
"type": "varchar(50)",
|
|
"not_null": true,
|
|
"comment": "业务类型: contract/customer/opportunity"
|
|
},
|
|
{
|
|
"name": "business_id",
|
|
"type": "varchar(64)",
|
|
"not_null": true,
|
|
"comment": "业务记录ID"
|
|
},
|
|
{
|
|
"name": "current_step",
|
|
"type": "int",
|
|
"comment": "当前步骤号"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar(20)",
|
|
"comment": "状态: pending/approved/rejected/cancelled"
|
|
},
|
|
{
|
|
"name": "initiator_id",
|
|
"type": "varchar(32)",
|
|
"comment": "发起人ID"
|
|
},
|
|
{
|
|
"name": "org_id",
|
|
"type": "varchar(32)",
|
|
"comment": "组织ID"
|
|
},
|
|
{
|
|
"name": "initiated_at",
|
|
"type": "timestamp",
|
|
"comment": "发起时间"
|
|
},
|
|
{
|
|
"name": "completed_at",
|
|
"type": "timestamp",
|
|
"comment": "完成时间"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx_instance_workflow",
|
|
"type": "normal",
|
|
"idxfields": [
|
|
"workflow_id"
|
|
],
|
|
"idxtype": "index"
|
|
},
|
|
{
|
|
"name": "idx_instance_business",
|
|
"type": "normal",
|
|
"comment": "复合索引:按业务类型和记录查询",
|
|
"idxfields": [
|
|
"business_type",
|
|
"business_id"
|
|
],
|
|
"idxtype": "index"
|
|
},
|
|
{
|
|
"name": "idx_instance_status",
|
|
"type": "normal",
|
|
"idxfields": [
|
|
"status"
|
|
],
|
|
"idxtype": "index"
|
|
},
|
|
{
|
|
"name": "idx_instance_initiator",
|
|
"type": "normal",
|
|
"idxfields": [
|
|
"initiator_id"
|
|
],
|
|
"idxtype": "index"
|
|
}
|
|
],
|
|
"codes": [
|
|
{
|
|
"key": "pending",
|
|
"name": "审批中"
|
|
},
|
|
{
|
|
"key": "approved",
|
|
"name": "已通过"
|
|
},
|
|
{
|
|
"key": "rejected",
|
|
"name": "已驳回"
|
|
},
|
|
{
|
|
"key": "cancelled",
|
|
"name": "已取消"
|
|
}
|
|
],
|
|
"summary": [
|
|
{
|
|
"name": "approval_instance",
|
|
"title": "审批实例",
|
|
"primary": "id",
|
|
"catelog": "entity"
|
|
}
|
|
]
|
|
} |