params.go 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. package model
  2. import "go-common/library/time"
  3. // ArgID .
  4. type ArgID struct {
  5. ID int64 `form:"id" validate:"required"`
  6. }
  7. // ArgPointHistory .
  8. type ArgPointHistory struct {
  9. Mid int64 `form:"id"`
  10. ChangeType int64 `form:"change_type"`
  11. StartChangeTime int64 `form:"start_change_time"`
  12. EndChangeTime int64 `form:"end_change_time"`
  13. BatchID int64 `form:"batch_id"`
  14. RelationID int64 `form:"relation_id"`
  15. }
  16. // ArgIDExtra .
  17. type ArgIDExtra struct {
  18. ID int64 `form:"id" validate:"required"`
  19. Status int8 `form:"status" validate:"required"`
  20. Operator string
  21. }
  22. // ArgPage .
  23. type ArgPage struct {
  24. Ps int `form:"ps"`
  25. Pn int `form:"pn"`
  26. Status int `form:"status"`
  27. }
  28. // ArgPoolID .
  29. type ArgPoolID struct {
  30. PoolID int `form:"pool_id" validate:"required"`
  31. }
  32. // ArgReSource .
  33. type ArgReSource struct {
  34. ID int `form:"id"`
  35. Increment int `form:"increment"`
  36. StartTime time.Time `form:"start_time"`
  37. EndTime time.Time `form:"end_time"`
  38. }
  39. // ArgAddPrivilege add privilege.
  40. type ArgAddPrivilege struct {
  41. Name string `json:"name" form:"name" validate:"required"`
  42. Title string `json:"title" form:"title" validate:"required"`
  43. Explain string `json:"explain" form:"explain" validate:"required"`
  44. Type int8 `json:"type" form:"type"`
  45. LangType int8 `json:"lang_type" form:"lang_type"`
  46. Operator string `json:"operator"`
  47. WebLink string `json:"web_link" form:"web_link"`
  48. AppLink string `json:"app_link" form:"app_link"`
  49. }
  50. // ArgUpdatePrivilege update privilege.
  51. type ArgUpdatePrivilege struct {
  52. ID int64 `form:"id" validate:"required"`
  53. Name string `json:"name" form:"name" validate:"required"`
  54. Title string `json:"title" form:"title" validate:"required"`
  55. Explain string `json:"explain" form:"explain" validate:"required"`
  56. Type int8 `json:"type" form:"type"`
  57. Operator string `json:"operator"`
  58. WebLink string `json:"web_link" form:"web_link"`
  59. AppLink string `json:"app_link" form:"app_link"`
  60. }
  61. // ArgImage arg image.
  62. type ArgImage struct {
  63. IconFileType string
  64. IconBody []byte
  65. IconGrayFileType string
  66. IconGrayBody []byte
  67. WebImageFileType string
  68. WebImageBody []byte
  69. AppImageFileType string
  70. AppImageBody []byte
  71. }
  72. // ArgStatePrivilege def.
  73. type ArgStatePrivilege struct {
  74. ID int64 `form:"id" validate:"required"`
  75. Status int8 `form:"state"`
  76. }
  77. // ArgPivilegeID def.
  78. type ArgPivilegeID struct {
  79. ID int64 `form:"id" validate:"required"`
  80. }
  81. // ArgOrder def.
  82. type ArgOrder struct {
  83. AID int64 `form:"aid" validate:"required"`
  84. BID int64 `form:"bid" validate:"required"`
  85. }
  86. // ArgAddJointly arg add jointly.
  87. type ArgAddJointly struct {
  88. Title string `form:"title" validate:"required"`
  89. Content string `form:"content"`
  90. StartTime int64 `form:"start_time" validate:"required"`
  91. EndTime int64 `form:"end_time" validate:"required"`
  92. Link string `form:"link" validate:"required"`
  93. IsHot int8 `form:"is_hot" `
  94. Operator string
  95. }
  96. // ArgModifyJointly arg modify jointly.
  97. type ArgModifyJointly struct {
  98. ID int64 `form:"id" validate:"required"`
  99. Title string `form:"title" validate:"required"`
  100. Content string `form:"content" validate:"required"`
  101. Link string `form:"link" validate:"required"`
  102. IsHot int8 `form:"is_hot" `
  103. StartTime int64 `form:"start_time" validate:"required"`
  104. EndTime int64 `form:"end_time" validate:"required"`
  105. Operator string
  106. }
  107. // ArgQueryJointly query jointly params .
  108. type ArgQueryJointly struct {
  109. State int8 `form:"state" `
  110. }
  111. // ArgJointlyID .
  112. type ArgJointlyID struct {
  113. ID int64 `form:"id" validate:"required"`
  114. }
  115. //ArgPayOrder qeury order.
  116. type ArgPayOrder struct {
  117. Mid int64 `form:"mid"`
  118. OrderNo string `form:"order_no"`
  119. Status int8 `form:"status"`
  120. PN int `form:"pn" default:"1"`
  121. PS int `form:"ps" default:"20"`
  122. }