opendb/collection/uni-id-roles/collection.json

66 lines
1.4 KiB
JSON
Raw Normal View History

{
"schema": {
"bsonType": "object",
"required": [
2020-10-26 19:54:40 +08:00
"role_id"
],
"properties": {
"_id": {
"description": "存储文档 ID系统自动生成"
},
"role_id": {
2020-10-26 19:54:40 +08:00
"title": "唯一ID",
"bsonType": "string",
"description": "角色唯一标识,不可修改,不允许重复"
},
"role_name": {
2020-10-26 19:54:40 +08:00
"title": "名称",
"bsonType": "string",
"description": "角色名称"
},
"permission": {
2020-10-26 19:54:40 +08:00
"title": "权限",
"bsonType": "array",
"description": "角色拥有的权限列表"
},
"comment": {
2020-10-26 19:54:40 +08:00
"title": "备注",
"bsonType": "string",
"description": "备注"
},
"create_date": {
"bsonType": "timestamp",
2020-10-26 19:54:40 +08:00
"description": "创建时间",
"forceDefaultValue": {
"$env": "now"
}
}
}
},
"index": [
{
"IndexName": "role_id",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "role_id",
"Direction": "1"
}
],
"MgoIsUnique": true
}
},
{
"IndexName": "permission",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "permission",
"Direction": "1"
}
],
"MgoIsUnique": false
}
}
]
}