package v1 import ( "practice_Go/internal/model/entity" "github.com/gogf/gf/v2/frame/g" ) type Channel struct { Id int `json:"id" dc:"频道ID"` Image string `json:"image" dc:"频道图片"` Name string `json:"name" dc:"频道名称"` SubscriptionCount int `json:"subscriptionCount" dc:"频道订阅数量"` BackgroundImage string `json:"backgroundImage" dc:"频道背景图"` Status bool `json:"status" dc:"订阅状态"` } type ChannelList struct { Id int `json:"id" dc:"频道ID"` Name string `json:"name" dc:"频道名称"` } type GetChannelReq struct { g.Meta `path:"/channel" method:"post" tags:"Channel" summary:"获取单个频道"` Id int `v:"required|min:1#频道ID不能为空|频道ID不能小于1" dc:"频道ID"` UserId int `v:"required|min:90000000|max:99999999#用户ID不能为空|用户ID不能小于90000000|用户ID不能大于99999999" dc:"用户ID"` FlagType int `v:"min:1|max:2#类型不能小于1|类型不能大于2" dc:"列表类型"` } type GetChannelRes struct { *Channel `json:"channel" dc:"单个频道"` List []*entity.GoShows `json:"shows" dc:"频道下的所有节目和对应创作人"` } type GetChannelListReq struct { g.Meta `path:"/list" method:"get" tags:"ChannelList" summary:"获取频道列表"` } type GetChannelListRes struct { List []*ChannelList `json:"list" dc:"频道列表"` }