feat: 互动处理

This commit is contained in:
Blizzard
2026-03-05 10:30:29 +08:00
parent 172e5f791f
commit 74b252550b
11 changed files with 846 additions and 790 deletions
+2
View File
@@ -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 {
+4
View File
@@ -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