feat: add im kafka admin integration
This commit is contained in:
@@ -37,7 +37,7 @@ func (in *ImUserListInp) Filter(ctx context.Context) (err error) {
|
||||
type ImUserListModel struct {
|
||||
TenantId int64 `json:"tenantId" dc:"租户ID"`
|
||||
TenantName string `json:"tenantName" dc:"租户名称"`
|
||||
UserId string `json:"userId" dc:"用户ID"`
|
||||
UserId int64 `json:"userId" dc:"用户ID"`
|
||||
Username string `json:"username" dc:"登录账号"`
|
||||
Phone string `json:"phone" dc:"手机号"`
|
||||
Nickname string `json:"nickname" dc:"昵称"`
|
||||
@@ -139,7 +139,7 @@ func (in *ImUserDeviceListInp) Filter(ctx context.Context) (err error) {
|
||||
type ImUserDeviceListModel struct {
|
||||
TenantId int64 `json:"tenantId" dc:"租户ID"`
|
||||
TenantName string `json:"tenantName" dc:"租户名称"`
|
||||
UserId string `json:"userId" dc:"用户ID"`
|
||||
UserId int64 `json:"userId" dc:"用户ID"`
|
||||
DeviceId string `json:"deviceId" dc:"设备ID"`
|
||||
Platform string `json:"platform" dc:"平台"`
|
||||
Lang string `json:"lang" dc:"语言"`
|
||||
@@ -150,3 +150,45 @@ type ImUserDeviceListModel struct {
|
||||
PushTokenConfigured bool `json:"pushTokenConfigured" dc:"是否配置Push Token"`
|
||||
PushUpdatedAt *gtime.Time `json:"pushUpdatedAt" dc:"Push更新时间"`
|
||||
}
|
||||
|
||||
type ImUserGovernanceInp struct {
|
||||
TenantId int64 `json:"tenantId" dc:"租户ID"`
|
||||
UserId int64 `json:"userId" dc:"目标用户ID"`
|
||||
ActorUserId int64 `json:"actorUserId" dc:"操作IM用户ID"`
|
||||
DeviceId string `json:"deviceId" dc:"设备ID"`
|
||||
Reason string `json:"reason" dc:"原因"`
|
||||
Hard bool `json:"hard" dc:"硬删除"`
|
||||
}
|
||||
|
||||
func (in *ImUserGovernanceInp) Filter(ctx context.Context) (err error) {
|
||||
if in.TenantId <= 0 {
|
||||
return gerror.New("请选择租户")
|
||||
}
|
||||
if in.UserId <= 0 {
|
||||
return gerror.New("用户ID不能为空")
|
||||
}
|
||||
if in.ActorUserId <= 0 {
|
||||
return gerror.New("操作IM用户ID不能为空")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (in *ImUserGovernanceInp) FilterDevice(ctx context.Context) (err error) {
|
||||
if err = in.Filter(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.DeviceId == "" {
|
||||
return gerror.New("设备ID不能为空")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ImUserCommandModel struct {
|
||||
CommandID string `json:"commandId" dc:"命令ID"`
|
||||
EventID string `json:"eventId" dc:"Kafka事件ID"`
|
||||
Status string `json:"status" dc:"状态"`
|
||||
TenantID int64 `json:"tenantId" dc:"租户ID"`
|
||||
TenantCode string `json:"tenantCode" dc:"租户编码"`
|
||||
EventType string `json:"eventType" dc:"事件类型"`
|
||||
IdempotencyKey string `json:"idempotencyKey" dc:"幂等键"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user