gateWayGroup.go 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. package v1
  2. type AddGateWayGroupRequest struct {
  3. Name string `json:"name" form:"name" binding:"required"`
  4. Comment string `json:"comment" form:"comment"`
  5. }
  6. type SearchGatewayGroupParams struct {
  7. Name string `form:"name" json:"name"`
  8. HostId int `form:"host_id" json:"host_id"`
  9. RuleId int `form:"rule_id" json:"rule_id"`
  10. Operator int `form:"operator" json:"operator"`
  11. Current int `form:"current" json:"current" default:"1"`
  12. PageSize int `form:"page_size" json:"page_size" default:"10"`
  13. Column string `form:"column" json:"column" default:"id"`
  14. Order string `form:"order" json:"order" default:"desc"`
  15. }
  16. type DeleteGatewayGroupRequest struct {
  17. Id int `json:"id" form:"id" binding:"required"`
  18. }
  19. type AddGateWayGroupAdminRequest struct {
  20. Id int `json:"id" form:"id"`
  21. Name string `json:"name" form:"name" binding:"required"`
  22. Comment string `json:"comment" form:"comment"`
  23. HostId int `json:"host_id" form:"host_id"`
  24. RuleId int `json:"rule_id" form:"rule_id"`
  25. BanUdp int `gorm:"null" json:"banUdp" form:"banUdp" default:"0"`
  26. BanOverseas int `gorm:"null" json:"banOverseas" form:"banOverseas" default:"0"`
  27. Operator int `gorm:"not null" json:"operator" form:"operator" default:"1"`
  28. }