channel.go 941 B

1234567891011121314151617181920212223242526
  1. package request
  2. type ChannelCreate struct {
  3. ChannelCode string `json:"channel_code" binding:"required"`
  4. ChannelName string `json:"channel_name" binding:"required"`
  5. Direction string `json:"direction" binding:"required"`
  6. AllowTemporary bool `json:"allow_temporary"`
  7. Description string `json:"description"`
  8. }
  9. type ChannelUpdate struct {
  10. ID uint `json:"id" binding:"required"`
  11. ChannelCode string `json:"channel_code" binding:"required"`
  12. ChannelName string `json:"channel_name" binding:"required"`
  13. Direction string `json:"direction" binding:"required"`
  14. AllowTemporary bool `json:"allow_temporary"`
  15. Description string `json:"description"`
  16. }
  17. type ChannelQuery struct {
  18. ChannelCode string `form:"channel_code"`
  19. ChannelName string `form:"channel_name"`
  20. Direction string `form:"direction"`
  21. Page int `form:"page,default=1"`
  22. PageSize int `form:"page_size,default=10"`
  23. }