This commit is contained in:
phoooob 2020-09-20 07:53:57 +08:00
commit a18b1a3c4f
17 changed files with 372 additions and 2 deletions

View File

@ -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": []
}

View File

@ -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"
}
]
}
}

View File

@ -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": []
}

View File

@ -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"
}
]
}
}

View File

@ -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": []
}

View File

@ -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"
}
]
}
}

View File

@ -0,0 +1,24 @@
{
"schema": {
"bsonType": "object",
"required": ["friend_uid", "follow_uid"],
"properties": {
"_id": {
"description": "ID系统自动生成"
},
"friend_uid": {
"bsonType": "string",
"description": "被关注者user_id参考uni-id-users表"
},
"follow_uid": {
"bsonType": "string",
"description": "关注者user_id参考uni-id-users表"
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间"
}
}
},
"index": []
}

View File

@ -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"
}
]
}
}

View File

@ -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": []
}

View File

@ -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"
}
]
}
}

View File

@ -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": []
}

View File

@ -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"
}
]
}
}

View File

@ -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": []
}

View File

@ -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"
}
]
}
}

View File

@ -1,5 +1,6 @@
{
"opendb-news-articles": {},
"opendb-news-categories": {},
"opendb-news-comments": {}
"opendb-news-comments": {},
"opendb-news-favorite": {}
}

View File

@ -3,5 +3,9 @@
"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": {},
"uni-id-followers": {}
}

41
uni-id-score.md Normal file
View File

@ -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 | 否 | 创建时间 |