复制项目

This commit is contained in:
kim.dev.6789
2026-01-14 22:16:44 +08:00
parent e2577b8cee
commit e50142a3b9
691 changed files with 97009 additions and 1 deletions

584
pkg/apistruct/manage.go Normal file
View File

@@ -0,0 +1,584 @@
// Copyright © 2023 OpenIM. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package apistruct
import (
"encoding/json"
"fmt"
"strconv"
pbmsg "git.imall.cloud/openim/protocol/msg"
"git.imall.cloud/openim/protocol/sdkws"
)
// SendMsg defines the structure for sending messages with various metadata.
type SendMsg struct {
// SendID uniquely identifies the sender.
SendID string `json:"sendID" binding:"required"`
// GroupID is the identifier for the group, required if SessionType is 2 or 3.
GroupID string `json:"groupID" binding:"required_if=SessionType 2|required_if=SessionType 3"`
// SenderNickname is the nickname of the sender.
SenderNickname string `json:"senderNickname"`
// SenderFaceURL is the URL to the sender's avatar.
SenderFaceURL string `json:"senderFaceURL"`
// SenderPlatformID is an integer identifier for the sender's platform.
SenderPlatformID int32 `json:"senderPlatformID"`
// Content is the actual content of the message, required and excluded from Swagger documentation.
Content map[string]any `json:"content" binding:"required" swaggerignore:"true"`
// ContentType is an integer that represents the type of the content.
ContentType int32 `json:"contentType" binding:"required"`
// SessionType is an integer that represents the type of session for the message.
SessionType int32 `json:"sessionType" binding:"required"`
// IsOnlineOnly specifies if the message is only sent when the receiver is online.
IsOnlineOnly bool `json:"isOnlineOnly"`
// NotOfflinePush specifies if the message should not trigger offline push notifications.
NotOfflinePush bool `json:"notOfflinePush"`
// SendTime is a timestamp indicating when the message was sent.
SendTime int64 `json:"sendTime"`
// OfflinePushInfo contains information for offline push notifications.
OfflinePushInfo *sdkws.OfflinePushInfo `json:"offlinePushInfo"`
// Ex stores extended fields
Ex string `json:"ex"`
}
// SendMsgReq extends SendMsg with the requirement of RecvID when SessionType indicates a one-on-one or notification chat.
type SendMsgReq struct {
// RecvID uniquely identifies the receiver and is required for one-on-one or notification chat types.
RecvID string `json:"recvID" binding:"required_if" message:"recvID is required if sessionType is SingleChatType or NotificationChatType"`
SendMsg
}
type GetConversationListReq struct {
// userID uniquely identifies the user.
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty" binding:"required"`
// ConversationIDs contains a list of unique identifiers for conversations.
ConversationIDs []string `protobuf:"bytes,2,rep,name=conversationIDs,proto3" json:"conversationIDs,omitempty"`
}
type GetConversationListResp struct {
// ConversationElems is a map that associates conversation IDs with their respective details.
ConversationElems map[string]*ConversationElem `protobuf:"bytes,1,rep,name=conversationElems,proto3" json:"conversationElems,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
type ConversationElem struct {
// MaxSeq represents the maximum sequence number within the conversation.
MaxSeq int64 `protobuf:"varint,1,opt,name=maxSeq,proto3" json:"maxSeq,omitempty"`
// UnreadSeq represents the number of unread messages in the conversation.
UnreadSeq int64 `protobuf:"varint,2,opt,name=unreadSeq,proto3" json:"unreadSeq,omitempty"`
// LastSeqTime represents the timestamp of the last sequence in the conversation.
LastSeqTime int64 `protobuf:"varint,3,opt,name=LastSeqTime,proto3" json:"LastSeqTime,omitempty"`
}
// BatchSendMsgReq defines the structure for sending a message to multiple recipients.
type BatchSendMsgReq struct {
SendMsg
// IsSendAll indicates whether the message should be sent to all users.
IsSendAll bool `json:"isSendAll"`
// RecvIDs is a slice of receiver identifiers to whom the message will be sent, required field.
RecvIDs []string `json:"recvIDs" binding:"required"`
}
// BatchSendMsgResp contains the results of a batch message send operation.
type BatchSendMsgResp struct {
// Results is a slice of SingleReturnResult, representing the outcome of each message sent.
Results []*SingleReturnResult `json:"results"`
// FailedIDs is a slice of user IDs for whom the message send failed.
FailedIDs []string `json:"failedUserIDs"`
}
// SendRedPacketReq 发送红包请求
type SendRedPacketReq struct {
GroupID string `json:"groupID" binding:"required"` // 群ID
RedPacketType int32 `json:"redPacketType" binding:"required"` // 红包类型1-普通红包2-拼手气红包
TotalAmount int64 `json:"totalAmount" binding:"required"` // 总金额(分)
TotalCount int32 `json:"totalCount" binding:"required"` // 总个数
Blessing string `json:"blessing"` // 祝福语
}
// SendRedPacketResp 发送红包响应
type SendRedPacketResp struct {
RedPacketID string `json:"redPacketID"` // 红包ID
ServerMsgID string `json:"serverMsgID"` // 消息ID
ClientMsgID string `json:"clientMsgID"` // 客户端消息ID
SendTime int64 `json:"sendTime"` // 发送时间
}
// ReceiveRedPacketReq 领取红包请求
type ReceiveRedPacketReq struct {
RedPacketID string `json:"redPacketID" binding:"required"` // 红包ID
}
// ReceiveRedPacketResp 领取红包响应
type ReceiveRedPacketResp struct {
RedPacketID string `json:"redPacketID"` // 红包ID
Amount int64 `json:"amount"` // 领取金额(分)
IsLucky bool `json:"isLucky"` // 是否为手气最佳(仅拼手气红包有效)
}
// GetRedPacketsByGroupReq 根据群ID查询红包列表请求群ID为选填不填则查询所有红包
type GetRedPacketsByGroupReq struct {
GroupID string `json:"groupID"` // 群ID选填不填则查询所有红包
Pagination Pagination `json:"pagination"` // 分页参数
}
// Pagination 分页参数
type Pagination struct {
PageNumber int32 `json:"pageNumber"` // 页码从1开始
ShowNumber int32 `json:"showNumber"` // 每页数量
}
// GetRedPacketsByGroupResp 根据群ID查询红包列表响应
type GetRedPacketsByGroupResp struct {
Total int64 `json:"total"` // 总数
RedPackets []*RedPacketInfo `json:"redPackets"` // 红包列表
}
// RedPacketInfo 红包信息
type RedPacketInfo struct {
RedPacketID string `json:"redPacketID"` // 红包ID
SendUserID string `json:"sendUserID"` // 发送者ID
GroupID string `json:"groupID"` // 群ID
GroupName string `json:"groupName"` // 群名称
RedPacketType int32 `json:"redPacketType"` // 红包类型1-普通红包2-拼手气红包
TotalAmount int64 `json:"totalAmount"` // 总金额(分)
TotalCount int32 `json:"totalCount"` // 总个数
RemainAmount int64 `json:"remainAmount"` // 剩余金额(分)
RemainCount int32 `json:"remainCount"` // 剩余个数
Blessing string `json:"blessing"` // 祝福语
Status int32 `json:"status"` // 状态0-进行中1-已领完2-已过期
ExpireTime int64 `json:"expireTime"` // 过期时间戳(毫秒)
CreateTime int64 `json:"createTime"` // 创建时间戳(毫秒)
}
// GetRedPacketReceiveInfoReq 查询红包领取情况请求
type GetRedPacketReceiveInfoReq struct {
RedPacketID string `json:"redPacketID" binding:"required"` // 红包ID
}
// GetRedPacketReceiveInfoResp 查询红包领取情况响应
type GetRedPacketReceiveInfoResp struct {
RedPacketID string `json:"redPacketID"` // 红包ID
TotalAmount int64 `json:"totalAmount"` // 总金额(分)
TotalCount int32 `json:"totalCount"` // 总个数
RemainAmount int64 `json:"remainAmount"` // 剩余金额(分)
RemainCount int32 `json:"remainCount"` // 剩余个数
Status int32 `json:"status"` // 状态0-进行中1-已领完2-已过期
Receives []*RedPacketReceiveDetail `json:"receives"` // 领取记录列表
}
// RedPacketReceiveDetail 红包领取详情(后台管理接口使用)
type RedPacketReceiveDetail struct {
ReceiveID string `json:"receiveID"` // 领取记录ID
ReceiveUserID string `json:"receiveUserID"` // 领取者ID
Amount int64 `json:"amount"` // 领取金额(分)
ReceiveTime int64 `json:"receiveTime"` // 领取时间戳(毫秒)
IsLucky bool `json:"isLucky"` // 是否为手气最佳(仅拼手气红包有效)
}
// PauseRedPacketReq 暂停红包请求
type PauseRedPacketReq struct {
RedPacketID string `json:"redPacketID" binding:"required"` // 红包ID
}
// PauseRedPacketResp 暂停红包响应
type PauseRedPacketResp struct {
RedPacketID string `json:"redPacketID"` // 红包ID
}
// GetRedPacketDetailReq 查询红包详情请求(用户端)
type GetRedPacketDetailReq struct {
RedPacketID string `json:"redPacketID" binding:"required"` // 红包ID必填
}
// GetRedPacketDetailResp 查询红包详情响应(用户端)
type GetRedPacketDetailResp struct {
RedPacketID string `json:"redPacketID"` // 红包ID
GroupID string `json:"groupID"` // 群ID
RedPacketType int32 `json:"redPacketType"` // 红包类型1-普通红包2-拼手气红包
TotalAmount int64 `json:"totalAmount"` // 总金额(分)
TotalCount int32 `json:"totalCount"` // 总个数
RemainAmount int64 `json:"remainAmount"` // 剩余金额(分)
RemainCount int32 `json:"remainCount"` // 剩余个数
Blessing string `json:"blessing"` // 祝福语
Status int32 `json:"status"` // 状态0-进行中1-已领完2-已过期
IsExpired bool `json:"isExpired"` // 是否过期(超过一周)
MyReceive *RedPacketMyReceiveDetail `json:"myReceive"` // 当前用户的领取信息(如果已领取)
Receives []*RedPacketUserReceiveDetail `json:"receives"` // 领取记录列表(仅群主/管理员可见)
}
// RedPacketMyReceiveDetail 当前用户自己的领取详情不包含用户ID、昵称、头像
type RedPacketMyReceiveDetail struct {
ReceiveID string `json:"receiveID"` // 领取记录ID
Amount int64 `json:"amount"` // 领取金额(分)
ReceiveTime int64 `json:"receiveTime"` // 领取时间戳(毫秒)
IsLucky bool `json:"isLucky"` // 是否为手气最佳(仅拼手气红包有效)
}
// RedPacketUserReceiveDetail 红包用户领取详情(用户端,包含用户信息)
type RedPacketUserReceiveDetail struct {
ReceiveID string `json:"receiveID"` // 领取记录ID
ReceiveUserID string `json:"receiveUserID"` // 领取者ID
Nickname string `json:"nickname"` // 领取者昵称
FaceURL string `json:"faceURL"` // 领取者头像
Amount int64 `json:"amount"` // 领取金额(分)
ReceiveTime int64 `json:"receiveTime"` // 领取时间戳(毫秒)
IsLucky bool `json:"isLucky"` // 是否为手气最佳(仅拼手气红包有效)
}
// GetWalletsReq 查询用户钱包列表请求(后台管理接口)
type GetWalletsReq struct {
UserID string `json:"userID"` // 用户ID选填支持通过ID、手机号、账号查询
PhoneNumber string `json:"phoneNumber"` // 手机号选填支持通过ID、手机号、账号查询
Account string `json:"account"` // 账号选填支持通过ID、手机号、账号查询
Pagination Pagination `json:"pagination"` // 分页参数
}
// GetWalletsResp 查询用户钱包列表响应
type GetWalletsResp struct {
Total int64 `json:"total"` // 总数
Wallets []*WalletInfo `json:"wallets"` // 钱包列表
}
// WalletInfo 钱包信息
type WalletInfo struct {
UserID string `json:"userID"` // 用户ID
Nickname string `json:"nickname"` // 用户昵称
FaceURL string `json:"faceURL"` // 用户头像
Balance int64 `json:"balance"` // 余额(分)
CreateTime int64 `json:"createTime"` // 创建时间戳(毫秒)
UpdateTime int64 `json:"updateTime"` // 更新时间戳(毫秒)
}
// BatchUpdateWalletBalanceReq 批量修改用户余额请求(后台管理接口)
type BatchUpdateWalletBalanceReq struct {
Users []WalletUserIdentifier `json:"users" binding:"required"` // 用户标识列表支持用户ID、手机号、账号
Amount int64 `json:"amount"` // 默认金额(分),如果用户没有指定金额则使用此值
Operation string `json:"operation"` // 默认操作类型set设置为指定金额、add增加金额、subtract减少金额默认为add
}
// WalletUserIdentifier 钱包用户标识支持用户ID、手机号、账号
type WalletUserIdentifier struct {
UserID FlexibleString `json:"userID"` // 用户ID选填支持数字和字符串
PhoneNumber string `json:"phoneNumber"` // 手机号(选填)
Account string `json:"account"` // 账号(选填)
Amount int64 `json:"amount"` // 金额(分),如果未指定则使用请求中的默认金额
Operation string `json:"operation"` // 操作类型set设置为指定金额、add增加金额、subtract减少金额如果未指定则使用请求中的默认操作类型
Remark string `json:"remark"` // 备注(选填),每条修改记录对应的备注信息
}
// FlexibleString 灵活的字符串类型,可以接受数字和字符串
type FlexibleString string
// UnmarshalJSON 自定义JSON反序列化支持数字和字符串
func (f *FlexibleString) UnmarshalJSON(data []byte) error {
// 尝试解析为字符串
var s string
if err := json.Unmarshal(data, &s); err == nil {
*f = FlexibleString(s)
return nil
}
// 尝试解析为数字
var num json.Number
if err := json.Unmarshal(data, &num); err == nil {
*f = FlexibleString(num.String())
return nil
}
// 尝试解析为整数
var i int64
if err := json.Unmarshal(data, &i); err == nil {
*f = FlexibleString(strconv.FormatInt(i, 10))
return nil
}
// 尝试解析为浮点数
var f64 float64
if err := json.Unmarshal(data, &f64); err == nil {
*f = FlexibleString(strconv.FormatFloat(f64, 'f', -1, 64))
return nil
}
return fmt.Errorf("cannot unmarshal %s into FlexibleString", string(data))
}
// String 返回字符串值
func (f FlexibleString) String() string {
return string(f)
}
// BatchUpdateWalletBalanceResp 批量修改用户余额响应
type BatchUpdateWalletBalanceResp struct {
Total int32 `json:"total"` // 总处理数量
Success int32 `json:"success"` // 成功数量
Failed int32 `json:"failed"` // 失败数量
Results []WalletUpdateResult `json:"results"` // 处理结果列表
}
// WalletUpdateResult 钱包更新结果
type WalletUpdateResult struct {
UserID string `json:"userID"` // 用户ID
PhoneNumber string `json:"phoneNumber"` // 手机号
Account string `json:"account"` // 账号
Success bool `json:"success"` // 是否成功
Message string `json:"message"` // 结果消息
OldBalance int64 `json:"oldBalance"` // 修改前余额
NewBalance int64 `json:"newBalance"` // 修改后余额
Remark string `json:"remark"` // 备注信息
}
// 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 KeyMsgData struct {
SendID string `json:"sendID"`
RecvID string `json:"recvID"`
GroupID string `json:"groupID"`
}
// SingleReturnResult encapsulates the result of a single message send attempt.
type SingleReturnResult struct {
// ServerMsgID is the message identifier on the server-side.
ServerMsgID string `json:"serverMsgID"`
// ClientMsgID is the message identifier on the client-side.
ClientMsgID string `json:"clientMsgID"`
// SendTime is the timestamp of when the message was sent.
SendTime int64 `json:"sendTime"`
// RecvID uniquely identifies the receiver of the message.
RecvID string `json:"recvID"`
// Modify fields modified via webhook.
Modify map[string]any `json:"modify,omitempty"`
}
type SendMsgResp struct {
// SendMsgResp original response.
*pbmsg.SendMsgResp
// Modify fields modified via webhook.
Modify map[string]any `json:"modify,omitempty"`
}
// CreateMeetingReq 创建会议请求
type CreateMeetingReq struct {
MeetingID string `json:"meetingID"` // 会议ID选填不填则自动生成
Subject string `json:"subject" binding:"required"` // 会议主题(必填)
CoverURL string `json:"coverURL"` // 封面URL
ScheduledTime int64 `json:"scheduledTime" binding:"required"` // 预约时间戳(毫秒,必填)
Description string `json:"description"` // 会议描述
Duration int32 `json:"duration"` // 会议时长(分钟)
EstimatedCount int32 `json:"estimatedCount"` // 会议预估人数
EnableMic bool `json:"enableMic"` // 是否开启连麦
EnableComment bool `json:"enableComment"` // 是否开启评论
AnchorUserIDs []string `json:"anchorUserIDs"` // 主播用户ID列表多选
Password string `json:"password"` // 会议密码6位数字选填不填则自动生成
Ex string `json:"ex"` // 扩展字段
}
// CreateMeetingResp 创建会议响应
type CreateMeetingResp struct {
MeetingInfo *MeetingInfo `json:"meetingInfo"` // 会议信息
GroupID string `json:"groupID"` // 创建的群聊ID
}
// UpdateMeetingReq 更新会议请求
type UpdateMeetingReq struct {
MeetingID string `json:"meetingID" binding:"required"` // 会议ID必填
Subject string `json:"subject"` // 会议主题
CoverURL string `json:"coverURL"` // 封面URL
ScheduledTime int64 `json:"scheduledTime"` // 预约时间戳(毫秒)
Status int32 `json:"status"` // 会议状态1-已预约2-进行中3-已结束4-已取消
Description string `json:"description"` // 会议描述
Duration int32 `json:"duration"` // 会议时长(分钟)
EstimatedCount int32 `json:"estimatedCount"` // 会议预估人数
EnableMic *bool `json:"enableMic"` // 是否开启连麦(使用指针以区分是否设置)
EnableComment *bool `json:"enableComment"` // 是否开启评论(使用指针以区分是否设置)
AnchorUserIDs []string `json:"anchorUserIDs"` // 主播用户ID列表多选
Password *string `json:"password"` // 会议密码6位数字使用指针以区分是否设置
Ex string `json:"ex"` // 扩展字段
}
// UpdateMeetingResp 更新会议响应
type UpdateMeetingResp struct {
MeetingInfo *MeetingInfo `json:"meetingInfo"` // 会议信息
}
// GetMeetingsReq 获取会议列表请求
type GetMeetingsReq struct {
CreatorUserID string `json:"creatorUserID"` // 创建者用户ID选填
Status int32 `json:"status"` // 会议状态选填1-已预约2-进行中3-已结束4-已取消
Keyword string `json:"keyword"` // 搜索关键词(选填,搜索主题和描述)
StartTime int64 `json:"startTime"` // 开始时间戳(毫秒,选填)
EndTime int64 `json:"endTime"` // 结束时间戳(毫秒,选填)
Pagination Pagination `json:"pagination"` // 分页参数
}
// GetMeetingsResp 获取会议列表响应
type GetMeetingsResp struct {
Total int64 `json:"total"` // 总数
Meetings []*MeetingInfo `json:"meetings"` // 会议列表
}
// DeleteMeetingReq 删除会议请求
type DeleteMeetingReq struct {
MeetingID string `json:"meetingID" binding:"required"` // 会议ID必填
}
// DeleteMeetingResp 删除会议响应
type DeleteMeetingResp struct {
}
// MeetingInfo 会议信息
type MeetingInfo struct {
MeetingID string `json:"meetingID"` // 会议ID
Subject string `json:"subject"` // 会议主题
CoverURL string `json:"coverURL"` // 封面URL
ScheduledTime int64 `json:"scheduledTime"` // 预约时间戳(毫秒)
Status int32 `json:"status"` // 会议状态1-已预约2-进行中3-已结束4-已取消
CreatorUserID string `json:"creatorUserID"` // 创建者用户ID
Description string `json:"description"` // 会议描述
Duration int32 `json:"duration"` // 会议时长(分钟)
EstimatedCount int32 `json:"estimatedCount"` // 会议预估人数
EnableMic bool `json:"enableMic"` // 是否开启连麦
EnableComment bool `json:"enableComment"` // 是否开启评论
AnchorUserIDs []string `json:"anchorUserIDs"` // 主播用户ID列表多选
AnchorUsers []*sdkws.UserInfo `json:"anchorUsers"` // 主播用户信息列表
CreateTime int64 `json:"createTime"` // 创建时间戳(毫秒)
UpdateTime int64 `json:"updateTime"` // 更新时间戳(毫秒)
Ex string `json:"ex"` // 扩展字段
GroupID string `json:"groupID"` // 关联的群聊ID
CheckInCount int32 `json:"checkInCount"` // 签到人数统计
Password string `json:"password"` // 会议密码6位数字
}
// GetMeetingReq 获取会议请求(用户端)
type GetMeetingReq struct {
MeetingID string `json:"meetingID" binding:"required"` // 会议ID必填
}
// GetMeetingResp 获取会议响应(用户端)
type GetMeetingResp struct {
MeetingInfo *MeetingPublicInfo `json:"meetingInfo"` // 会议信息
}
// GetMeetingsPublicReq 获取会议列表请求(用户端)
type GetMeetingsPublicReq struct {
Status int32 `json:"status"` // 会议状态选填1-已预约2-进行中3-已结束4-已取消
Keyword string `json:"keyword"` // 搜索关键词(选填,搜索主题和描述)
StartTime int64 `json:"startTime"` // 开始时间戳(毫秒,选填)
EndTime int64 `json:"endTime"` // 结束时间戳(毫秒,选填)
Pagination Pagination `json:"pagination"` // 分页参数
}
// GetMeetingsPublicResp 获取会议列表响应(用户端)
type GetMeetingsPublicResp struct {
Total int64 `json:"total"` // 总数
Meetings []*MeetingPublicInfo `json:"meetings"` // 会议列表
}
// MeetingPublicInfo 会议公开信息(用户端,过滤了管理字段)
type MeetingPublicInfo struct {
MeetingID string `json:"meetingID"` // 会议ID
Subject string `json:"subject"` // 会议主题
CoverURL string `json:"coverURL"` // 封面URL
ScheduledTime int64 `json:"scheduledTime"` // 预约时间戳(毫秒)
Status int32 `json:"status"` // 会议状态1-已预约2-进行中3-已结束4-已取消
Description string `json:"description"` // 会议描述
Duration int32 `json:"duration"` // 会议时长(分钟)
EstimatedCount int32 `json:"estimatedCount"` // 会议预估人数
EnableMic bool `json:"enableMic"` // 是否开启连麦
EnableComment bool `json:"enableComment"` // 是否开启评论
AnchorUsers []*sdkws.UserInfo `json:"anchorUsers"` // 主播用户信息列表
GroupID string `json:"groupID"` // 关联的群聊ID
CheckInCount int32 `json:"checkInCount"` // 签到人数统计
Password string `json:"password"` // 会议密码6位数字
}
// CheckInMeetingReq 会议签到请求
type CheckInMeetingReq struct {
MeetingID string `json:"meetingID" binding:"required"` // 会议ID必填
}
// CheckInMeetingResp 会议签到响应
type CheckInMeetingResp struct {
CheckInID string `json:"checkInID"` // 签到ID
CheckInTime int64 `json:"checkInTime"` // 签到时间戳(毫秒)
}
// GetMeetingCheckInsReq 获取会议签到列表请求
type GetMeetingCheckInsReq struct {
MeetingID string `json:"meetingID" binding:"required"` // 会议ID必填
Pagination Pagination `json:"pagination"` // 分页参数
}
// GetMeetingCheckInsResp 获取会议签到列表响应
type GetMeetingCheckInsResp struct {
Total int64 `json:"total"` // 总数
CheckIns []*MeetingCheckInInfo `json:"checkIns"` // 签到列表
}
// MeetingCheckInInfo 会议签到信息
type MeetingCheckInInfo struct {
CheckInID string `json:"checkInID"` // 签到ID
MeetingID string `json:"meetingID"` // 会议ID
UserID string `json:"userID"` // 用户ID
CheckInTime int64 `json:"checkInTime"` // 签到时间戳(毫秒)
UserInfo *sdkws.UserInfo `json:"userInfo"` // 用户信息
}
// GetMeetingCheckInStatsReq 获取会议签到统计请求
type GetMeetingCheckInStatsReq struct {
MeetingID string `json:"meetingID" binding:"required"` // 会议ID必填
}
// GetMeetingCheckInStatsResp 获取会议签到统计响应
type GetMeetingCheckInStatsResp struct {
MeetingID string `json:"meetingID"` // 会议ID
CheckInCount int64 `json:"checkInCount"` // 签到人数
}
// CheckUserCheckInReq 检查用户是否已签到请求
type CheckUserCheckInReq struct {
MeetingID string `json:"meetingID" binding:"required"` // 会议ID必填
}
// CheckUserCheckInResp 检查用户是否已签到响应
type CheckUserCheckInResp struct {
IsCheckedIn bool `json:"isCheckedIn"` // 是否已签到
CheckInInfo *MeetingCheckInInfo `json:"checkInInfo,omitempty"` // 签到信息(如果已签到)
}