feat: 群发短信表(template, task, result)

This commit is contained in:
chenruilong 2022-11-28 11:47:41 +08:00
parent d61e353191
commit fde80486b8
7 changed files with 234 additions and 1 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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