// Package entity holds deliver-queue job types. package entity // Job is a fanout unit. ExcludeDevice is the sender device. NotMailbox matches BFF NotSaveIch. type Job struct { MsgID int64 `json:"msg_id"` Cmd uint16 `json:"cmd"` ConversationID int64 `json:"conversation_id"` FromUserID int64 `json:"from_user_id"` FromDeviceID uint64 `json:"from_device_id"` ExcludeDevice uint64 `json:"exclude_device"` ToUserIDs []int64 `json:"to_user_ids,omitempty"` NotPush bool `json:"not_push,omitempty"` NotMailbox bool `json:"not_mailbox,omitempty"` Payload []byte `json:"payload,omitempty"` Preview []byte `json:"preview,omitempty"` raw []byte `json:"-"` } func (j *Job) Raw() []byte { if j == nil { return nil } return j.raw } func (j *Job) SetRaw(raw []byte) { if j != nil { j.raw = raw } }