231 lines
5.0 KiB
JSON
231 lines
5.0 KiB
JSON
{
|
||
"summary": "PBL 蓝图聚合根表:一个租户下的一份项目式学习蓝图(学科/年级/学段/状态/质量状态/当前版本/预算)。所有读写 tenant_id 强制打头。",
|
||
"primary": [
|
||
"id"
|
||
],
|
||
"fields": {
|
||
"id": {
|
||
"type": "str",
|
||
"size": 32,
|
||
"notnull": true,
|
||
"summary": "主键ID(str32,UUID去横线)"
|
||
},
|
||
"tenant_id": {
|
||
"type": "str",
|
||
"size": 32,
|
||
"notnull": true,
|
||
"summary": "租户ID(首业务字段,所有读写强制打头,缺失即 fail-closed 拒绝)"
|
||
},
|
||
"code": {
|
||
"type": "str",
|
||
"size": 64,
|
||
"notnull": true,
|
||
"summary": "蓝图编码(租户内唯一,PBL-BP-序号)"
|
||
},
|
||
"name": {
|
||
"type": "str",
|
||
"size": 128,
|
||
"notnull": true,
|
||
"summary": "蓝图名称"
|
||
},
|
||
"subject": {
|
||
"type": "str",
|
||
"size": 64,
|
||
"default": "",
|
||
"summary": "学科"
|
||
},
|
||
"grade": {
|
||
"type": "str",
|
||
"size": 32,
|
||
"default": "",
|
||
"summary": "年级"
|
||
},
|
||
"phase": {
|
||
"type": "str",
|
||
"size": 32,
|
||
"default": "",
|
||
"summary": "学段"
|
||
},
|
||
"status": {
|
||
"type": "str",
|
||
"size": 16,
|
||
"notnull": true,
|
||
"default": "draft",
|
||
"summary": "蓝图状态"
|
||
},
|
||
"quality_status": {
|
||
"type": "str",
|
||
"size": 16,
|
||
"notnull": true,
|
||
"default": "q0",
|
||
"summary": "质量状态(5 级)"
|
||
},
|
||
"source": {
|
||
"type": "str",
|
||
"size": 16,
|
||
"notnull": true,
|
||
"default": "manual",
|
||
"summary": "来源方式"
|
||
},
|
||
"source_id": {
|
||
"type": "str",
|
||
"size": 32,
|
||
"default": "",
|
||
"summary": "来源对象ID(模板ID或父蓝图ID)"
|
||
},
|
||
"owner_id": {
|
||
"type": "str",
|
||
"size": 32,
|
||
"default": "",
|
||
"summary": "负责人(教师)ID"
|
||
},
|
||
"class_id": {
|
||
"type": "str",
|
||
"size": 32,
|
||
"default": "",
|
||
"summary": "关联班级ID"
|
||
},
|
||
"current_version": {
|
||
"type": "int",
|
||
"notnull": true,
|
||
"default": 0,
|
||
"summary": "当前版本号(save_version 回写)"
|
||
},
|
||
"duration_hours": {
|
||
"type": "int",
|
||
"notnull": true,
|
||
"default": 0,
|
||
"summary": "预计课时数"
|
||
},
|
||
"budget_amount": {
|
||
"type": "double",
|
||
"size": [
|
||
18,
|
||
2
|
||
],
|
||
"notnull": true,
|
||
"default": 0,
|
||
"summary": "预算金额(double(18,2))"
|
||
},
|
||
"summary": {
|
||
"type": "str",
|
||
"size": 512,
|
||
"default": "",
|
||
"summary": "蓝图简介"
|
||
},
|
||
"ext_json": {
|
||
"type": "text",
|
||
"default": "",
|
||
"summary": "扩展属性JSON"
|
||
},
|
||
"publish_time": {
|
||
"type": "datetime",
|
||
"summary": "最近发布时间"
|
||
},
|
||
"create_user": {
|
||
"type": "str",
|
||
"size": 32,
|
||
"default": "",
|
||
"summary": "创建人"
|
||
},
|
||
"create_time": {
|
||
"type": "datetime",
|
||
"summary": "创建时间"
|
||
},
|
||
"update_user": {
|
||
"type": "str",
|
||
"size": 32,
|
||
"default": "",
|
||
"summary": "更新人"
|
||
},
|
||
"update_time": {
|
||
"type": "datetime",
|
||
"summary": "更新时间"
|
||
},
|
||
"deleted": {
|
||
"type": "int",
|
||
"notnull": true,
|
||
"default": 0,
|
||
"summary": "逻辑删除标记 0正常 1删除"
|
||
}
|
||
},
|
||
"indexes": {
|
||
"uk_pbl_blueprint_code": {
|
||
"fields": [
|
||
"tenant_id",
|
||
"code"
|
||
],
|
||
"unique": true,
|
||
"summary": "租户内蓝图编码唯一"
|
||
},
|
||
"idx_pbl_blueprint_tenant": {
|
||
"fields": [
|
||
"tenant_id",
|
||
"deleted",
|
||
"status"
|
||
],
|
||
"unique": false,
|
||
"summary": "租户蓝图列表主索引(tenant_id 打头)"
|
||
},
|
||
"idx_pbl_blueprint_owner": {
|
||
"fields": [
|
||
"tenant_id",
|
||
"owner_id"
|
||
],
|
||
"unique": false,
|
||
"summary": "按负责人查蓝图"
|
||
},
|
||
"idx_pbl_blueprint_source": {
|
||
"fields": [
|
||
"tenant_id",
|
||
"source",
|
||
"source_id"
|
||
],
|
||
"unique": false,
|
||
"summary": "按来源(模板/fork)追溯"
|
||
},
|
||
"idx_pbl_blueprint_class": {
|
||
"fields": [
|
||
"tenant_id",
|
||
"class_id"
|
||
],
|
||
"unique": false,
|
||
"summary": "按班级查蓝图"
|
||
}
|
||
},
|
||
"codes": {
|
||
"status": {
|
||
"summary": "蓝图状态",
|
||
"items": {
|
||
"draft": "草稿",
|
||
"validating": "校验中",
|
||
"ready": "就绪",
|
||
"published": "已发布",
|
||
"archived": "已归档",
|
||
"disabled": "已停用"
|
||
}
|
||
},
|
||
"quality_status": {
|
||
"summary": "质量状态(5 级,M2 校验引擎回写)",
|
||
"items": {
|
||
"q0": "未校验",
|
||
"q1": "不合格",
|
||
"q2": "基本合格",
|
||
"q3": "合格",
|
||
"q4": "优秀",
|
||
"q5": "标杆"
|
||
}
|
||
},
|
||
"source": {
|
||
"summary": "来源方式",
|
||
"items": {
|
||
"manual": "手工创建",
|
||
"template": "模板实例化",
|
||
"fork": "蓝图fork派生",
|
||
"agent": "Designer Agent 生成",
|
||
"import": "离线包导入"
|
||
}
|
||
}
|
||
}
|
||
}
|