2020-09-23 20:58:34 +08:00
|
|
|
|
{
|
|
|
|
|
"schema": {
|
|
|
|
|
"bsonType": "object",
|
|
|
|
|
"required": [
|
2020-10-26 19:54:40 +08:00
|
|
|
|
"role_id"
|
2020-09-23 20:58:34 +08:00
|
|
|
|
],
|
2020-10-27 17:24:08 +08:00
|
|
|
|
"permission": {
|
2020-10-28 20:21:38 +08:00
|
|
|
|
"read": false,
|
|
|
|
|
"create": false,
|
|
|
|
|
"update": false,
|
|
|
|
|
"delete": false
|
2020-10-27 17:24:08 +08:00
|
|
|
|
},
|
2020-09-23 20:58:34 +08:00
|
|
|
|
"properties": {
|
|
|
|
|
"_id": {
|
|
|
|
|
"description": "存储文档 ID,系统自动生成"
|
|
|
|
|
},
|
|
|
|
|
"role_id": {
|
2020-10-26 19:54:40 +08:00
|
|
|
|
"title": "唯一ID",
|
2020-09-23 20:58:34 +08:00
|
|
|
|
"bsonType": "string",
|
2020-12-23 20:20:34 +08:00
|
|
|
|
"description": "角色唯一标识,不可修改,不允许重复",
|
|
|
|
|
"trim":"both"
|
2020-09-23 20:58:34 +08:00
|
|
|
|
},
|
|
|
|
|
"role_name": {
|
2020-10-26 19:54:40 +08:00
|
|
|
|
"title": "名称",
|
2020-09-23 20:58:34 +08:00
|
|
|
|
"bsonType": "string",
|
2020-12-23 20:20:34 +08:00
|
|
|
|
"description": "角色名称",
|
|
|
|
|
"trim":"both"
|
2020-09-23 20:58:34 +08:00
|
|
|
|
},
|
2020-10-12 17:29:20 +08:00
|
|
|
|
"permission": {
|
2020-10-26 19:54:40 +08:00
|
|
|
|
"title": "权限",
|
2020-10-12 17:29:20 +08:00
|
|
|
|
"bsonType": "array",
|
2020-11-11 11:52:08 +08:00
|
|
|
|
"foreignKey": "uni-id-permissions.permission_id",
|
2020-10-12 17:29:20 +08:00
|
|
|
|
"description": "角色拥有的权限列表"
|
|
|
|
|
},
|
2020-09-23 20:58:34 +08:00
|
|
|
|
"comment": {
|
2020-10-26 19:54:40 +08:00
|
|
|
|
"title": "备注",
|
2020-09-23 20:58:34 +08:00
|
|
|
|
"bsonType": "string",
|
2020-12-23 20:20:34 +08:00
|
|
|
|
"description": "备注",
|
|
|
|
|
"trim":"both"
|
2020-09-23 20:58:34 +08:00
|
|
|
|
},
|
|
|
|
|
"create_date": {
|
|
|
|
|
"bsonType": "timestamp",
|
2020-10-26 19:54:40 +08:00
|
|
|
|
"description": "创建时间",
|
|
|
|
|
"forceDefaultValue": {
|
|
|
|
|
"$env": "now"
|
|
|
|
|
}
|
2020-09-23 20:58:34 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"index": [
|
|
|
|
|
{
|
2020-10-27 17:24:08 +08:00
|
|
|
|
"IndexName": "role_id_",
|
2020-09-23 20:58:34 +08:00
|
|
|
|
"MgoKeySchema": {
|
|
|
|
|
"MgoIndexKeys": [
|
|
|
|
|
{
|
|
|
|
|
"Name": "role_id",
|
|
|
|
|
"Direction": "1"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"MgoIsUnique": true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"IndexName": "permission",
|
|
|
|
|
"MgoKeySchema": {
|
|
|
|
|
"MgoIndexKeys": [
|
|
|
|
|
{
|
|
|
|
|
"Name": "permission",
|
|
|
|
|
"Direction": "1"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"MgoIsUnique": false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|