27 lines
1.3 KiB
Go
27 lines
1.3 KiB
Go
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"` // 频道描述
|
|
Price int `gorm:"default:0;comment:价格,单位,分 " json:"price"` //价格 单位:分
|
|
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"` // 标签,逗号分隔
|
|
IsVipOnly int `gorm:"default:0" json:"isVipOnly"` // 是否VIP专享 0:否 1:是
|
|
Sort int `gorm:"default:0" json:"sort"` // 排序
|
|
Status int `gorm:"default:1" json:"status"` // 状态 0:禁用 1:启用
|
|
HasSubscribed int `gorm:"-" json:"hasSubscribed"` // 状态 0:未订阅 1:已订阅
|
|
}
|
|
|
|
func (RadioChannel) TableName() string {
|
|
return "sundynix_radio_channel"
|
|
}
|