You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.1 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. package v1
  2. import (
  3. "practice_Go/internal/model/entity"
  4. "github.com/gogf/gf/v2/frame/g"
  5. )
  6. type ChannelList struct {
  7. Id int `json:"id" dc:"频道ID"`
  8. Name string `json:"name" dc:"频道名称"`
  9. }
  10. type GetChannelReq struct {
  11. g.Meta `path:"/channel" method:"post" tags:"Channel" summary:"获取单个频道"`
  12. Id int `v:"required|min:1#频道ID不能为空|频道ID不能小于1" dc:"频道ID"`
  13. UserId int `v:"required|min:90000000|max:99999999#用户ID不能为空|用户ID不能小于90000000|用户ID不能大于99999999" dc:"用户ID"`
  14. FlagType int `v:"min:1|max:2#类型不能小于1|类型不能大于2" dc:"列表类型"`
  15. }
  16. type GetChannelRes struct {
  17. *entity.GoChannels `json:"channel" dc:"单个频道"`
  18. List []*entity.GoShows `json:"shows" dc:"频道下的所有节目和对应创作人"`
  19. Status bool `json:"status" dc:"订阅状态"`
  20. }
  21. type GetChannelListReq struct {
  22. g.Meta `path:"/list" method:"get" tags:"ChannelList" summary:"获取频道列表"`
  23. }
  24. type GetChannelListRes struct {
  25. List []*ChannelList `json:"list" dc:"频道列表"`
  26. }