125 lines
4.4 KiB
Go
125 lines
4.4 KiB
Go
package apistruct
|
||
|
||
// OnlineUserCountResp 在线人数统计返回
|
||
type OnlineUserCountResp struct {
|
||
OnlineCount int64 `json:"onlineCount"`
|
||
}
|
||
|
||
// 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"`
|
||
}
|
||
|
||
// 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"`
|
||
}
|
||
|
||
// OnlineUserCountTrendReq 在线人数走势统计请求
|
||
type OnlineUserCountTrendReq struct {
|
||
// StartTime 统计开始时间(毫秒时间戳),为空时默认最近24小时
|
||
StartTime int64 `json:"startTime"`
|
||
// EndTime 统计结束时间(毫秒时间戳),为空时默认当前时间
|
||
EndTime int64 `json:"endTime"`
|
||
// IntervalMinutes 统计间隔(分钟),仅支持15/30/60
|
||
IntervalMinutes int32 `json:"intervalMinutes" binding:"required,oneof=15 30 60"`
|
||
}
|
||
|
||
// 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"`
|
||
}
|
||
|
||
// UserSendMsgCountTrendReq 用户发送消息走势统计请求
|
||
type UserSendMsgCountTrendReq struct {
|
||
// UserID 发送者用户ID
|
||
UserID string `json:"userID" binding:"required"`
|
||
// ChatType 聊天类型:1-单聊,2-群聊
|
||
ChatType int32 `json:"chatType" binding:"required,oneof=1 2"`
|
||
// StartTime 统计开始时间(毫秒时间戳),为空时默认最近24小时
|
||
StartTime int64 `json:"startTime"`
|
||
// EndTime 统计结束时间(毫秒时间戳),为空时默认当前时间
|
||
EndTime int64 `json:"endTime"`
|
||
// IntervalMinutes 统计间隔(分钟),仅支持15/30/60
|
||
IntervalMinutes int32 `json:"intervalMinutes" binding:"required,oneof=15 30 60"`
|
||
}
|
||
|
||
// 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"`
|
||
}
|