pbl_compiler/models/pbl_compile_task.json
2026-09-18 12:18:08 +08:00

216 lines
4.3 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"summary": [
{
"name": "pbl_compile_task",
"comment": "编译任务approval_id 门禁F-CP-01/US-10",
"module": "pbl_compiler",
"engine": "mariadb",
"charset": "utf8mb4",
"tenant_scoped": true,
"append_only": false
}
],
"fields": [
{
"name": "tenant_id",
"comment": "租户ID(强制打头)",
"null": false,
"type": "str",
"length": 64
},
{
"name": "id",
"comment": "主键",
"null": false,
"type": "int",
"length": 20,
"unsigned": true,
"auto_increment": true
},
{
"name": "task_no",
"comment": "任务流水号(确定性派生:CT+blueprint_id+version+seq)",
"null": false,
"type": "str",
"length": 64
},
{
"name": "blueprint_id",
"comment": "蓝图ID",
"null": false,
"type": "int",
"length": 20,
"unsigned": true
},
{
"name": "blueprint_version",
"comment": "蓝图版本(须已审批)",
"null": false,
"type": "int",
"length": 11
},
{
"name": "compiler_version",
"comment": "编译器版本号",
"null": false,
"type": "str",
"length": 32
},
{
"name": "ruleset_version",
"comment": "规则集版本",
"null": true,
"type": "str",
"length": 32
},
{
"name": "status",
"comment": "appcodes:pbl_compile_status(pending/running/success/failed)",
"null": false,
"type": "str",
"length": 32
},
{
"name": "approval_id",
"comment": "关联审批记录(未审批拒绝 F-CP-01)",
"null": true,
"type": "int",
"length": 20,
"unsigned": true
},
{
"name": "game_def_id",
"comment": "产出的 Game Definition ID(success 时回填)",
"null": true,
"type": "int",
"length": 20,
"unsigned": true
},
{
"name": "content_fingerprint",
"comment": "产物 SHA-256 指纹(success 时回填,US-11 比对锚点)",
"null": true,
"type": "str",
"length": 64
},
{
"name": "error_code",
"comment": "失败错误码(PBL_E_*)",
"null": true,
"type": "str",
"length": 64
},
{
"name": "error_msg",
"comment": "失败原因",
"null": true,
"type": "str",
"length": 2048
},
{
"name": "triggered_by",
"comment": "触发人",
"null": false,
"type": "str",
"length": 64
},
{
"name": "duration_ms",
"comment": "编译耗时(易变字段,不参与指纹)",
"null": false,
"type": "int",
"length": 11
},
{
"name": "started_at",
"comment": "开始时间",
"null": true,
"type": "datetime"
},
{
"name": "finished_at",
"comment": "结束时间",
"null": true,
"type": "datetime"
},
{
"name": "created_at",
"comment": "创建时间(应用层写入)",
"null": false,
"type": "datetime"
},
{
"name": "updated_at",
"comment": "更新时间(应用层写入)",
"null": false,
"type": "datetime"
}
],
"indexes": [
{
"name": "PRIMARY",
"unique": true,
"fields": [
"id"
]
},
{
"name": "uk_ct_task_no",
"unique": true,
"fields": [
"tenant_id",
"task_no"
]
},
{
"name": "idx_ct_blueprint",
"unique": false,
"fields": [
"tenant_id",
"blueprint_id",
"blueprint_version"
]
},
{
"name": "idx_ct_status",
"unique": false,
"fields": [
"tenant_id",
"status"
]
},
{
"name": "idx_ct_fingerprint",
"unique": false,
"fields": [
"tenant_id",
"content_fingerprint"
]
}
],
"codes": [
{
"name": "pbl_compile_status",
"comment": "编译任务状态(第29.6章)",
"items": [
{
"code": "pending",
"name": "待执行"
},
{
"code": "running",
"name": "编译中"
},
{
"code": "success",
"name": "成功"
},
{
"code": "failed",
"name": "失败"
}
]
}
]
}