pbl_blueprint/pbl_blueprint/json/m1b/pbl_ext_field_def.json
2026-09-16 17:17:53 +08:00

202 lines
5.0 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.

{
"tblname": "pbl_ext_field_def",
"params": {
"id": {
"type": "int",
"size": 20,
"notnull": true,
"default": 0,
"editable": false,
"query": false,
"summary": "物理主键(bigint AUTO_INCREMENT)"
},
"tenant_key": {
"type": "str",
"size": 32,
"notnull": true,
"default": "",
"editable": false,
"query": true,
"summary": "租户键 = COALESCE(tenant_id,'__PLATFORM__');索引打头列;应用层计算"
},
"tenant_id": {
"type": "str",
"size": 32,
"notnull": false,
"default": null,
"editable": true,
"query": true,
"summary": "租户ID(首业务字段,读写强制打头,缺失即 fail-closed);NULL=平台内置字段定义,非空=租户自有定义"
},
"def_code": {
"type": "str",
"size": 32,
"notnull": true,
"default": "",
"editable": true,
"query": true,
"summary": "定义编码(业务主键,gen_code('EFD', tenant_id) 生成)"
},
"subobject_type": {
"type": "str",
"size": 32,
"notnull": true,
"default": "",
"editable": true,
"query": true,
"summary": "适用子对象类型(7 类之一;'*' 表示全部类型通用)",
"code": "pbl_subobject_type"
},
"field_key": {
"type": "str",
"size": 64,
"notnull": true,
"default": "",
"editable": true,
"query": true,
"summary": "扩展字段键(写入 pbl_subobject_ext.ext_key;^[a-z][a-z0-9_]{0,63}$)"
},
"field_label": {
"type": "str",
"size": 128,
"notnull": true,
"default": "",
"editable": true,
"query": true,
"summary": "字段显示名"
},
"value_type": {
"type": "str",
"size": 16,
"notnull": true,
"default": "string",
"editable": true,
"query": true,
"summary": "值类型 string/int/float/bool/json/date/enum",
"code": "pbl_ext_value_type"
},
"required_flag": {
"type": "str",
"size": 1,
"notnull": true,
"default": "N",
"editable": true,
"query": true,
"summary": "是否必填 Y=保存该子对象扩展时此键必须出现且非空",
"code": "pbl_yes_no"
},
"default_value": {
"type": "str",
"size": 512,
"notnull": false,
"default": "",
"editable": true,
"query": false,
"summary": "默认值(调用方未传该键时按 value_type 强转后落库)"
},
"enum_options": {
"type": "text",
"notnull": false,
"default": "",
"editable": true,
"query": false,
"summary": "枚举候选(value_type=enum 时必填,JSON 数组字符串)"
},
"max_length": {
"type": "int",
"notnull": true,
"default": 0,
"editable": true,
"query": false,
"summary": "最大长度(0=不限制;>0 时对 string/json/enum 序列化长度做上限校验)"
},
"validate_regex": {
"type": "str",
"size": 256,
"notnull": false,
"default": "",
"editable": true,
"query": false,
"summary": "正则校验(非空时对 string 值 re.fullmatch,不符则 PBL_EXT_VALUE_INVALID)"
},
"platform_flag": {
"type": "str",
"size": 1,
"notnull": true,
"default": "N",
"editable": true,
"query": true,
"summary": "平台内置标记 Y=平台内置定义(此时 tenant_id 必须为 NULL)",
"code": "pbl_yes_no"
},
"def_status": {
"type": "str",
"size": 16,
"notnull": true,
"default": "active",
"editable": true,
"query": true,
"summary": "定义状态(disabled 不参与校验且拒绝新值写入,历史值只读保留)",
"code": "pbl_ext_def_status"
},
"sort_no": {
"type": "int",
"notnull": true,
"default": 0,
"editable": true,
"query": true,
"summary": "排序号"
},
"remark": {
"type": "str",
"size": 512,
"notnull": false,
"default": "",
"editable": true,
"query": false,
"summary": "备注"
},
"creator_id": {
"type": "str",
"size": 32,
"notnull": false,
"default": "",
"editable": false,
"query": true,
"summary": "创建人"
},
"create_time": {
"type": "datetime",
"notnull": true,
"default": null,
"editable": false,
"query": false,
"summary": "创建时间"
},
"update_time": {
"type": "datetime",
"notnull": true,
"default": null,
"editable": false,
"query": false,
"summary": "更新时间"
}
},
"editable": [
"api/pbl_ext_field_def/list.dspy",
"api/pbl_ext_field_def/edit.dspy",
"api/pbl_ext_field_def/view.dspy"
],
"browserfields": [
"def_code",
"subobject_type",
"field_key",
"field_label",
"value_type",
"required_flag",
"platform_flag",
"def_status",
"sort_no"
]
}