company-list.schema.json文件
{
"bsonType": "object",
"required": ["name", "desc", "type",
"admin_id", "print_desc"
],
"permission": {
"read": true,
"create": true,
"update": true,
"delete": false
},
"properties": {
"_id": {
"description": "ID,系统自动生成"
},
"name": {
"bsonType": "string",
"label": "公司名称",
"errorMessage": {
"required": "{label}不能为空",
"format": "{label}格式无效"
},
"order": 1,
"trim": "both"
},
"desc": {
"bsonType": "string",
"label": "工号缩写",
"errorMessage": {
"required": "{label}不能为空",
"format": "{label}格式无效"
},
"order": 1,
"trim": "both"
},
"print_desc": {
"bsonType": "string",
"label": "打印别名",
"errorMessage": {
"required": "{label}不能为空",
"format": "{label}格式无效"
},
"order": 1,
"trim": "both"
},
"enable": {
"bsonType": "bool",
"label": "是否启用",
"defaultValue": true,
"order": 1
},
"sort": {
"bsonType": "int",
"label": "排序",
"defaultValue": 100,
"description": "按照大小升序,小值在前 (asc)",
"order": 1
},
"type": {
"bsonType": "int",
"label": "类型",
"errorMessage": {
"required": "{label}不能为空",
"format": "{label}格式无效"
},
"order": 2,
"enum": [{
"text": "总部",
"value": 0
}, {
"text": "分公司",
"value": 1
},
{
"text": "子公司",
"value": 2
}
],
"exclusiveMinimum": true,
"exclusiveMaximum": true
},
"parent_id": {
"bsonType": "string",
"label": "父公司",
"errorMessage": {
"format": "{label}格式无效"
},
"order": 3,
"trim": "both",
"parentKey": "_id"
},
"admin_id": {
"bsonType": "array",
"label": "绑定的管理员",
"errorMessage": {
"required": "{label}不能为空",
"format": "{label}格式无效"
},
"order": 4,
"description": "公司对应的管理员账号ID",
"trim": "both",
"foreignKey": "uni-id-users._id"
}
}
}
1***@163.com (作者)
上传好多次了,就是不行。我确定云端和本地的schema是一致的,不论是从编辑器下载下来还是从控制台直接看数据库schema文件,都是一致的
2021-06-23 08:43