Files
sundynix-radio-be/model/radio/radio_channel.go
T
2026-03-04 17:05:48 +08:00

31 lines
1.9 KiB
Go

package radio
import (
"sundynix-go/global"
"time"
)
// RadioChannel 电台频道表
type RadioChannel struct {
global.BaseModel
CategoryId string `gorm:"size:50;index" json:"categoryId"` // 分类ID
Name string `gorm:"size:50" json:"name"` // 频道名称
Description string `gorm:"size:500" json:"description"` // 频道描述
IsFree int `gorm:"default:0" json:"isFree"` //是否永久免费 0:否 1:是
IsVipOnly int `gorm:"default:0" json:"isVipOnly"` // 是否VIP专享 0:否 1:是
MonthlyPrice int `gorm:"default:0;comment:价格,单位,分 " json:"monthlyPrice"` //包月价格 单位:分
QuarterlyPrice int `gorm:"default:0;comment:价格,单位,分 " json:"quarterlyPrice"` //包季度价格 单位:分
AnnualPrice int `gorm:"default:0;comment:价格,单位,分 " json:"annualPrice"` //包年价格 单位:分
Cover string `gorm:"size:100" json:"cover"` // 封面emoji
Tags string `gorm:"size:255" json:"tags"` // 标签,逗号分隔
Sort int `gorm:"default:0" json:"sort"` // 排序
Status int `gorm:"default:1" json:"status"` // 状态 0:禁用 1:启用
HasSubscribed int `gorm:"-" json:"hasSubscribed"` // 状态 0:未订阅 1:已订阅
ExpiredAt *time.Time `gorm:"-" json:"expiredAt"` // 新增:过期时间,使用指针方便处理 null
Programs []*RadioProgram `gorm:"foreignKey:ChannelId" json:"programs"` //频道下的节目
}
func (RadioChannel) TableName() string {
return "sundynix_radio_channel"
}