feat: uni-id-roles、uni-id-permissions

This commit is contained in:
wangyaqi 2020-09-23 20:58:34 +08:00
parent 7a920054b6
commit 2afef8d21e
5 changed files with 273 additions and 3 deletions

View File

@ -0,0 +1,44 @@
{
"schema": {
"bsonType": "object",
"required": [
"role_id",
"permission"
],
"properties": {
"_id": {
"description": "存储文档 ID系统自动生成"
},
"role_id": {
"bsonType": "string",
"description": "角色唯一标识,不可修改,不允许重复"
},
"role_name": {
"bsonType": "string",
"description": "角色名称"
},
"comment": {
"bsonType": "string",
"description": "用户昵称"
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间"
}
}
},
"index": [
{
"IndexName": "permission_id",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "permission_id",
"Direction": "1"
}
],
"MgoIsUnique": true
}
}
]
}

View File

@ -0,0 +1,17 @@
{
"name": "@opendb/uni-id-permissions",
"version": "0.0.1",
"description": "uni-id-permissions",
"keywords": ["uni-id", "权限"],
"opendb": {
"title": "权限",
"type": "collection",
"contributors": [
{
"name": "DCloud",
"email": "",
"homepage": "https://gitee.com/dcloud/opendb"
}
]
}
}

View File

@ -0,0 +1,56 @@
{
"schema": {
"bsonType": "object",
"required": [
"role_id",
"permission"
],
"properties": {
"_id": {
"description": "存储文档 ID系统自动生成"
},
"role_id": {
"bsonType": "string",
"description": "角色唯一标识,不可修改,不允许重复"
},
"role_name": {
"bsonType": "string",
"description": "角色名称"
},
"comment": {
"bsonType": "string",
"description": "用户昵称"
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间"
}
}
},
"index": [
{
"IndexName": "role_id",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "role_id",
"Direction": "1"
}
],
"MgoIsUnique": true
}
},
{
"IndexName": "permission",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "permission",
"Direction": "1"
}
],
"MgoIsUnique": false
}
}
]
}

View File

@ -0,0 +1,17 @@
{
"name": "@opendb/uni-id-roles",
"version": "0.0.1",
"description": "uni-id-users",
"keywords": ["uni-id", "角色"],
"opendb": {
"title": "角色",
"type": "collection",
"contributors": [
{
"name": "DCloud",
"email": "",
"homepage": "https://gitee.com/dcloud/opendb"
}
]
}
}

View File

@ -83,7 +83,10 @@
"realname_auth": { "realname_auth": {
"bsonType": "object", "bsonType": "object",
"description": "实名认证信息", "description": "实名认证信息",
"required": ["type", "auth_status"], "required": [
"type",
"auth_status"
],
"properties": { "properties": {
"type": { "type": {
"bsonType": "int", "bsonType": "int",
@ -170,5 +173,138 @@
} }
}, },
"data": [], "data": [],
"index": [] "index": [
{
"IndexName": "username",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "username",
"Direction": "1"
}
],
"MgoIsUnique": false
}
},
{
"IndexName": "mobile",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "mobile",
"Direction": "1"
}
],
"MgoIsUnique": false
}
},
{
"IndexName": "email",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "email",
"Direction": "1"
}
],
"MgoIsUnique": false
}
},
{
"IndexName": "wx_openid.app-plus",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "wx_openid.app-plus",
"Direction": "1"
}
],
"MgoIsUnique": false
}
},
{
"IndexName": "wx_openid.mp-weixin",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "wx_openid.mp-weixin",
"Direction": "1"
}
],
"MgoIsUnique": false
}
},
{
"IndexName": "wx_unionid",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "wx_unionid",
"Direction": "1"
}
],
"MgoIsUnique": false
}
},
{
"IndexName": "ali_openid",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "ali_openid",
"Direction": "1"
}
],
"MgoIsUnique": false
}
},
{
"IndexName": "my_invite_code",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "my_invite_code",
"Direction": "1"
}
],
"MgoIsUnique": false
}
},
{
"IndexName": "inviter_uid",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "inviter_uid",
"Direction": "1"
}
],
"MgoIsUnique": false
}
},
{
"IndexName": "invite_time",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "invite_time",
"Direction": "1"
}
],
"MgoIsUnique": false
}
},
{
"IndexName": "role",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "role",
"Direction": "1"
}
],
"MgoIsUnique": false
}
}
]
} }