feat: add invite user binding
This commit is contained in:
@@ -105,24 +105,43 @@ type ImInviteRevokeInp struct {
|
||||
Id string `json:"id" v:"required#邀请码ID不能为空" dc:"邀请码ID"`
|
||||
}
|
||||
|
||||
type ImInviteBindUserInp struct {
|
||||
TenantId int64 `json:"tenantId" dc:"IM租户ID"`
|
||||
Id string `json:"id" v:"required#邀请码ID不能为空" dc:"邀请码ID"`
|
||||
UserId int64 `json:"userId" v:"required|min:1#绑定用户不能为空|绑定用户不合法" dc:"绑定C端用户ID"`
|
||||
}
|
||||
|
||||
func (in *ImInviteBindUserInp) Filter(ctx context.Context) (err error) {
|
||||
if _, err = ParseOptionalInt64(in.Id); err != nil {
|
||||
return gerror.New("邀请码ID不能为空")
|
||||
}
|
||||
if in.UserId <= 0 {
|
||||
return gerror.New("绑定用户不能为空")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ImInviteBatchRevokeInp struct {
|
||||
TenantId int64 `json:"tenantId" dc:"IM租户ID"`
|
||||
BatchId string `json:"batchId" v:"required#批次ID不能为空" dc:"批次ID"`
|
||||
}
|
||||
|
||||
type ImInviteCodeModel struct {
|
||||
Id string `json:"id" dc:"ID"`
|
||||
TenantId string `json:"tenantId" dc:"IM租户ID"`
|
||||
TenantName string `json:"tenantName" dc:"IM租户名称"`
|
||||
BatchId string `json:"batchId" dc:"批次ID"`
|
||||
Code string `json:"code" dc:"邀请码"`
|
||||
Status string `json:"status" dc:"状态"`
|
||||
ExpiresAt *gtime.Time `json:"expiresAt" dc:"到期时间"`
|
||||
UsageCount int `json:"usageCount" dc:"累计使用次数"`
|
||||
LastUsedAt *gtime.Time `json:"lastUsedAt" dc:"最后使用时间"`
|
||||
CreatedBy string `json:"createdBy" dc:"创建人"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
Id string `json:"id" dc:"ID"`
|
||||
TenantId string `json:"tenantId" dc:"IM租户ID"`
|
||||
TenantName string `json:"tenantName" dc:"IM租户名称"`
|
||||
BatchId string `json:"batchId" dc:"批次ID"`
|
||||
Code string `json:"code" dc:"邀请码"`
|
||||
Status string `json:"status" dc:"状态"`
|
||||
ExpiresAt *gtime.Time `json:"expiresAt" dc:"到期时间"`
|
||||
MaxUses int `json:"maxUses" dc:"最大可用次数,0表示不限制"`
|
||||
UsageCount int `json:"usageCount" dc:"累计使用次数"`
|
||||
BoundUserId string `json:"boundUserId" dc:"绑定用户ID"`
|
||||
BoundUserLabel string `json:"boundUserLabel" dc:"绑定用户展示名"`
|
||||
LastUsedAt *gtime.Time `json:"lastUsedAt" dc:"最后使用时间"`
|
||||
CreatedBy string `json:"createdBy" dc:"创建人"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
}
|
||||
|
||||
type ImInviteBatchModel struct {
|
||||
|
||||
Reference in New Issue
Block a user