66 lines
1.9 KiB
Go
66 lines
1.9 KiB
Go
package dbstruct
|
||
|
||
type ActivityBanner struct {
|
||
Id *int64 `json:"id" bson:"_id"` // bannerId
|
||
Image *MediaComponent `json:"image" bson:"image"` // 主图
|
||
Title *string `json:"title" bson:"title"` // 标题
|
||
Hyperlinks *[]*Hyperlink `json:"hyperlinks" bson:"hyperlinks"` // 跳转链接
|
||
St *int64 `json:"st" bson:"st"` // 开始时间
|
||
Et *int64 `json:"et" bson:"et"` // 结束时间
|
||
DeviceType *[]int64 `json:"device_type" bson:"device_type"` // 支持的设备类型
|
||
Priority *int64 `json:"priority" bson:"priority"` // 优先级
|
||
Status *int64 `json:"status" bson:"status"` // 状态 0-已生效,1-已暂停
|
||
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
|
||
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
|
||
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
|
||
}
|
||
|
||
func (p *ActivityBanner) GetId() int64 {
|
||
if p == nil || p.Id == nil {
|
||
return -1
|
||
}
|
||
return *p.Id
|
||
}
|
||
|
||
func (p *ActivityBanner) GetPriority() int64 {
|
||
if p == nil || p.Priority == nil {
|
||
return -1
|
||
}
|
||
return *p.Priority
|
||
}
|
||
|
||
func (p *ActivityBanner) GetTitle() string {
|
||
if p == nil || p.Title == nil {
|
||
return ""
|
||
}
|
||
return *p.Title
|
||
}
|
||
|
||
func (p *ActivityBanner) GetSt() int64 {
|
||
if p == nil || p.St == nil {
|
||
return -1
|
||
}
|
||
return *p.St
|
||
}
|
||
|
||
func (p *ActivityBanner) GetEt() int64 {
|
||
if p == nil || p.Et == nil {
|
||
return -1
|
||
}
|
||
return *p.Et
|
||
}
|
||
|
||
func (p *ActivityBanner) GetHyperlinks() []*Hyperlink {
|
||
if p == nil || p.Hyperlinks == nil {
|
||
return make([]*Hyperlink, 0)
|
||
}
|
||
return *p.Hyperlinks
|
||
}
|
||
|
||
func (p *ActivityBanner) GetDeviceType() []int64 {
|
||
if p == nil || p.Hyperlinks == nil {
|
||
return make([]int64, 0)
|
||
}
|
||
return *p.DeviceType
|
||
}
|