constant.go 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. package model
  2. //go:generate $GOPATH/src/go-common/app/tool/warden/protoc.sh
  3. const (
  4. // CountryChina .
  5. CountryChina = "86" // 中国地区码
  6. )
  7. // 短信模板状态
  8. const (
  9. // TemplateStatusNew .
  10. TemplateStatusNew = 0 // 新建
  11. // TemplateStatusApprovel .
  12. TemplateStatusApprovel = 1 // 已审核
  13. // TemplateStatusCanceled .
  14. TemplateStatusCanceled = 2 // 已取消
  15. )
  16. // 运营商
  17. const (
  18. // ProviderMengWang .
  19. ProviderMengWang = int32(2)
  20. // ProviderChuangLan
  21. ProviderChuangLan = int32(4)
  22. )
  23. // 短信类型
  24. const (
  25. // TypeSms 验证码
  26. TypeSms = int32(1)
  27. // TypeActSms 营销短信
  28. TypeActSms = int32(2)
  29. // TypeActBatch 批量营销
  30. TypeActBatch = int32(3)
  31. )
  32. // 短信回执用户行为日志
  33. const (
  34. // UserActionTypeSend 日志类型为发送
  35. UserActionTypeSend = int32(1)
  36. // UserActionCallback 日志类型为回执
  37. UserActionCallback = int32(2)
  38. // UserActionSendFailedStatus 发送失败的日志状态
  39. UserActionSendFailedStatus = "SUBMIT FAILED"
  40. // UserActionSendFailedDesc 发送失败的日志描述
  41. UserActionSendFailedDesc = "短信提交失败"
  42. // UserActionSendSuccessStatus 提交成功的日志状态
  43. UserActionSendSuccessStatus = "SUBMIT SUCCESS"
  44. // UserActionSendSuccessDesc 提交失败的日志描述
  45. UserActionSendSuccessDesc = "短信提交成功"
  46. )
  47. // 短信状态
  48. const (
  49. // StatusNew .
  50. StatusNew = int32(0)
  51. // StatusSuccess .
  52. StatusSuccess = int32(1)
  53. // StatusFail .
  54. StatusFail = int32(2)
  55. )
  56. // 短信任务类型
  57. const (
  58. // TaskTypeMobile 按手机号发送
  59. TaskTypeMobile = int32(1)
  60. // TaskTypeMid 按mid发送
  61. TaskTypeMid = int32(2)
  62. )
  63. // 短信任务状态
  64. const (
  65. // TaskStatusPrepared 准备发
  66. TaskStatusPrepared = int32(1)
  67. // TaskStatusDoing 进行中
  68. TaskStatusDoing = int32(2)
  69. // TaskStatusSuccess 发送成功
  70. TaskStatusSuccess = int32(3)
  71. // TaskStatusFailed 发送失败
  72. TaskStatusFailed = int32(4)
  73. // TaskStatusStop 停止发送
  74. TaskStatusStop = int32(5)
  75. )