package radio import ( "sundynix-go/global" "sundynix-go/model/system" ) // 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"` //包年价格 单位:分 CoverId string `gorm:"size:50" json:"coverId"` // 封面图OSS ID Cover *system.Oss `gorm:"foreignKey:CoverId" json:"cover"` // 封面图OSS 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:已订阅 Programs []*RadioProgram `gorm:"foreignKey:ChannelId" json:"programs"` //频道下的节目 } func (RadioChannel) TableName() string { return "sundynix_radio_channel" }