opendb-sms-task.schema.json 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
{
  "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"
      }
    }
  }
}