diff --git a/collection/opendb-app-list/collection.json b/collection/opendb-app-list/collection.json index 07fc3ba..b941018 100644 --- a/collection/opendb-app-list/collection.json +++ b/collection/opendb-app-list/collection.json @@ -3,8 +3,7 @@ "bsonType": "object", "required": [ "appid", - "name", - "description" + "name" ], "permission": { "read": false, @@ -52,6 +51,26 @@ } } }, + "creator_uid": { + "description": "创建者的user_id,创建者必然是用户,不随应用转让而改变", + "bsonType": "string" + }, + "owner_type": { + "bsonType": "int", + "description": "应用当前归属者类型,1:个人,2:企业" + }, + "owner_id": { + "bsonType": "string", + "description": "应用当前归属者的id,user_id or enterprise_id" + }, + "managers":{ + "bsonType":"array", + "description":"应用管理员ID列表" + }, + "members":{ + "bsonType":"array", + "description":"团队成员ID列表" + }, "create_date": { "bsonType": "timestamp", "label": "创建时间", @@ -90,4 +109,4 @@ } } ] -} \ No newline at end of file +} diff --git a/collection/uni-id-user-chang-log/collection.json b/collection/uni-id-user-chang-log/collection.json new file mode 100644 index 0000000..e640d32 --- /dev/null +++ b/collection/uni-id-user-chang-log/collection.json @@ -0,0 +1,52 @@ +{ + "schema": { + "bsonType": "object", + "required": [], + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "user_id": { + "bsonType": "string", + "description": "用户id,参考uni-id-users表" + }, + "changeKey": { + "bsonType": "string", + "description": "变化的内容,如:phone/email" + }, + "oldVal": { + "bsonType": "string", + "description": "变化之前的旧值" + }, + "newVal": { + "bsonType": "string", + "description": "变化之后的新值" + }, + "ip": { + "bsonType": "string", + "description": "ip地址" + }, + "create_date": { + "bsonType": "timestamp", + "description": "修改时间", + "forceDefaultValue": { + "$env": "now" + } + } + } + }, + "index": [ + { + "IndexName": "user_id", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "user_id", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + } + ] +} diff --git a/collection/uni-id-user-chang-log/package.json b/collection/uni-id-user-chang-log/package.json new file mode 100644 index 0000000..3dd47f1 --- /dev/null +++ b/collection/uni-id-user-chang-log/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-id-user-chang-log", + "version": "0.0.1", + "description": "用户信息变更记录表", + "keywords": ["修改手机", "修改邮箱"], + "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 a94acc3..66abaa1 100644 --- a/collection/uni-id-users/collection.json +++ b/collection/uni-id-users/collection.json @@ -191,6 +191,44 @@ "description": "备注", "trim": "both" }, + "register_env": { + "bsonType": "object", + "description": "注册环境信息", + "properties": { + "appid": { + "bsonType": "string", + "description": "注册时的应用AppId" + }, + "uni_platform": { + "bsonType": "string", + "description": "注册时的应用平台,app、h5等" + }, + "os_name": { + "bsonType": "string", + "description": "注册时的客户端系统类型,ios、android、windows、mac、linux" + }, + "app_name": { + "bsonType": "string", + "description": "注册时的应用名称" + }, + "app_version": { + "bsonType": "string", + "description": "注册时的应用版本名称" + }, + "app_version_code": { + "bsonType": "string", + "description": "注册时的应用版本号码" + }, + "channel": { + "bsonType": "string", + "description": "注册时的应用渠道或小程序启动场景" + }, + "client_ip": { + "bsonType": "string", + "description": "注册时的客户端ip" + } + } + }, "realname_auth": { "bsonType": "object", "description": "实名认证信息", @@ -419,6 +457,30 @@ ], "MgoIsUnique": false } + }, + { + "IndexName": "register_env_app_version_", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "register_env.appVersion", + "Direction": "1" + } + ], + "MgoIsUnique": false + } + }, + { + "IndexName": "register_env_channel_", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "register_env.channel", + "Direction": "1" + } + ], + "MgoIsUnique": false + } } ] }