workflow_approval/models/approval_instance.json
2026-04-17 11:07:49 +08:00

137 lines
3.5 KiB
JSON

{
"summary": [
{
"name": "approval_instance",
"title": "审批实例",
"primary": "id",
"catelog": "entity"
}
],
"fields": [
{
"name": "id",
"title": "ID",
"type": "str",
"length": 32,
"nullable": "no",
"comments": "主键UUID"
},
{
"name": "workflow_id",
"title": "工作流ID",
"type": "str",
"length": 32,
"nullable": "no",
"comments": "关联的工作流定义"
},
{
"name": "module_type",
"title": "模块类型",
"type": "str",
"length": 50,
"nullable": "no",
"comments": "customer/opportunity/contract/financial"
},
{
"name": "module_record_id",
"title": "模块记录ID",
"type": "str",
"length": 32,
"nullable": "no",
"comments": "关联的具体业务记录ID"
},
{
"name": "current_step_id",
"title": "当前步骤ID",
"type": "str",
"length": 32,
"nullable": "yes",
"comments": "当前待审批的步骤"
},
{
"name": "status",
"title": "状态",
"type": "str",
"length": 20,
"nullable": "no",
"comments": "pending/approved/rejected/cancelled"
},
{
"name": "initiator_id",
"title": "发起人ID",
"type": "str",
"length": 32,
"nullable": "no",
"comments": "审批发起人用户ID"
},
{
"name": "title",
"title": "标题",
"type": "str",
"length": 200,
"nullable": "no",
"comments": "审批标题"
},
{
"name": "description",
"title": "描述",
"type": "str",
"length": 1000,
"nullable": "yes",
"comments": "审批详细描述"
},
{
"name": "org_id",
"title": "组织ID",
"type": "str",
"length": 32,
"nullable": "no",
"comments": "多租户组织隔离"
},
{
"name": "created_at",
"title": "创建时间",
"type": "timestamp",
"nullable": "no",
"comments": "创建时间"
},
{
"name": "completed_at",
"title": "完成时间",
"type": "timestamp",
"nullable": "yes",
"comments": "完成时间"
}
],
"indexes": [
{
"name": "idx_instance_workflow",
"idxtype": "index",
"idxfields": ["workflow_id"]
},
{
"name": "idx_instance_module",
"idxtype": "index",
"idxfields": ["module_type", "module_record_id"]
},
{
"name": "idx_instance_status",
"idxtype": "index",
"idxfields": ["status"]
},
{
"name": "idx_instance_org",
"idxtype": "index",
"idxfields": ["org_id"]
}
],
"codes": [
{
"field": "status",
"table": "appcodes",
"valuefield": "k",
"textfield": "v",
"cond": "codetype='APPROVAL_STATUS'"
}
]
}