service/dbstruct/notification.go

24 lines
1.1 KiB
Go

package dbstruct
type Notification struct {
Id *int64 `json:"id" bson:"_id"` // 系统通知表id
SubMid *int64 `json:"sub_mid" bson:"sub_mid"` // 通知发送人mid
ObjMid *int64 `json:"obj_mid" bson:"obj_mid"` // 通知接收人mid
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"` // 链接文案
IsRead *int64 `json:"is_read" bson:"is_read"` // 是否已读
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
}
func (p *Notification) GetObjMid() int64 {
if p != nil && p.ObjMid != nil {
return *p.ObjMid
}
return 0
}