From 7c75d2e8c65a5e42212930cdd040f9c764cc4752 Mon Sep 17 00:00:00 2001 From: handongxun Date: Mon, 7 Sep 2020 10:52:48 +0800 Subject: [PATCH 1/6] add collection uni-id-score, uni-id-task --- collection/uni-id-scores/collection.json | 37 +++++++++++++++++++ collection/uni-id-scores/package.json | 17 +++++++++ collection/uni-id-task-log/collection.json | 32 +++++++++++++++++ collection/uni-id-task-log/package.json | 17 +++++++++ collection/uni-id-task/collection.json | 40 +++++++++++++++++++++ collection/uni-id-task/package.json | 17 +++++++++ database/uni-id/db_init.json | 5 ++- uni-id-score.md | 41 ++++++++++++++++++++++ 8 files changed, 205 insertions(+), 1 deletion(-) create mode 100644 collection/uni-id-scores/collection.json create mode 100644 collection/uni-id-scores/package.json create mode 100644 collection/uni-id-task-log/collection.json create mode 100644 collection/uni-id-task-log/package.json create mode 100644 collection/uni-id-task/collection.json create mode 100644 collection/uni-id-task/package.json create mode 100644 uni-id-score.md diff --git a/collection/uni-id-scores/collection.json b/collection/uni-id-scores/collection.json new file mode 100644 index 0000000..b2635ba --- /dev/null +++ b/collection/uni-id-scores/collection.json @@ -0,0 +1,37 @@ +{ + "schema": { + "bsonType": "object", + "required": ["user_id", "score", "balance"], + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "user_id": { + "bsonType": "string", + "description": "用户id,参考uni-id-users表" + }, + "score": { + "bsonType": "int", + "description": "本次变化的积分" + }, + "type": { + "bsonType": "int", + "enum": [1, 2], + "description": "积分类型 1:收入 2:指出" + }, + "balance": { + "bsonType": "int", + "description": "变化后的积分余额" + }, + "comment": { + "bsonType": "string", + "description": "备注,说明积分新增、消费的缘由" + }, + "create_date": { + "bsonType": "timestamp", + "description": "创建时间" + } + } + }, + "index": [] +} diff --git a/collection/uni-id-scores/package.json b/collection/uni-id-scores/package.json new file mode 100644 index 0000000..80b0449 --- /dev/null +++ b/collection/uni-id-scores/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-id-scores", + "version": "0.0.1", + "description": "uni-id-scores", + "keywords": ["积分", "用户积分", "scores"], + "opendb": { + "title": "用户积分", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +} diff --git a/collection/uni-id-task-log/collection.json b/collection/uni-id-task-log/collection.json new file mode 100644 index 0000000..efb74ca --- /dev/null +++ b/collection/uni-id-task-log/collection.json @@ -0,0 +1,32 @@ +{ + "schema": { + "bsonType": "object", + "required": ["user_id", "task_id"], + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "user_id": { + "bsonType": "string", + "description": "用户id,参考uni-id-users表" + }, + "task_id": { + "bsonType": "string", + "description": "任务ID" + }, + "result": { + "bsonType": "bool", + "description": "任务执行结果,true:成功,false:失败" + }, + "bounty": { + "bsonType": "int", + "description": "奖励积分" + }, + "create_date": { + "bsonType": "timestamp", + "description": "创建时间" + } + } + }, + "index": [] +} diff --git a/collection/uni-id-task-log/package.json b/collection/uni-id-task-log/package.json new file mode 100644 index 0000000..0745e3c --- /dev/null +++ b/collection/uni-id-task-log/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-id-task-log", + "version": "0.0.1", + "description": "uni-id-task-log", + "keywords": ["任务日志", "task-log"], + "opendb": { + "title": "任务日志", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +} diff --git a/collection/uni-id-task/collection.json b/collection/uni-id-task/collection.json new file mode 100644 index 0000000..22b378c --- /dev/null +++ b/collection/uni-id-task/collection.json @@ -0,0 +1,40 @@ +{ + "schema": { + "bsonType": "object", + "required": ["name", "comment"], + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "name": { + "bsonType": "string", + "description": "任务名称" + }, + "comment": { + "bsonType": "string", + "description": "任务描述" + }, + "bounty": { + "bsonType": "int", + "description": "任务完成后的奖励积分" + }, + "max_per_hour": { + "bsonType": "int", + "description": "每小时允许执行的最大次数" + }, + "max_per_day": { + "bsonType": "int", + "description": "每天允许执行的最大次数" + }, + "max_per_week": { + "bsonType": "int", + "description": "每周允许执行的最大次数" + }, + "create_date": { + "bsonType": "timestamp", + "description": "创建时间" + } + } + }, + "index": [] +} diff --git a/collection/uni-id-task/package.json b/collection/uni-id-task/package.json new file mode 100644 index 0000000..ac2bbcc --- /dev/null +++ b/collection/uni-id-task/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-id-task", + "version": "0.0.1", + "description": "uni-id-task", + "keywords": ["任务", "task"], + "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 faa1972..8a263d3 100644 --- a/database/uni-id/db_init.json +++ b/database/uni-id/db_init.json @@ -3,5 +3,8 @@ "uni-id-address": {}, "uni-id-device": {}, "uni-id-log": {}, - "uni-id-base-order":{} + "uni-id-base-order":{}, + "uni-id-scores": {}, + "uni-id-task": {}, + "uni-id-task-log": {} } diff --git a/uni-id-score.md b/uni-id-score.md new file mode 100644 index 0000000..553ec00 --- /dev/null +++ b/uni-id-score.md @@ -0,0 +1,41 @@ + +## 用户积分表 + +表名:uni-id-scores + +| 字段 | 类型 | 必填 | 描述 | +| ---------------- | --------- | ---- | ------------------------------------------- | +| \_id | Object ID | 是 | 存储文档 ID,系统自动生成 | +| user_id | String | 是 | | +| score | Integer | 是 | 本次变化的积分 | +| type | Integer | 否 | 积分类型 1:收入 2:指出 | +| balance | Integer | 是 | 变化后的积分余额 | +| comment | String | 否 | 备注,说明积分新增、消费的缘由 | +| create_date | Timestamp | 否 | 创建时间 | + + +## 用户任务表 + +表名:uni-id-task + +| 字段 | 类型 | 必填 | 描述 | +| ---------------- | --------- | ---- | ------------------------------------------- | +| \_id | Object ID | 是 | 存储文档 ID,系统自动生成 | +| name | String | 是 | 任务名称 | +| comment | String | 是 | 任务描述 | +| bounty | Integer | 否 | 任务完成后的奖励积分 | +| max_per_hour | Integer | 否 | 每小时允许执行的最大次数 | +| max_per_day | Integer | 否 | 每天允许执行的最大次数 | +| max_per_week | Integer | 否 | 每周允许执行的最大次数 | +| create_date | Timestamp | 否 | 创建时间 | + +表名:uni-id-task-log + +| 字段 | 类型 | 必填 | 描述 | +| ---------------- | --------- | ---- | ------------------------------------------- | +| \_id | Object ID | 是 | 存储文档 ID,系统自动生成 | +| user_id | String | 是 | 用户ID | +| task_id | String | 是 | 任务ID | +| result | Boolean | 否 | 任务执行结果,true:成功,false:失败 | +| bounty | Integer | 否 | 奖励积分 | +| create_date | Timestamp | 否 | 创建时间 | From 89e0f6abeb008dcf152e54e0a7ee1a4628c0fa46 Mon Sep 17 00:00:00 2001 From: handongxun Date: Mon, 7 Sep 2020 19:58:32 +0800 Subject: [PATCH 2/6] add collection uni-id-followers --- collection/uni-id-followers/collection.json | 24 +++++++++++++++++++++ collection/uni-id-followers/package.json | 17 +++++++++++++++ database/uni-id/db_init.json | 3 ++- 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 collection/uni-id-followers/collection.json create mode 100644 collection/uni-id-followers/package.json diff --git a/collection/uni-id-followers/collection.json b/collection/uni-id-followers/collection.json new file mode 100644 index 0000000..d4c01b2 --- /dev/null +++ b/collection/uni-id-followers/collection.json @@ -0,0 +1,24 @@ +{ + "schema": { + "bsonType": "object", + "required": ["user_id"], + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "user_id": { + "bsonType": "string", + "description": "用户id,参考uni-id-users表" + }, + "follow_id": { + "bsonType": "string", + "description": "用户id,参考uni-id-users表" + }, + "create_date": { + "bsonType": "timestamp", + "description": "创建时间" + } + } + }, + "index": [] +} diff --git a/collection/uni-id-followers/package.json b/collection/uni-id-followers/package.json new file mode 100644 index 0000000..1b60092 --- /dev/null +++ b/collection/uni-id-followers/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-id-followers", + "version": "0.0.1", + "description": "uni-id-followers", + "keywords": ["关注用户", "followers"], + "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 8a263d3..31b71b3 100644 --- a/database/uni-id/db_init.json +++ b/database/uni-id/db_init.json @@ -6,5 +6,6 @@ "uni-id-base-order":{}, "uni-id-scores": {}, "uni-id-task": {}, - "uni-id-task-log": {} + "uni-id-task-log": {}, + "uni-id-followers": {} } From 508562342dfd8b2403b7f62d7c54af391f9531b1 Mon Sep 17 00:00:00 2001 From: phoooob <1162762894@qq.com> Date: Tue, 8 Sep 2020 10:34:47 +0800 Subject: [PATCH 3/6] =?UTF-8?q?!2=20=E4=BF=AE=E6=AD=A3=E9=80=80=E6=AC=BE?= =?UTF-8?q?=E9=87=91=E9=A2=9D=E5=AD=97=E6=AE=B5=20*=20=E9=80=80=E6=AC=BE?= =?UTF-8?q?=E9=87=91=E9=A2=9D=E6=94=B9=E4=B8=BAint=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=EF=BC=8C=E5=8D=95=E4=BD=8D=EF=BC=9A=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- collection/uni-id-base-order/collection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collection/uni-id-base-order/collection.json b/collection/uni-id-base-order/collection.json index eb70066..e63d500 100644 --- a/collection/uni-id-base-order/collection.json +++ b/collection/uni-id-base-order/collection.json @@ -41,8 +41,8 @@ "description": "是否是退款订单" }, "refund_amount": { - "bsonType": "float", - "description": "退款金额(非退款订单表示已退款总金额,退款订单表示该笔退款的退款金额),单位:元" + "bsonType": "int", + "description": "退款金额(非退款订单表示已退款总金额,退款订单表示该笔退款的退款金额),单位:分" }, "refund_count": { "bsonType": "int", From 0fedf8ef3747a81b485c0c0140cab9d6691d51c6 Mon Sep 17 00:00:00 2001 From: handongxun Date: Tue, 8 Sep 2020 14:30:04 +0800 Subject: [PATCH 4/6] update uni-id-followers --- collection/uni-id-followers/collection.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/collection/uni-id-followers/collection.json b/collection/uni-id-followers/collection.json index d4c01b2..cc7b3f1 100644 --- a/collection/uni-id-followers/collection.json +++ b/collection/uni-id-followers/collection.json @@ -6,13 +6,13 @@ "_id": { "description": "ID,系统自动生成" }, - "user_id": { + "friend_uid": { "bsonType": "string", - "description": "用户id,参考uni-id-users表" + "description": "被关注者user_id,参考uni-id-users表" }, - "follow_id": { + "follow_uid": { "bsonType": "string", - "description": "用户id,参考uni-id-users表" + "description": "关注者user_id,参考uni-id-users表" }, "create_date": { "bsonType": "timestamp", From b7973df379a8a08bd93e9fb3eaa843235b2ee16c Mon Sep 17 00:00:00 2001 From: handongxun Date: Tue, 8 Sep 2020 14:37:48 +0800 Subject: [PATCH 5/6] add collection opendb-news-favorite --- .../opendb-news-favorite/collection.json | 20 +++++++++++++++++++ collection/opendb-news-favorite/package.json | 17 ++++++++++++++++ collection/uni-id-followers/collection.json | 2 +- database/opendb-news/db_init.json | 3 ++- 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 collection/opendb-news-favorite/collection.json create mode 100644 collection/opendb-news-favorite/package.json diff --git a/collection/opendb-news-favorite/collection.json b/collection/opendb-news-favorite/collection.json new file mode 100644 index 0000000..ddce4fb --- /dev/null +++ b/collection/opendb-news-favorite/collection.json @@ -0,0 +1,20 @@ +{ + "schema": { + "bsonType": "object", + "required": ["user_id", "article_id"], + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "article_id": { + "bsonType": "string", + "description": "文章id,参考opendb-news-categories表" + }, + "user_id": { + "bsonType": "string", + "description": "收藏者id,参考uni-id-users表" + } + } + }, + "index": [] +} diff --git a/collection/opendb-news-favorite/package.json b/collection/opendb-news-favorite/package.json new file mode 100644 index 0000000..63c3bbb --- /dev/null +++ b/collection/opendb-news-favorite/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/opendb-news-favorite", + "version": "0.0.1", + "description": "opendb-news-favorite", + "keywords": ["收藏文章", "favorite"], + "opendb": { + "title": "收藏文章", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +} diff --git a/collection/uni-id-followers/collection.json b/collection/uni-id-followers/collection.json index cc7b3f1..6ca5b04 100644 --- a/collection/uni-id-followers/collection.json +++ b/collection/uni-id-followers/collection.json @@ -1,7 +1,7 @@ { "schema": { "bsonType": "object", - "required": ["user_id"], + "required": ["friend_uid", "follow_uid"], "properties": { "_id": { "description": "ID,系统自动生成" diff --git a/database/opendb-news/db_init.json b/database/opendb-news/db_init.json index d280a4d..754f1ed 100644 --- a/database/opendb-news/db_init.json +++ b/database/opendb-news/db_init.json @@ -1,5 +1,6 @@ { "opendb-news-articles": {}, "opendb-news-categories": {}, - "opendb-news-comments": {} + "opendb-news-comments": {}, + "opendb-news-favorite": {} } From 7a920054b6dcb7f43f7e3fd55b3363f186ef0f65 Mon Sep 17 00:00:00 2001 From: handongxun Date: Mon, 14 Sep 2020 15:41:38 +0800 Subject: [PATCH 6/6] add collection opendb-search-hot,opendb-search-log --- collection/opendb-search-hot/collection.json | 24 +++++++++++++++++ collection/opendb-search-hot/package.json | 17 ++++++++++++ collection/opendb-search-log/collection.json | 28 ++++++++++++++++++++ collection/opendb-search-log/package.json | 17 ++++++++++++ 4 files changed, 86 insertions(+) create mode 100644 collection/opendb-search-hot/collection.json create mode 100644 collection/opendb-search-hot/package.json create mode 100644 collection/opendb-search-log/collection.json create mode 100644 collection/opendb-search-log/package.json diff --git a/collection/opendb-search-hot/collection.json b/collection/opendb-search-hot/collection.json new file mode 100644 index 0000000..8c06238 --- /dev/null +++ b/collection/opendb-search-hot/collection.json @@ -0,0 +1,24 @@ +{ + "schema": { + "bsonType": "object", + "required": ["content", "count"], + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "content": { + "bsonType": "string", + "description": "搜索内容" + }, + "count": { + "bsonType": "long", + "description": "搜索次数" + }, + "create_date": { + "bsonType": "timestamp", + "description": "统计时间" + } + } + }, + "index": [] +} diff --git a/collection/opendb-search-hot/package.json b/collection/opendb-search-hot/package.json new file mode 100644 index 0000000..1561e11 --- /dev/null +++ b/collection/opendb-search-hot/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/opendb-search-hot", + "version": "0.0.1", + "description": "opendb-search-hot", + "keywords": ["热搜"], + "opendb": { + "title": "热搜", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +} diff --git a/collection/opendb-search-log/collection.json b/collection/opendb-search-log/collection.json new file mode 100644 index 0000000..e46deba --- /dev/null +++ b/collection/opendb-search-log/collection.json @@ -0,0 +1,28 @@ +{ + "schema": { + "bsonType": "object", + "required": ["user_id", "content"], + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "user_id": { + "bsonType": "string", + "description": "收藏者id,参考uni-id-users表" + }, + "device_id": { + "bsonType": "string", + "description": "设备id" + }, + "content": { + "bsonType": "string", + "description": "搜索内容" + }, + "create_date": { + "bsonType": "timestamp", + "description": "统计时间" + } + } + }, + "index": [] +} diff --git a/collection/opendb-search-log/package.json b/collection/opendb-search-log/package.json new file mode 100644 index 0000000..84a5aae --- /dev/null +++ b/collection/opendb-search-log/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/opendb-search-log", + "version": "0.0.1", + "description": "opendb-search-log", + "keywords": ["搜索记录"], + "opendb": { + "title": "搜索记录", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +}