s_verify_code.go 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package schema
  2. import "time"
  3. // VerifyCodeRequest 手机验证码请求参数
  4. type VerifyCodeRequest struct {
  5. Tel string `json:"tel" v:"required#手机号不能为空|phone#请输入合法的手机号"` // 手机号
  6. Bzty int `json:"bzty" v:"required#业务类型参数不能为空|between:1,2#请输入正确的业务参数"` // 业务类型(1:登录 2:忘记密码 3故障通知)
  7. TelCount int `json:"count"` // 数量
  8. TimeStr string `json:"time_str"` // 时间字符串
  9. IpCount int `json:"ip_count"` // 同一IP发送次数
  10. TemplateId string `json:"template_id"` // 模板id
  11. BusinessTypeStr string `json:"business_type_str"` // 业务类型描述
  12. Expired time.Duration `json:"expired"`
  13. ResendLimit time.Duration `json:"resend_limit"`
  14. ParamsJson string `json:"params_json"`
  15. Phone []string `json:"phone"`
  16. Batch bool `json:"batch"`
  17. }
  18. // VerifyCodeItem 验证码存储项
  19. type VerifyCodeItem struct {
  20. Code string `json:"code"` // 验证码
  21. BusinessType int `json:"bzty"` // 业务类型(1:登录 2:忘记密码)
  22. }
  23. // VerifyCodeCheck 验证码检查
  24. type VerifyCodeCheck struct {
  25. Token string `json:"token"` // 令牌
  26. Tel string `json:"tel"` // 手机号
  27. BusinessType int `json:"bzty"` // 业务类型(1:登录 2:忘记密码)
  28. Code string `json:"code"` // 验证码
  29. }
  30. type VerifyCodeResponse struct {
  31. Token string `json:"token"` //令牌
  32. }
  33. type StoreCountItem struct {
  34. Count int `json:"count"`
  35. }
  36. type SendMessageRequest struct {
  37. Tel string `json:"tel"` // 电话
  38. Bzty int `json:"bzty"` // 业务类型
  39. TemplateId string `json:"template_id"` // 模板id
  40. }
  41. type FaultNoticeRequest struct {
  42. }