pbl_blueprint/models/pbl_blueprint.json

51 lines
3.2 KiB
JSON
Raw 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": [
{
"table": "pbl_blueprint",
"name": "PBL蓝图",
"title": "PBL蓝图",
"subtitle": "PBL蓝图聚合根",
"primary": ["id"],
"defaultsort": "created_at desc",
"orderby": "created_at desc",
"caption": "蓝图",
"multilingual": 0
}
],
"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", "comment": "多租户强制打头字段,所有读写必须带"},
{"name": "org_id", "type": "str(32)", "title": "所属机构", "notnull": 1, "default": "0"},
{"name": "blueprint_code", "type": "str(64)", "title": "蓝图编码", "notnull": 1},
{"name": "title", "type": "str(255)", "title": "蓝图标题", "notnull": 1},
{"name": "subject_area", "type": "str(64)", "title": "学科领域", "default": ""},
{"name": "grade_level", "type": "str(32)", "title": "适用年级", "default": ""},
{"name": "duration_hours", "type": "int", "title": "总课时(小时)", "default": 0},
{"name": "driving_question", "type": "text", "title": "驱动问题", "default": ""},
{"name": "summary", "type": "text", "title": "蓝图摘要", "default": ""},
{"name": "quality_status", "type": "str(32)", "title": "质量状态", "notnull": 1, "default": "draft", "comment": "5级draft/partial/valid/complete/published由 pbl_validation 写入"},
{"name": "validation_score", "type": "decimal(5,2)", "title": "校验得分", "default": 0},
{"name": "version_no", "type": "int", "title": "当前版本号", "notnull": 1, "default": 1},
{"name": "current_version_id", "type": "str(32)", "title": "当前版本ID", "default": ""},
{"name": "template_id", "type": "str(32)", "title": "来源模板ID", "default": ""},
{"name": "forked_from_id", "type": "str(32)", "title": "派生自蓝图ID", "default": ""},
{"name": "status", "type": "str(32)", "title": "生命周期状态", "notnull": 1, "default": "draft", "comment": "draft/published/archived/deleted"},
{"name": "extra_json", "type": "longtext", "title": "扩展属性JSON", "default": ""},
{"name": "created_by", "type": "str(32)", "title": "创建人", "default": ""},
{"name": "created_at", "type": "datetime", "title": "创建时间", "notnull": 1},
{"name": "updated_by", "type": "str(32)", "title": "更新人", "default": ""},
{"name": "updated_at", "type": "datetime", "title": "更新时间"}
],
"indexes": [
{"name": "uk_pbl_blueprint_code", "fields": ["tenant_id", "blueprint_code"], "unique": 1},
{"name": "idx_pbl_blueprint_tenant", "fields": ["tenant_id", "status"], "unique": 0},
{"name": "idx_pbl_blueprint_org", "fields": ["org_id"], "unique": 0},
{"name": "idx_pbl_blueprint_created", "fields": ["tenant_id", "created_at"], "unique": 0}
],
"codes": [
{"field": "quality_status", "table": "appcodes_kv", "cond": "parentid='pbl_quality_status'", "valuefield": "k", "textfield": "v"},
{"field": "status", "table": "appcodes_kv", "cond": "parentid='pbl_bp_status'", "valuefield": "k", "textfield": "v"},
{"field": "template_id", "table": "pbl_template", "cond": "", "valuefield": "id", "textfield": "name"}
]
}