param.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package param
  2. // AddBusAttrParam describe params of add or update business attrs
  3. type AddBusAttrParam struct {
  4. ID int64 `form:"id" json:"id"`
  5. Bid int64 `form:"bid" json:"bid"`
  6. Name string `form:"name" json:"name"`
  7. DealType int8 `form:"deal_type" json:"deal_type"`
  8. ExpireTime int64 `form:"expire_time" json:"expire_time"`
  9. AssignType int8 `form:"assign_type" json:"assign_type"`
  10. AssignMax int8 `form:"assign_max" json:"assign_max"`
  11. GroupType int8 `form:"group_type" json:"group_type"`
  12. BusinessName string `form:"business_name" json:"business_name"`
  13. }
  14. // BusAttrButtonSwitch .
  15. type BusAttrButtonSwitch struct {
  16. Bid int8 `form:"bid" json:"bid" validate:"required"`
  17. Index uint8 `form:"index" json:"index" validate:"min=0,max=7"`
  18. Switch uint8 `form:"switch" json:"switch" validate:"min=0,max=1"`
  19. }
  20. // BusAttrButtonShortCut .
  21. type BusAttrButtonShortCut struct {
  22. Bid int8 `form:"bid" json:"bid" validate:"required"`
  23. Index int8 `form:"index" json:"index" validate:"min=0,max=7"`
  24. ShortCut string `form:"short_cut" json:"short_cut" validate:"required"`
  25. }
  26. // BusAttrExtAPI .
  27. type BusAttrExtAPI struct {
  28. Bid int8 `form:"bid" json:"bid" validate:"required"`
  29. ExternalAPI string `form:"external_api" json:"external_api"`
  30. }
  31. // BlockInfo .
  32. type BlockInfo struct {
  33. Mid int64 `form:"mid" json:"mid" validate:"required"`
  34. }
  35. // Source .
  36. type Source struct {
  37. Bid int8 `form:"bid" json:"bid" validate:"required"`
  38. }