- 表名统一 dda_ 前缀(dda_approvals/dda_approval_configs),跨应用复用防冲突 - 解耦关键改动:原回调硬编码 biz_type=='content_publish' + 写 cms_content 表, 改为 register_biz_handler(biz_type, handler) 钩子分派,模块内零业务表引用 - 含 models(四段式)/json(CRUD)/9个dspy端点/load_path(any回调+9 logined)/i18n四语言 - README 覆盖凭据配置、审批模板配置、回调地址、审批节点接法(产线步骤)
115 lines
2.6 KiB
JSON
115 lines
2.6 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "dda_approvals",
|
|
"title": "审批记录表",
|
|
"primary": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"title": "主键ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "org_id",
|
|
"title": "组织ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "biz_type",
|
|
"title": "业务类型(content_publish等)",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "biz_id",
|
|
"title": "业务数据ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "title",
|
|
"title": "审批标题",
|
|
"type": "str",
|
|
"length": 255,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "applicant_id",
|
|
"title": "申请人ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "approver_id",
|
|
"title": "审批人ID",
|
|
"type": "str",
|
|
"length": 32
|
|
},
|
|
{
|
|
"name": "dingtalk_instance_id",
|
|
"title": "钉钉审批实例ID",
|
|
"type": "str",
|
|
"length": 100
|
|
},
|
|
{
|
|
"name": "status",
|
|
"title": "状态(pending/approved/rejected/cancelled)",
|
|
"type": "str",
|
|
"length": 32,
|
|
"default": "pending"
|
|
},
|
|
{
|
|
"name": "comment",
|
|
"title": "审批意见",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"title": "创建时间",
|
|
"type": "timestamp"
|
|
},
|
|
{
|
|
"name": "completed_at",
|
|
"title": "完成时间",
|
|
"type": "datetime"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx_approval_biz",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"biz_type",
|
|
"biz_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_approval_status",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"org_id",
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_approval_applicant",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"applicant_id"
|
|
]
|
|
}
|
|
]
|
|
}
|