81 lines
2.0 KiB
Go
81 lines
2.0 KiB
Go
package dbstruct
|
|
|
|
type ActivityHot struct {
|
|
Id *int64 `json:"id" bson:"_id"` // 热榜表id
|
|
Mid *int64 `json:"mid" bson:"mid"` // 主播mid
|
|
Image *MediaComponent `json:"image" bson:"image"` // 主图
|
|
Title *string `json:"title" bson:"title"` // 标题
|
|
Text *string `json:"text" bson:"text"` // 文字内容
|
|
Hyperlinks *[]*Hyperlink `json:"hyperlinks" bson:"hyperlinks"` // 跳转链接
|
|
St *int64 `json:"st" bson:"st"` // 开始时间
|
|
Et *int64 `json:"et" bson:"et"` // 结束时间
|
|
Priority *int64 `json:"priority" bson:"priority"` // 优先级
|
|
Status *int64 `json:"status" bson:"status"` // 状态
|
|
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
|
|
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
|
|
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
|
|
}
|
|
|
|
func (p *ActivityHot) GetId() int64 {
|
|
if p == nil || p.Id == nil {
|
|
return -1
|
|
}
|
|
return *p.Id
|
|
}
|
|
|
|
func (p *ActivityHot) GetMid() int64 {
|
|
if p == nil || p.Mid == nil {
|
|
return -1
|
|
}
|
|
return *p.Mid
|
|
}
|
|
|
|
func (p *ActivityHot) GetTitle() string {
|
|
if p == nil || p.Title == nil {
|
|
return ""
|
|
}
|
|
return *p.Title
|
|
}
|
|
|
|
func (p *ActivityHot) GetText() string {
|
|
if p == nil || p.Text == nil {
|
|
return ""
|
|
}
|
|
return *p.Text
|
|
}
|
|
|
|
func (p *ActivityHot) GetSt() int64 {
|
|
if p == nil || p.St == nil {
|
|
return -1
|
|
}
|
|
return *p.St
|
|
}
|
|
|
|
func (p *ActivityHot) GetEt() int64 {
|
|
if p == nil || p.Et == nil {
|
|
return -1
|
|
}
|
|
return *p.Et
|
|
}
|
|
|
|
func (p *ActivityHot) GetStatus() int64 {
|
|
if p == nil || p.Status == nil {
|
|
return -1
|
|
}
|
|
return *p.Status
|
|
}
|
|
|
|
func (p *ActivityHot) GetPriority() int64 {
|
|
if p == nil || p.Priority == nil {
|
|
return 0
|
|
}
|
|
return *p.Priority
|
|
}
|
|
|
|
func (p *ActivityHot) GetHyperlinks() []*Hyperlink {
|
|
if p == nil || p.Hyperlinks == nil {
|
|
return make([]*Hyperlink, 0)
|
|
}
|
|
return *p.Hyperlinks
|
|
}
|