web
This commit is contained in:
27
server/internal/model/livestream.go
Normal file
27
server/internal/model/livestream.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// LiveStream 直播投流源模型
|
||||
type LiveStream struct {
|
||||
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
|
||||
Title string `json:"title" gorm:"type:varchar(255);not null;comment:投流源标题"`
|
||||
Platform string `json:"platform" gorm:"type:varchar(50);not null;comment:平台名称(如:抖音,快手,淘宝,京东,小红书等)"`
|
||||
StreamURL string `json:"stream_url" gorm:"type:varchar(500);not null;comment:投流URL地址"`
|
||||
CoverImage string `json:"cover_image" gorm:"type:varchar(500);comment:封面图片URL"`
|
||||
Description string `json:"description" gorm:"type:text;comment:描述信息"`
|
||||
Status int `json:"status" gorm:"type:tinyint;not null;default:1;comment:状态:0-禁用,1-启用"`
|
||||
Sort int `json:"sort" gorm:"type:int;not null;default:0;comment:排序值,数值越大越靠前"`
|
||||
ViewCount int `json:"view_count" gorm:"type:int;not null;default:0;comment:观看次数"`
|
||||
StartTime *time.Time `json:"start_time" gorm:"comment:开始时间"`
|
||||
EndTime *time.Time `json:"end_time" gorm:"comment:结束时间"`
|
||||
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
|
||||
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
|
||||
}
|
||||
|
||||
// TableName 指定表名
|
||||
func (LiveStream) TableName() string {
|
||||
return "ai_live_streams"
|
||||
}
|
||||
Reference in New Issue
Block a user