From 0188fba9eb6765f93a3213913047c2151299e527 Mon Sep 17 00:00:00 2001 From: DCloud_LXH <283700113@qq.com> Date: Wed, 27 Jan 2021 18:07:52 +0800 Subject: [PATCH] =?UTF-8?q?update:=201.=20opendb-verify-codes=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0device=5Fuuid=E7=B4=A2=E5=BC=95=202.=20opendb-id-log?= =?UTF-8?q?=20=E5=8E=BB=E9=99=A4=20user=5Fid=20=E7=9A=84required=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20device=5Fuuid=20=E5=92=8C=20user=5Fid?= =?UTF-8?q?=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendb-verify-codes/collection.json | 12 +++++ collection/uni-id-log/collection.json | 46 +++++++++++++++---- 2 files changed, 49 insertions(+), 9 deletions(-) diff --git a/collection/opendb-verify-codes/collection.json b/collection/opendb-verify-codes/collection.json index d8d90de..e1db745 100644 --- a/collection/opendb-verify-codes/collection.json +++ b/collection/opendb-verify-codes/collection.json @@ -68,5 +68,17 @@ }], "MgoIsUnique": false } + }, { + "IndexName": "device_uuid_code_", + "MgoKeySchema": { + "MgoIndexKeys": [{ + "Name": "device_uuid", + "Direction": "1" + }, { + "Name": "code", + "Direction": "1" + }], + "MgoIsUnique": false + } }] } diff --git a/collection/uni-id-log/collection.json b/collection/uni-id-log/collection.json index 3ebc057..0917640 100644 --- a/collection/uni-id-log/collection.json +++ b/collection/uni-id-log/collection.json @@ -1,7 +1,7 @@ { "schema": { "bsonType": "object", - "required": ["user_id"], + "required": [], "properties": { "_id": { "description": "ID,系统自动生成" @@ -16,17 +16,20 @@ }, "device_uuid": { "bsonType": "string", - "description": "设备唯一标识(需要加密存储)" + "description": "设备唯一标识" }, "type": { "bsonType": "string", - "enum": ["login", "logout"], + "enum": [ + "login", + "logout" + ], "description": "登录类型" }, - "state": { - "bsonType": "int", - "description": "结果:0 失败、1 成功" - }, + "state": { + "bsonType": "int", + "description": "结果:0 失败、1 成功" + }, "ip": { "bsonType": "string", "description": "ip地址" @@ -40,5 +43,30 @@ } } }, - "index": [] -} + "index": [ + { + "IndexName": "user_id", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "user_id", + "Direction": "1" + } + ], + "MgoIsUnique": true + } + }, + { + "IndexName": "device_uuid", + "MgoKeySchema": { + "MgoIndexKeys": [ + { + "Name": "device_uuid", + "Direction": "1" + } + ], + "MgoIsUnique": true + } + } + ] +} \ No newline at end of file