Files
sundynix-radio-be/model/radio/request/interaction.go
T
2026-03-10 15:12:29 +08:00

85 lines
2.4 KiB
Go

package request
import common "sundynix-go/model/commom/request"
// SubscribeChannel 订阅频道请求
type SubscribeChannel struct {
ChannelId string `json:"channelId" binding:"required"` // 频道ID
}
// UnsubscribeChannel 退订频道请求
type UnsubscribeChannel struct {
ChannelId string `json:"channelId" binding:"required"` // 频道ID
}
// AddHistory 添加收听历史请求
type AddHistory struct {
ProgramId string `json:"programId" binding:"required"` // 节目ID
Progress int `json:"progress"` // 播放进度(秒)
Duration int `json:"duration"` // 节目总时长(秒)
}
type RemoveHistory struct {
ProgramId string `json:"programId" binding:"required"` // 节目ID
}
// ToggleLike 切换点赞请求
type ToggleLike struct {
ProgramId string `json:"programId" binding:"required"` // 节目ID
}
// AddFavorite 添加收藏请求
type AddFavorite struct {
ProgramId string `json:"programId" binding:"required"` // 节目ID
}
// RemoveFavorite 移除收藏请求
type RemoveFavorite struct {
ProgramId string `json:"programId" binding:"required"` // 节目ID
}
// AddComment 添加评论请求
type AddComment struct {
ProgramId string `json:"programId" binding:"required"` // 节目ID
ParentId string `json:"parentId"` // 父评论ID
Content string `json:"content" binding:"required"` // 评论内容
}
// DeleteComment 删除评论请求
type DeleteComment struct {
CommentId string `json:"commentId" binding:"required"` // 评论ID
}
// GetHistoryList 获取收听历史列表请求
type GetHistoryList struct {
common.PageInfo
}
// GetLikeList 获取点赞列表请求
type GetLikeList struct {
common.PageInfo
}
// GetFavoriteList 获取收藏列表请求
type GetFavoriteList struct {
common.PageInfo
}
// GetCommentList 获取评论列表请求
type GetCommentList struct {
common.PageInfo
ProgramId string `json:"programId" form:"programId"` // 节目ID
}
// GetSubscriptionList 获取订阅列表请求
type GetSubscriptionList struct {
common.PageInfo
}
// TrendQuery 趋势查询请求(复用于所有趋势分析接口)
type TrendQuery struct {
StartDate string `json:"startDate" form:"startDate"` // 开始日期 "2026-01-01"
EndDate string `json:"endDate" form:"endDate"` // 结束日期 "2026-03-10"
ChannelId string `json:"channelId" form:"channelId"` // 可选,按频道筛选
}