37 lines
2.0 KiB
JSON
37 lines
2.0 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"table": "pbl_blueprint_version",
|
|
"name": "蓝图版本",
|
|
"title": "蓝图版本",
|
|
"subtitle": "版本快照与变更增量",
|
|
"primary": ["id"],
|
|
"defaultsort": "version_no desc",
|
|
"orderby": "version_no desc",
|
|
"caption": "版本"
|
|
}
|
|
],
|
|
"fields": [
|
|
{"name": "id", "type": "str(32)", "title": "主键", "notnull": 1, "primary": 1, "readonly": 1},
|
|
{"name": "tenant_id", "type": "str(32)", "title": "租户ID", "notnull": 1, "default": "0"},
|
|
{"name": "blueprint_id", "type": "str(32)", "title": "所属蓝图", "notnull": 1},
|
|
{"name": "version_no", "type": "int", "title": "版本号", "notnull": 1, "default": 1},
|
|
{"name": "parent_version_id", "type": "str(32)", "title": "父版本ID", "default": ""},
|
|
{"name": "change_delta", "type": "longtext", "title": "变更增量JSON", "default": "", "comment": "对话式改模型的证据:{op,path,before,after} 列表"},
|
|
{"name": "snapshot_json", "type": "longtext", "title": "全量快照JSON", "default": ""},
|
|
{"name": "change_reason", "type": "str(500)", "title": "变更原因", "default": ""},
|
|
{"name": "source", "type": "str(32)", "title": "变更来源", "default": "manual", "comment": "manual/dialogue/template/fork/validation"},
|
|
{"name": "quality_status", "type": "str(32)", "title": "该版本质量状态", "default": "draft"},
|
|
{"name": "created_by", "type": "str(32)", "title": "创建人", "default": ""},
|
|
{"name": "created_at", "type": "datetime", "title": "创建时间", "notnull": 1}
|
|
],
|
|
"indexes": [
|
|
{"name": "uk_pbl_version_no", "fields": ["tenant_id", "blueprint_id", "version_no"], "unique": 1},
|
|
{"name": "idx_pbl_version_bp", "fields": ["tenant_id", "blueprint_id", "created_at"], "unique": 0}
|
|
],
|
|
"codes": [
|
|
{"field": "source", "table": "appcodes_kv", "cond": "parentid='pbl_version_source'", "valuefield": "k", "textfield": "v"},
|
|
{"field": "blueprint_id", "table": "pbl_blueprint", "cond": "", "valuefield": "id", "textfield": "title"}
|
|
]
|
|
}
|