From c48ebb4f4d4eecb66e826d146e9fdc7adc52b8ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E7=BA=A2=E4=BF=9D?= Date: Wed, 4 Nov 2020 15:46:23 +0800 Subject: [PATCH] add opendb-admin-log --- collection/opendb-admin-log/collection.json | 38 +++++++++++++++++++++ collection/opendb-admin-log/package.json | 17 +++++++++ database/opendb-admin/db_init.json | 3 +- 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 collection/opendb-admin-log/collection.json create mode 100644 collection/opendb-admin-log/package.json diff --git a/collection/opendb-admin-log/collection.json b/collection/opendb-admin-log/collection.json new file mode 100644 index 0000000..83477c5 --- /dev/null +++ b/collection/opendb-admin-log/collection.json @@ -0,0 +1,38 @@ +{ + "schema": { + "bsonType": "object", + "required": ["user_id","content"], + "permission": { + "read": false, + "create": false, + "update": false, + "delete": false + }, + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "user_id": { + "bsonType": "string", + "description": "用户id,参考uni-id-users表" + }, + "user_name": { + "bsonType": "string", + "description": "用户名或昵称,冗余设计" + }, + "content": { + "bsonType": "string", + "description": "日志内容,如:修改密码" + }, + "ip": { + "bsonType": "string", + "description": "ip地址" + }, + "create_date": { + "bsonType": "timestamp", + "description": "创建时间" + } + } + }, + "index": [] +} diff --git a/collection/opendb-admin-log/package.json b/collection/opendb-admin-log/package.json new file mode 100644 index 0000000..649bc41 --- /dev/null +++ b/collection/opendb-admin-log/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/opendb-admin-log", + "version": "0.0.1", + "description": "通用系统日志", + "keywords": ["日志"], + "opendb": { + "title": "系统日志", + "type": "collection", + "contributors": [ + { + "name": "CHB", + "email": "", + "homepage": "" + } + ] + } +} diff --git a/database/opendb-admin/db_init.json b/database/opendb-admin/db_init.json index 6da8e3d..224681c 100644 --- a/database/opendb-admin/db_init.json +++ b/database/opendb-admin/db_init.json @@ -1,3 +1,4 @@ { - "opendb-admin-menus": {} + "opendb-admin-menus": {}, + "opendb-admin-log":{} }