diff --git a/collection/uni-batch-sms-result/collection.json b/collection/uni-batch-sms-result/collection.json new file mode 100644 index 0000000..0d135d0 --- /dev/null +++ b/collection/uni-batch-sms-result/collection.json @@ -0,0 +1,66 @@ +{ + "schema": { + "bsonType": "object", + "required": [], + "permission": { + "read": false, + "create": false, + "update": false, + "delete": false + }, + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "task_id": { + "bsonType": "string", + "description": "任务ID", + "foreignKey": "batch-sms-task._id" + }, + "uid": { + "bsonType": "string", + "description": "用户ID", + "foreignKey": "uni-id-users._id" + }, + "mobile": { + "bsonType": "int", + "description": "手机号" + }, + "var_data": { + "bsonType": "object", + "description": "变量数据" + }, + "status": { + "bsonType": "int", + "description": "发送状态", + "defaultValue": 0, + "enum": [{ + "text": "未发送", + "value": 0 + }, { + "text": "已发送", + "value": 1 + }, { + "text": "发送失败", + "value": 2 + }] + }, + "reason": { + "bsonType": "string", + "description": "发送失败原因" + }, + "send_date": { + "bsonType": "timestamp", + "description": "发送时间" + }, + "ccreate_date": { + "bsonType": "timestamp", + "description": "创建时间", + "forceDefaultValue": { + "$env": "now" + } + } + } + }, + "index": [] +} \ No newline at end of file diff --git a/collection/uni-batch-sms-result/package.json b/collection/uni-batch-sms-result/package.json new file mode 100644 index 0000000..241a261 --- /dev/null +++ b/collection/uni-batch-sms-result/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-batch-sms-result", + "version": "0.0.1", + "description": "uni-batch-sms-result", + "keywords": ["群发短信结果"], + "opendb": { + "title": "群发短信结果", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +} \ No newline at end of file diff --git a/collection/uni-batch-sms-task/collection.json b/collection/uni-batch-sms-task/collection.json new file mode 100644 index 0000000..a789dc7 --- /dev/null +++ b/collection/uni-batch-sms-task/collection.json @@ -0,0 +1,79 @@ +{ + "schema": { + "bsonType": "object", + "required": [], + "permission": { + "read": false, + "create": false, + "update": false, + "delete": false + }, + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "name": { + "bsonType": "string", + "description": "任务名称", + "trim": "both" + }, + "app_id": { + "bsonType": "string", + "description": "App ID", + "trim": "both" + }, + "template_id": { + "bsonType": "string", + "description": "短信模板ID", + "trim": "both" + }, + "template_content": { + "bsonType": "string", + "description": "短信模板内容", + "trim": "both" + }, + "vars": { + "bsonType": "array", + "description": "短信变量" + }, + "to": { + "bsonType": "object", + "description": "短信接收者信息", + "properties": { + "all": { + "bsonType": "bool", + "description": "全部用户发送" + }, + "type": { + "bsonType": "string", + "description": "to.all=true时用来区分发送类型, 可选值 user | userTags" + }, + "receiver": { + "bsonType": "array", + "description": "用户ID's \/ 用户标签ID's" + } + } + }, + "send_qty": { + "bsonType": "int", + "description": "发送总数" + }, + "success_qty": { + "bsonType": "int", + "description": "成功总数" + }, + "fail_qty": { + "bsonType": "int", + "description": "失败总数" + }, + "create_date": { + "bsonType": "timestamp", + "description": "创建时间", + "forceDefaultValue": { + "$env": "now" + } + } + } + }, + "index": [] +} \ No newline at end of file diff --git a/collection/uni-batch-sms-task/package.json b/collection/uni-batch-sms-task/package.json new file mode 100644 index 0000000..89efa82 --- /dev/null +++ b/collection/uni-batch-sms-task/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-batch-sms-task", + "version": "0.0.1", + "description": "uni-batch-sms-task", + "keywords": ["群发短信任务"], + "opendb": { + "title": "群发短信任务", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +} \ No newline at end of file diff --git a/collection/uni-batch-sms-template/collection.json b/collection/uni-batch-sms-template/collection.json new file mode 100644 index 0000000..1129caf --- /dev/null +++ b/collection/uni-batch-sms-template/collection.json @@ -0,0 +1,34 @@ +{ + "schema": { + "bsonType": "object", + "required": [], + "permission": { + "read": false, + "create": false, + "update": false, + "delete": false + }, + "properties": { + "_id": { + "description": "模板ID" + }, + "name": { + "bsonType": "string", + "description": "模板名称" + }, + "content": { + "bsonType": "string", + "description": "模板内容" + }, + "type": { + "bsonType": "int", + "description": "模板类型" + }, + "sign": { + "bsonType": "string", + "description": "模板签名" + } + } + }, + "index": [] +} \ No newline at end of file diff --git a/collection/uni-batch-sms-template/package.json b/collection/uni-batch-sms-template/package.json new file mode 100644 index 0000000..9dd9550 --- /dev/null +++ b/collection/uni-batch-sms-template/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-batch-sms-template", + "version": "0.0.1", + "description": "uni-batch-sms-template", + "keywords": ["群发短信模板"], + "opendb": { + "title": "群发短信模板", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +} \ No newline at end of file diff --git a/database/opendb-admin/db_init.json b/database/opendb-admin/db_init.json index f73d539..305093b 100644 --- a/database/opendb-admin/db_init.json +++ b/database/opendb-admin/db_init.json @@ -24,5 +24,8 @@ "uni-stat-run-errors": {}, "uni-stat-session-logs": {}, "uni-stat-share-logs": {}, - "uni-stat-user-session-logs": {} + "uni-stat-user-session-logs": {}, + "uni-batch-sms-template": {}, + "uni-batch-sms-task": {}, + "uni-batch-sms-result": {} }