From 93c25b199d7ccb3d199989949f9baf20f5665a60 Mon Sep 17 00:00:00 2001 From: handongxun Date: Wed, 2 Sep 2020 20:18:42 +0800 Subject: [PATCH] add collection uni-id-log --- collection/uni-id-log/collection.json | 37 +++++++++++++++++++++++++++ collection/uni-id-log/package.json | 17 ++++++++++++ database/uni-id/db_init.json | 3 ++- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 collection/uni-id-log/collection.json create mode 100644 collection/uni-id-log/package.json diff --git a/collection/uni-id-log/collection.json b/collection/uni-id-log/collection.json new file mode 100644 index 0000000..38f7d84 --- /dev/null +++ b/collection/uni-id-log/collection.json @@ -0,0 +1,37 @@ +{ + "schema": { + "bsonType": "object", + "required": ["user_id"], + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "user_id": { + "bsonType": "string", + "description": "用户id,参考uni-id-users表" + }, + "ua": { + "bsonType": "string", + "description": "userAgent" + }, + "imei": { + "bsonType": "string", + "description": "imei(需要加密存储)" + }, + "type": { + "bsonType": "string", + "enum": ["login", "logout"], + "description": "登录类型" + }, + "ip": { + "bsonType": "string", + "description": "ip地址" + }, + "create_date": { + "bsonType": "timestamp", + "description": "创建时间" + } + } + }, + "index": [] +} diff --git a/collection/uni-id-log/package.json b/collection/uni-id-log/package.json new file mode 100644 index 0000000..f317fa8 --- /dev/null +++ b/collection/uni-id-log/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-id-log", + "version": "0.0.1", + "description": "uni-id-log", + "keywords": ["登录日志"], + "opendb": { + "title": "登录日志", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +} diff --git a/database/uni-id/db_init.json b/database/uni-id/db_init.json index 1ed697c..0f5f077 100644 --- a/database/uni-id/db_init.json +++ b/database/uni-id/db_init.json @@ -1,4 +1,5 @@ { + "uni-id-users": {}, "uni-id-address": {}, - "uni-id-users": {} + "uni-id-log": {} }