diff --git a/collection/uni-id-permissions/collection.json b/collection/uni-id-permissions/collection.json new file mode 100644 index 0000000..dfcdec3 --- /dev/null +++ b/collection/uni-id-permissions/collection.json @@ -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 + } + } + ] +} \ No newline at end of file diff --git a/collection/uni-id-permissions/package.json b/collection/uni-id-permissions/package.json new file mode 100644 index 0000000..848adcc --- /dev/null +++ b/collection/uni-id-permissions/package.json @@ -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" + } + ] + } +} diff --git a/collection/uni-id-roles/collection.json b/collection/uni-id-roles/collection.json new file mode 100644 index 0000000..334ca89 --- /dev/null +++ b/collection/uni-id-roles/collection.json @@ -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 + } + } + ] +} \ No newline at end of file diff --git a/collection/uni-id-roles/package.json b/collection/uni-id-roles/package.json new file mode 100644 index 0000000..38294ad --- /dev/null +++ b/collection/uni-id-roles/package.json @@ -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" + } + ] + } +} diff --git a/collection/uni-id-users/collection.json b/collection/uni-id-users/collection.json index 0a66769..cc46f80 100644 --- a/collection/uni-id-users/collection.json +++ b/collection/uni-id-users/collection.json @@ -83,7 +83,10 @@ "realname_auth": { "bsonType": "object", "description": "实名认证信息", - "required": ["type", "auth_status"], + "required": [ + "type", + "auth_status" + ], "properties": { "type": { "bsonType": "int", @@ -170,5 +173,138 @@ } }, "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 + } + } + ] +} \ No newline at end of file