2024-03-05 14:53:37 +08:00
|
|
|
|
package types
|
|
|
|
|
|
|
|
|
|
type Message struct {
|
|
|
|
|
TimeSequence int64 //消息创建的时间戳
|
|
|
|
|
SessionIdent string // 会话唯一标识
|
|
|
|
|
SenderId int64
|
|
|
|
|
SenderIdentity string
|
|
|
|
|
TargetId int64
|
|
|
|
|
TargetIdentity string
|
|
|
|
|
GroupId int64 //群组唯一ID,在群聊消息的时候使用到。不使用时则为空
|
|
|
|
|
GroupIdentity string //群组唯一码,在群聊消息的时候使用到。不使用时则为空
|
|
|
|
|
MsgType int32 //0异常提示,1单聊,2群聊,3系统
|
|
|
|
|
BodyType int32 //正文类型:0文本,1图片,2,视频,3.....
|
|
|
|
|
Body string
|
2024-03-08 14:17:19 +08:00
|
|
|
|
Status int32 //消息状态:0待续,1存储成功,2送达确认,3已读确认,-1撤回
|
2024-03-05 14:53:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ChatMessage struct {
|
|
|
|
|
TimeSequence int64 //消息创建的时间戳
|
|
|
|
|
SessionIdent string // 会话唯一标识
|
|
|
|
|
SenderId int64
|
|
|
|
|
SenderIdentity string
|
|
|
|
|
TargetId int64
|
|
|
|
|
TargetIdentity string
|
|
|
|
|
BodyType int32 //正文类型:0文本,1图片,2,视频,3.....
|
|
|
|
|
Body string
|
2024-03-08 14:17:19 +08:00
|
|
|
|
Status int32 //消息状态:0待续,1存储成功,2送达确认,3已读确认,-1撤回
|
2024-03-05 14:53:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GroupMessage struct {
|
|
|
|
|
TimeSequence int64 //消息创建的时间戳
|
|
|
|
|
GroupId int64 //群组唯一ID,在群聊消息的时候使用到。不使用时则为空
|
|
|
|
|
GroupIdentity string //群组唯一标识,在群聊消息的时候使用到。不使用时则为空
|
|
|
|
|
SenderId int64
|
|
|
|
|
SenderIdentity string
|
|
|
|
|
BodyType int32 //正文类型:0文本,1图片,2,视频,3.....
|
|
|
|
|
Body string
|
2024-03-08 14:17:19 +08:00
|
|
|
|
Status int32 //消息状态:0待续,1存储成功,2送达确认,3已读确认,-1撤回
|
2024-03-05 14:53:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type SystemMessage struct {
|
|
|
|
|
TimeSequence int64 //消息创建的时间戳
|
|
|
|
|
TargetId int64
|
|
|
|
|
TargetIdentity string
|
|
|
|
|
BodyType int32 //正文类型:0文本,1图片,2,视频,3.....
|
|
|
|
|
Body string
|
2024-03-08 14:17:19 +08:00
|
|
|
|
Status int32 //消息状态:0待续,1存储成功,2送达确认,3已读确认,-1撤回
|
2024-03-05 14:53:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type EventMessage struct {
|
|
|
|
|
TimeSequence int64 //消息创建的时间戳
|
|
|
|
|
TargetId int64
|
|
|
|
|
TargetIdentity string
|
|
|
|
|
EventType int32 //事件类型:0 正在输入,已送达...
|
2024-03-08 14:17:19 +08:00
|
|
|
|
Status int32 //消息状态:0待续,1存储成功,2送达确认,3已读确认,-1撤回
|
2024-03-05 14:53:37 +08:00
|
|
|
|
}
|