feat: 支付闭环

This commit is contained in:
Blizzard
2026-03-04 17:05:48 +08:00
parent 042c99aa46
commit 7a32f8a351
31 changed files with 902 additions and 503 deletions
+5 -3
View File
@@ -2,14 +2,16 @@ package radio
import (
"sundynix-go/global"
"time"
)
// RadioSubscription 用户订阅表
type RadioSubscription struct {
global.BaseModel
UserId string `gorm:"size:50;index;not null;uniqueIndex:idx_user_channel" json:"userId"` // 用户ID
ChannelId string `gorm:"size:50;index;uniqueIndex:idx_user_channel" json:"channelId"` // 频道ID
Status int `gorm:"type:tinyint;default:1"` //1-订阅中,2-已取消
UserId string `gorm:"size:50;index;not null;" json:"userId"` // 用户ID
ChannelId string `gorm:"size:50;index;" json:"channelId"` // 频道ID
ExpiredAt time.Time `gorm:"index"`
Status int `gorm:"type:tinyint;default:1"` //1-订阅中,2-已到期
Channel *RadioChannel `gorm:"foreignKey:ChannelId" json:"channel"`
}