opendb-sms-task.schema.json 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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": "全部用户发送"
  45. },
  46. "type": {
  47. "bsonType": "string",
  48. "description": "to.all=true时用来区分发送类型, 可选值 user | userTags"
  49. },
  50. "receiver": {
  51. "bsonType": "array",
  52. "description": "用户ID's \/ 用户标签ID's"
  53. }
  54. }
  55. },
  56. "send_qty": {
  57. "bsonType": "int",
  58. "description": "发送总数"
  59. },
  60. "success_qty": {
  61. "bsonType": "int",
  62. "description": "成功总数"
  63. },
  64. "fail_qty": {
  65. "bsonType": "int",
  66. "description": "失败总数"
  67. },
  68. "create_date": {
  69. "bsonType": "timestamp",
  70. "description": "创建时间",
  71. "forceDefaultValue": {
  72. "$env": "now"
  73. }
  74. }
  75. }
  76. }