Files
kim.dev.6789 b7f8db7d08 复制项目
2026-01-14 22:35:45 +08:00

140 lines
4.9 KiB
Go
Raw Permalink 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 imapi
import "git.imall.cloud/openim/protocol/sdkws"
// SendSingleMsgReq defines the structure for sending a message to multiple recipients.
type SendSingleMsgReq struct {
// groupMsg should appoint sendID
SendID string `json:"sendID"`
Content string `json:"content" binding:"required"`
OfflinePushInfo *sdkws.OfflinePushInfo `json:"offlinePushInfo"`
Ex string `json:"ex"`
}
type SendSingleMsgResp struct{}
// OnlineUserCountReq 在线人数统计请求
type OnlineUserCountReq struct{}
// OnlineUserCountResp 在线人数统计返回
type OnlineUserCountResp struct {
OnlineCount int64 `json:"onlineCount"`
}
// OnlineUserCountTrendReq 在线人数走势统计请求
type OnlineUserCountTrendReq struct {
// StartTime 统计开始时间毫秒时间戳为空时默认最近24小时
StartTime int64 `json:"startTime"`
// EndTime 统计结束时间(毫秒时间戳),为空时默认当前时间
EndTime int64 `json:"endTime"`
// IntervalMinutes 统计间隔分钟仅支持15/30/60
IntervalMinutes int32 `json:"intervalMinutes"`
}
// OnlineUserCountTrendItem 在线人数走势数据点
type OnlineUserCountTrendItem struct {
// Timestamp 区间起始时间(毫秒时间戳)
Timestamp int64 `json:"timestamp"`
// OnlineCount 区间内平均在线人数
OnlineCount int64 `json:"onlineCount"`
}
// OnlineUserCountTrendResp 在线人数走势统计返回
type OnlineUserCountTrendResp struct {
// IntervalMinutes 统计间隔(分钟)
IntervalMinutes int32 `json:"intervalMinutes"`
// Points 走势数据点
Points []*OnlineUserCountTrendItem `json:"points"`
}
// UserSendMsgCountReq 用户发送消息总数统计请求
type UserSendMsgCountReq struct{}
// UserSendMsgCountResp 用户发送消息总数统计返回
type UserSendMsgCountResp struct {
// Count24h 最近24小时发送消息总数
Count24h int64 `json:"count24h"`
// Count7d 最近7天发送消息总数
Count7d int64 `json:"count7d"`
// Count30d 最近30天发送消息总数
Count30d int64 `json:"count30d"`
}
// UserSendMsgCountTrendReq 用户发送消息走势统计请求
type UserSendMsgCountTrendReq struct {
// UserID 发送者用户ID
UserID string `json:"userID"`
// ChatType 聊天类型1-单聊2-群聊
ChatType int32 `json:"chatType"`
// StartTime 统计开始时间毫秒时间戳为空时默认最近24小时
StartTime int64 `json:"startTime"`
// EndTime 统计结束时间(毫秒时间戳),为空时默认当前时间
EndTime int64 `json:"endTime"`
// IntervalMinutes 统计间隔分钟仅支持15/30/60
IntervalMinutes int32 `json:"intervalMinutes"`
}
// UserSendMsgCountTrendItem 用户发送消息走势数据点
type UserSendMsgCountTrendItem struct {
// Timestamp 区间起始时间(毫秒时间戳)
Timestamp int64 `json:"timestamp"`
// Count 区间内发送消息数
Count int64 `json:"count"`
}
// UserSendMsgCountTrendResp 用户发送消息走势统计返回
type UserSendMsgCountTrendResp struct {
// UserID 发送者用户ID
UserID string `json:"userID"`
// ChatType 聊天类型1-单聊2-群聊
ChatType int32 `json:"chatType"`
// IntervalMinutes 统计间隔(分钟)
IntervalMinutes int32 `json:"intervalMinutes"`
// Points 走势数据点
Points []*UserSendMsgCountTrendItem `json:"points"`
}
// UserSendMsgQueryReq 用户发送消息查询请求
type UserSendMsgQueryReq struct {
UserID string `json:"userID"`
StartTime int64 `json:"startTime"`
EndTime int64 `json:"endTime"`
Content string `json:"content"`
PageNumber int32 `json:"pageNumber"`
// ShowNumber 每页条数 默认50 最大200
ShowNumber int32 `json:"showNumber"`
}
// UserSendMsgQueryRecord 用户发送消息查询记录
type UserSendMsgQueryRecord struct {
// MsgID 使用服务端消息ID
MsgID string `json:"msgID"`
// SendID 发送者ID
SendID string `json:"sendID"`
// SenderName 发送者昵称或名称
SenderName string `json:"senderName"`
// RecvID 接收者ID 群聊为群ID
RecvID string `json:"recvID"`
// RecvName 接收者昵称或名称 群聊为群名称
RecvName string `json:"recvName"`
// ContentType 消息类型编号
ContentType int32 `json:"contentType"`
// ContentTypeName 消息类型名称
ContentTypeName string `json:"contentTypeName"`
// SessionType 聊天类型编号
SessionType int32 `json:"sessionType"`
// ChatTypeName 聊天类型名称
ChatTypeName string `json:"chatTypeName"`
// Content 消息内容
Content string `json:"content"`
// SendTime 消息发送时间
SendTime int64 `json:"sendTime"`
}
// UserSendMsgQueryResp 用户发送消息查询返回
type UserSendMsgQueryResp struct {
Count int64 `json:"count"`
PageNumber int32 `json:"pageNumber"`
ShowNumber int32 `json:"showNumber"`
Records []*UserSendMsgQueryRecord `json:"records"`
}