opendb/collection/uni-id-roles/collection.json
2020-10-28 20:21:38 +08:00

72 lines
1.5 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.

{
"schema": {
"bsonType": "object",
"required": [
"role_id"
],
"permission": {
"read": false,
"create": false,
"update": false,
"delete": false
},
"properties": {
"_id": {
"description": "存储文档 ID系统自动生成"
},
"role_id": {
"title": "唯一ID",
"bsonType": "string",
"description": "角色唯一标识,不可修改,不允许重复"
},
"role_name": {
"title": "名称",
"bsonType": "string",
"description": "角色名称"
},
"permission": {
"title": "权限",
"bsonType": "array",
"description": "角色拥有的权限列表"
},
"comment": {
"title": "备注",
"bsonType": "string",
"description": "备注"
},
"create_date": {
"bsonType": "timestamp",
"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
}
}
]
}