feat: 互动处理
This commit is contained in:
@@ -21,6 +21,8 @@ type RadioProgram struct {
|
||||
LikeCount int `gorm:"default:0" json:"likeCount"` // 点赞次数
|
||||
Status int `gorm:"default:1" json:"status"` // 状态 0:下架 1:上架
|
||||
Channel *RadioChannel `gorm:"foreignKey:ChannelId" json:"channel"`
|
||||
HasLiked int `gorm:"-" json:"hasLiked"` // 是否点赞
|
||||
HasFavorite int `gorm:"-" json:"HasFavorite"` // 是否收藏
|
||||
}
|
||||
|
||||
func (RadioProgram) TableName() string {
|
||||
|
||||
@@ -19,6 +19,10 @@ type AddHistory struct {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user