opendb-admin-menus.schema.json 1.3 KB
Newer Older
DCloud_JSON's avatar
DCloud_JSON 已提交
1 2 3 4
{
	"bsonType": "object",
	"required": ["name", "menu_id"],
	"permission": {
5 6 7 8
		"read": true,
		"create": "'CREATE_OPENDB_ADMIN_MENUS' in auth.permission",
		"update": "'UPDATE_OPENDB_ADMIN_MENUS' in auth.permission",
		"delete": "'DELETE_OPENDB_ADMIN_MENUS' in auth.permission"
DCloud_JSON's avatar
DCloud_JSON 已提交
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
	},
	"properties": {
		"_id": {
			"description": "存储文档 ID,系统自动生成"
		},
		"menu_id": {
			"bsonType": "string",
			"description": "菜单项的ID,不可重复",
			"trim": "both"
		},
		"name": {
			"bsonType": "string",
			"description": "菜单名称",
			"trim": "both"
		},
		"icon": {
			"bsonType": "string",
			"description": "菜单图标",
			"trim": "both"
		},
		"url": {
			"bsonType": "string",
			"description": "菜单url",
			"trim": "both"
		},
		"sort": {
			"bsonType": "int",
			"description": "菜单序号(越大越靠后)"
		},
		"parent_id": {
			"bsonType": "string",
			"description": "父级菜单Id",
			"parentKey": "menu_id"
		},
		"permission": {
			"bsonType": "array",
			"description": "菜单权限列表"
		},
		"enable": {
			"bsonType": "bool",
			"description": "是否启用菜单,true启用、false禁用"
		},
		"create_date": {
			"bsonType": "timestamp",
			"description": "菜单创建时间",
			"forceDefaultValue": {
				"$env": "now"
			}
		}
	}
雪洛's avatar
雪洛 已提交
59
}