2020-10-23 11:25:15 +08:00
|
|
|
|
{
|
|
|
|
|
"schema": {
|
|
|
|
|
"bsonType": "object",
|
|
|
|
|
"required": [
|
|
|
|
|
"name",
|
2020-10-26 14:43:20 +08:00
|
|
|
|
"menu_id"
|
2020-10-23 11:25:15 +08:00
|
|
|
|
],
|
|
|
|
|
"properties": {
|
|
|
|
|
"_id": {
|
|
|
|
|
"description": "存储文档 ID,系统自动生成"
|
|
|
|
|
},
|
2020-10-26 11:35:12 +08:00
|
|
|
|
"menu_id": {
|
2020-10-29 17:21:33 +08:00
|
|
|
|
"bsonType": "string",
|
2020-10-26 11:35:12 +08:00
|
|
|
|
"description": "菜单项的ID,不可重复"
|
|
|
|
|
},
|
2020-10-23 11:25:15 +08:00
|
|
|
|
"name": {
|
|
|
|
|
"bsonType": "string",
|
|
|
|
|
"description": "菜单名称"
|
|
|
|
|
},
|
|
|
|
|
"icon": {
|
|
|
|
|
"bsonType": "string",
|
|
|
|
|
"description": "菜单图标"
|
|
|
|
|
},
|
|
|
|
|
"url": {
|
|
|
|
|
"bsonType": "string",
|
|
|
|
|
"description": "菜单url"
|
|
|
|
|
},
|
|
|
|
|
"sort": {
|
|
|
|
|
"bsonType": "int",
|
2020-10-23 11:27:03 +08:00
|
|
|
|
"description": "菜单序号(越大越靠后)"
|
2020-10-23 11:25:15 +08:00
|
|
|
|
},
|
|
|
|
|
"parent_id": {
|
|
|
|
|
"bsonType": "string",
|
|
|
|
|
"description": "父级菜单Id"
|
|
|
|
|
},
|
|
|
|
|
"permission": {
|
|
|
|
|
"bsonType": "array",
|
|
|
|
|
"description": "菜单权限列表"
|
|
|
|
|
},
|
2020-10-26 11:35:12 +08:00
|
|
|
|
"enable": {
|
|
|
|
|
"bsonType": "bool",
|
|
|
|
|
"description": "是否启用菜单,true启用、false禁用"
|
2020-10-23 11:25:15 +08:00
|
|
|
|
},
|
|
|
|
|
"create_date": {
|
|
|
|
|
"bsonType": "timestamp",
|
|
|
|
|
"description": "菜单创建时间"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"index": [
|
|
|
|
|
{
|
2020-10-26 14:34:20 +08:00
|
|
|
|
"IndexName": "menu_id",
|
2020-10-23 11:25:15 +08:00
|
|
|
|
"MgoKeySchema": {
|
|
|
|
|
"MgoIndexKeys": [
|
|
|
|
|
{
|
2020-10-26 14:34:20 +08:00
|
|
|
|
"Name": "menu_id",
|
|
|
|
|
"Direction": "1"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"MgoIsUnique": true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"IndexName": "parent_id",
|
|
|
|
|
"MgoKeySchema": {
|
|
|
|
|
"MgoIndexKeys": [
|
|
|
|
|
{
|
|
|
|
|
"Name": "parent_id",
|
2020-10-23 11:25:15 +08:00
|
|
|
|
"Direction": "1"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"MgoIsUnique": false
|
|
|
|
|
}
|
2020-10-26 14:32:07 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
2020-10-26 14:34:20 +08:00
|
|
|
|
"IndexName": "permission",
|
2020-10-26 14:32:07 +08:00
|
|
|
|
"MgoKeySchema": {
|
|
|
|
|
"MgoIndexKeys": [
|
|
|
|
|
{
|
2020-10-26 14:34:20 +08:00
|
|
|
|
"Name": "permission",
|
2020-10-26 14:32:07 +08:00
|
|
|
|
"Direction": "1"
|
|
|
|
|
}
|
|
|
|
|
],
|
2020-10-26 14:34:20 +08:00
|
|
|
|
"MgoIsUnique": false
|
2020-10-26 14:32:07 +08:00
|
|
|
|
}
|
2020-10-23 11:25:15 +08:00
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|