service/dbstruct/notification.go

96 lines
3.8 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package dbstruct
type Notification struct {
Id *int64 `json:"id" bson:"_id"` // 系统通知表id
SubMid *int64 `json:"sub_mid" bson:"sub_mid"` // 通知发送人mid
ObjType *int64 `json:"obj_type" bson:"obj_type"` // 通知接收人类型
ObjMids []int64 `json:"obj_mids" bson:"obj_mids"` // 通知接收人mids
NType *int64 `json:"n_type" bson:"n_type"` // 消息类型
NDesc *string `json:"n_desc" bson:"n_desc"` // 消息描述
Message *string `json:"message" bson:"message"` // 消息内容
Thumbnail *MediaComponent `json:"thumbnail" bson:"thumbnail"` // 缩略图
LinkText *string `json:"link_text" bson:"link_text"` // 链接文案
Action *string `json:"action" bson:"action"` // 行为
Params *string `json:"params" bson:"params"` // 参数
PushTime *int64 `json:"push_time" bson:"push_time"` // 推送时间
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 *Notification) GetId() int64 {
if p != nil && p.Id != nil {
return *p.Id
}
return 0
}
func (p *Notification) GetObjType() int64 {
if p != nil && p.ObjType != nil {
return *p.ObjType
}
return 0
}
func (p *Notification) GetStatus() int64 {
if p != nil && p.Status != nil {
return *p.Status
}
return 0
}
func (p *Notification) GetPushTime() int64 {
if p != nil && p.PushTime != nil {
return *p.PushTime
}
return 0
}
func (p *Notification) GetNType() int64 {
if p != nil && p.NType != nil {
return *p.NType
}
return 0
}
type NotifBcst struct {
Id int64 `json:"id" bson:"_id"` // 通知广播表id
Nids []int64 `json:"nids" bson:"nids"` // 系统通知表ids
Vers int64 `json:"vers" bson:"vers"` // 通知广播表版本号
ObjType int64 `json:"obj_type" bson:"obj_type"` // 通知接收人类型0-所有主播1-所有个人
Ct int64 `json:"ct" bson:"ct"` // 创建时间
Ut int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag int64 `json:"del_flag" bson:"del_flag"` // 删除标记
}
type NotifBcstVers struct {
Vers int64 `json:"vers" bson:"vers"` // 通知广播表版本号
}
type NotifBcstReceiveVers struct {
Vers int64 `json:"vers" bson:"vers"` // 通知广播接收表版本号
}
type NotifReceive struct {
Id int64 `json:"id" bson:"_id"` // 通知接收表id
ObjMid int64 `json:"obj_mid" bson:"obj_mid"` // 通知接收人mid
Nid int64 `json:"nid" bson:"nid"` // 系统通知表id
NType int64 `json:"n_type" bson:"n_type"` // 消息类型
Ct int64 `json:"ct" bson:"ct"` // 创建时间
Ut int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag int64 `json:"del_flag" bson:"del_flag"` // 删除标记
}
type NotifReceivePull struct {
Id int64 `json:"id" bson:"_id"` // 通知接收拉取表id
ObjMid int64 `json:"obj_mid" bson:"obj_mid"` // 通知接收人mid
VersBefore int64 `json:"vers_before" bson:"vers_before"` // 此前版本号
VersAfter int64 `json:"vers_after" bson:"vers_after"` // 新版本号
Status int64 `json:"status" bson:"status"` // 状态
Desc string `json:"desc" bson:"desc"` // 描述
Ct int64 `json:"ct" bson:"ct"` // 创建时间
Ut int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag int64 `json:"del_flag" bson:"del_flag"` // 删除标记
}