opendb-sms-task.schema.json 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. {
  2. "bsonType": "object",
  3. "required": [],
  4. "permission": {
  5. "read": false,
  6. "create": false,
  7. "update": false,
  8. "delete": false
  9. },
  10. "properties": {
  11. "_id": {
  12. "description": "ID,系统自动生成"
  13. },
  14. "name": {
  15. "bsonType": "string",
  16. "description": "任务名称",
  17. "trim": "both"
  18. },
  19. "app_id": {
  20. "bsonType": "string",
  21. "description": "App ID",
  22. "trim": "both"
  23. },
  24. "template_id": {
  25. "bsonType": "string",
  26. "description": "短信模板ID",
  27. "trim": "both"
  28. },
  29. "template_content": {
  30. "bsonType": "string",
  31. "description": "短信模板内容",
  32. "trim": "both"
  33. },
  34. "vars": {
  35. "bsonType": "array",
  36. "description": "短信变量"
  37. },
  38. "to": {
  39. "bsonType": "object",
  40. "description": "短信接收者信息",
  41. "properties": {
  42. "all": {
  43. "bsonType": "bool",
  44. "description": "全部用户发送;字段废弃,由 condition 替代"
  45. },
  46. "type": {
  47. "bsonType": "string",
  48. "description": "可选值 user | userTags"
  49. },
  50. "receiver": {
  51. "bsonType": "array",
  52. "description": "用户ID's / 用户标签ID's;指定id发送"
  53. },
  54. "condition": {
  55. "bsonType": "object",
  56. "description": "根据条件发送,例如给所有人发送"
  57. }
  58. }
  59. },
  60. "send_qty": {
  61. "bsonType": "int",
  62. "description": "发送总数"
  63. },
  64. "success_qty": {
  65. "bsonType": "int",
  66. "description": "成功总数"
  67. },
  68. "fail_qty": {
  69. "bsonType": "int",
  70. "description": "失败总数"
  71. },
  72. "create_date": {
  73. "bsonType": "timestamp",
  74. "description": "创建时间",
  75. "forceDefaultValue": {
  76. "$env": "now"
  77. }
  78. }
  79. },
  80. "version": "0.0.1"
  81. }