206 lines
5.1 KiB
Go
206 lines
5.1 KiB
Go
// Package imuser
|
|
// @Link https://github.com/bufanyun/hotgo
|
|
// @Copyright Copyright (c) 2026 HotGo
|
|
// @Author Ms <133814250@qq.com>
|
|
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
|
package imuser
|
|
|
|
import (
|
|
"hotgo/internal/model/input/form"
|
|
"hotgo/internal/model/input/sysin"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
)
|
|
|
|
// ListReq 查询IM用户列表
|
|
type ListReq struct {
|
|
g.Meta `path:"/imUser/list" method:"get" tags:"IM用户" summary:"获取IM用户列表"`
|
|
sysin.ImUserListInp
|
|
}
|
|
|
|
type ListRes struct {
|
|
form.PageRes
|
|
List []*sysin.ImUserListModel `json:"list" dc:"数据列表"`
|
|
}
|
|
|
|
type CreateReq struct {
|
|
g.Meta `path:"/imUser/create" method:"post" tags:"IM用户" summary:"后台创建IM用户"`
|
|
sysin.ImUserCreateInp
|
|
}
|
|
|
|
type CreateRes struct {
|
|
*sysin.ImUserCreateModel
|
|
}
|
|
|
|
type BatchCreateReq struct {
|
|
g.Meta `path:"/imUser/batchCreate" method:"post" tags:"IM用户" summary:"批量创建IM用户"`
|
|
sysin.ImUserBatchCreateInp
|
|
}
|
|
|
|
type BatchCreateRes struct {
|
|
*sysin.ImUserBatchCreateModel
|
|
}
|
|
|
|
type ImportReq struct {
|
|
g.Meta `path:"/imUser/import" method:"post" tags:"IM用户" summary:"Excel导入IM用户"`
|
|
TenantId int64 `json:"tenantId" dc:"租户ID"`
|
|
GroupId int64 `json:"groupId" dc:"默认用户策略分组ID"`
|
|
File *ghttp.UploadFile `json:"file" type:"file" v:"required#请选择Excel文件" dc:"Excel文件"`
|
|
}
|
|
|
|
type ImportRes struct {
|
|
*sysin.ImUserBatchCreateModel
|
|
}
|
|
|
|
type DownloadTemplateReq struct {
|
|
g.Meta `path:"/imUser/downloadTemplate" method:"get" tags:"IM用户" summary:"下载IM用户导入模板"`
|
|
}
|
|
|
|
type DownloadTemplateRes struct{}
|
|
|
|
// ViewReq 获取IM用户指定信息
|
|
type ViewReq struct {
|
|
g.Meta `path:"/imUser/view" method:"get" tags:"IM用户" summary:"获取IM用户指定信息"`
|
|
sysin.ImUserViewInp
|
|
}
|
|
|
|
type ViewRes struct {
|
|
*sysin.ImUserViewModel
|
|
}
|
|
|
|
type ResetPasswordReq struct {
|
|
g.Meta `path:"/imUser/resetPassword" method:"post" tags:"IM用户" summary:"重置IM用户密码"`
|
|
sysin.ImUserPasswordResetInp
|
|
}
|
|
|
|
type ResetPasswordRes struct {
|
|
*sysin.ImUserCommandModel
|
|
}
|
|
|
|
type RevokeSessionsReq struct {
|
|
g.Meta `path:"/imUser/revokeSessions" method:"post" tags:"IM用户" summary:"撤销IM用户会话"`
|
|
sysin.ImUserRevokeSessionsInp
|
|
}
|
|
|
|
type RevokeSessionsRes struct{}
|
|
|
|
type StatusReq struct {
|
|
g.Meta `path:"/imUser/status" method:"post" tags:"IM用户" summary:"更新IM用户状态"`
|
|
sysin.ImUserStatusInp
|
|
}
|
|
|
|
type StatusRes struct{}
|
|
|
|
type AdjustGroupReq struct {
|
|
g.Meta `path:"/imUser/adjustGroup" method:"post" tags:"IM用户" summary:"调整IM用户分组"`
|
|
sysin.ImUserAdjustGroupInp
|
|
}
|
|
|
|
type AdjustGroupRes struct{}
|
|
|
|
type FriendAddReq struct {
|
|
g.Meta `path:"/imUser/friendAdd" method:"post" tags:"IM用户" summary:"设置IM用户加好友开关"`
|
|
sysin.ImUserFriendAddInp
|
|
}
|
|
|
|
type FriendAddRes struct{}
|
|
|
|
type IPWhitelistReq struct {
|
|
g.Meta `path:"/imUser/ipWhitelist" method:"get" tags:"IM用户" summary:"获取IM用户IP白名单"`
|
|
sysin.ImUserIPWhitelistInp
|
|
}
|
|
|
|
type IPWhitelistRes struct {
|
|
*sysin.ImUserIPWhitelistModel
|
|
}
|
|
|
|
type IPWhitelistSaveReq struct {
|
|
g.Meta `path:"/imUser/ipWhitelistSave" method:"post" tags:"IM用户" summary:"保存IM用户IP白名单"`
|
|
sysin.ImUserIPWhitelistInp
|
|
}
|
|
|
|
type IPWhitelistSaveRes struct{}
|
|
|
|
type DevicesReq struct {
|
|
g.Meta `path:"/imUser/devices" method:"get" tags:"IM用户" summary:"获取IM用户设备列表"`
|
|
sysin.ImUserDeviceListInp
|
|
}
|
|
|
|
type DevicesRes struct {
|
|
form.PageRes
|
|
List []*sysin.ImUserDeviceListModel `json:"list" dc:"设备列表"`
|
|
}
|
|
|
|
type BanReq struct {
|
|
g.Meta `path:"/imUser/ban" method:"post" tags:"IM用户" summary:"封禁IM用户"`
|
|
sysin.ImUserGovernanceInp
|
|
}
|
|
|
|
type BanRes struct {
|
|
*sysin.ImUserCommandModel
|
|
}
|
|
|
|
type UnbanReq struct {
|
|
g.Meta `path:"/imUser/unban" method:"post" tags:"IM用户" summary:"解封IM用户"`
|
|
sysin.ImUserGovernanceInp
|
|
}
|
|
|
|
type UnbanRes struct {
|
|
*sysin.ImUserCommandModel
|
|
}
|
|
|
|
type FreezeReq struct {
|
|
g.Meta `path:"/imUser/freeze" method:"post" tags:"IM用户" summary:"冻结IM用户"`
|
|
sysin.ImUserGovernanceInp
|
|
}
|
|
|
|
type FreezeRes struct {
|
|
*sysin.ImUserCommandModel
|
|
}
|
|
|
|
type UnfreezeReq struct {
|
|
g.Meta `path:"/imUser/unfreeze" method:"post" tags:"IM用户" summary:"解冻IM用户"`
|
|
sysin.ImUserGovernanceInp
|
|
}
|
|
|
|
type UnfreezeRes struct {
|
|
*sysin.ImUserCommandModel
|
|
}
|
|
|
|
type DeviceKickReq struct {
|
|
g.Meta `path:"/imUser/deviceKick" method:"post" tags:"IM用户" summary:"踢出IM用户设备"`
|
|
sysin.ImUserGovernanceInp
|
|
}
|
|
|
|
type DeviceKickRes struct {
|
|
*sysin.ImUserCommandModel
|
|
}
|
|
|
|
type LogoutAllReq struct {
|
|
g.Meta `path:"/imUser/logoutAll" method:"post" tags:"IM用户" summary:"踢出IM用户全部会话"`
|
|
sysin.ImUserGovernanceInp
|
|
}
|
|
|
|
type LogoutAllRes struct {
|
|
*sysin.ImUserCommandModel
|
|
}
|
|
|
|
type AccountCancelReq struct {
|
|
g.Meta `path:"/imUser/accountCancel" method:"post" tags:"IM用户" summary:"注销IM用户账号"`
|
|
sysin.ImUserGovernanceInp
|
|
}
|
|
|
|
type AccountCancelRes struct {
|
|
*sysin.ImUserCommandModel
|
|
}
|
|
|
|
type AccountDeleteReq struct {
|
|
g.Meta `path:"/imUser/accountDelete" method:"post" tags:"IM用户" summary:"删除IM用户账号"`
|
|
sysin.ImUserGovernanceInp
|
|
}
|
|
|
|
type AccountDeleteRes struct {
|
|
*sysin.ImUserCommandModel
|
|
}
|