Files
open-im-server/pkg/cms_api_struct/user.go
T

121 lines
2.7 KiB
Go
Raw Normal View History

2022-01-21 18:39:57 +08:00
package cms_api_struct
2022-01-24 01:40:49 +08:00
type UserResponse struct {
2022-08-07 22:37:27 +08:00
ProfilePhoto string `json:"profile_photo"`
Nickname string `json:"nick_name"`
UserId string `json:"user_id"`
CreateTime string `json:"create_time,omitempty"`
CreateIp string `json:"create_ip,omitempty"`
LastLoginTime string `json:"last_login_time,omitempty"`
LastLoginIp string `json:"last_login_ip,omitempty"`
LoginTimes int32 `json:"login_times"`
LoginLimit int32 `json:"login_limit"`
IsBlock bool `json:"is_block"`
PhoneNumber string `json:"phone_number"`
Email string `json:"email"`
Birth string `json:"birth"`
Gender int `json:"gender"`
2022-01-24 01:40:49 +08:00
}
type GetUserRequest struct {
2022-01-25 19:18:04 +08:00
UserId string `form:"user_id" binding:"required"`
2022-01-24 01:40:49 +08:00
}
type GetUserResponse struct {
UserResponse
}
type GetUsersRequest struct {
RequestPagination
}
2022-01-21 18:39:57 +08:00
type GetUsersResponse struct {
2022-02-07 08:44:21 +08:00
Users []*UserResponse `json:"users"`
2022-01-25 19:18:04 +08:00
ResponsePagination
2022-02-08 20:24:59 +08:00
UserNums int32 `json:"user_nums"`
}
type GetUsersByNameRequest struct {
UserName string `form:"user_name" binding:"required"`
RequestPagination
}
type GetUsersByNameResponse struct {
Users []*UserResponse `json:"users"`
ResponsePagination
UserNums int32 `json:"user_nums"`
2022-01-24 01:40:49 +08:00
}
type ResignUserRequest struct {
UserId string `json:"user_id"`
}
2022-01-21 18:39:57 +08:00
2022-01-24 01:40:49 +08:00
type ResignUserResponse struct {
2022-01-21 18:39:57 +08:00
}
2022-01-24 01:40:49 +08:00
type AlterUserRequest struct {
2022-01-27 01:08:02 +08:00
UserId string `json:"user_id" binding:"required"`
Nickname string `json:"nickname"`
2022-08-13 10:41:10 +08:00
PhoneNumber string `json:"phone_number" validate:"len=11"`
2022-01-27 01:08:02 +08:00
Email string `json:"email"`
2022-08-13 10:41:10 +08:00
Birth string `json:"birth"`
2022-01-24 01:40:49 +08:00
}
2022-01-21 18:39:57 +08:00
2022-01-24 01:40:49 +08:00
type AlterUserResponse struct {
}
type AddUserRequest struct {
2022-01-25 19:18:04 +08:00
PhoneNumber string `json:"phone_number" binding:"required"`
2022-01-27 01:08:02 +08:00
UserId string `json:"user_id" binding:"required"`
Name string `json:"name" binding:"required"`
2022-01-24 01:40:49 +08:00
}
type AddUserResponse struct {
}
2022-01-26 18:43:01 +08:00
type BlockUser struct {
UserResponse
BeginDisableTime string `json:"begin_disable_time"`
2022-01-27 01:08:02 +08:00
EndDisableTime string `json:"end_disable_time"`
2022-01-26 18:43:01 +08:00
}
2022-01-24 01:40:49 +08:00
type BlockUserRequest struct {
2022-01-27 01:08:02 +08:00
UserId string `json:"user_id" binding:"required"`
2022-01-25 19:18:04 +08:00
EndDisableTime string `json:"end_disable_time" binding:"required"`
2022-01-24 01:40:49 +08:00
}
type BlockUserResponse struct {
}
type UnblockUserRequest struct {
2022-01-25 19:18:04 +08:00
UserId string `json:"user_id" binding:"required"`
2022-01-24 01:40:49 +08:00
}
type UnBlockUserResponse struct {
}
type GetBlockUsersRequest struct {
RequestPagination
}
type GetBlockUsersResponse struct {
2022-02-07 08:44:21 +08:00
BlockUsers []BlockUser `json:"block_users"`
2022-01-25 19:18:04 +08:00
ResponsePagination
2022-02-08 20:24:59 +08:00
UserNums int32 `json:"user_nums"`
2022-01-24 01:40:49 +08:00
}
2022-01-26 18:43:01 +08:00
type GetBlockUserRequest struct {
UserId string `form:"user_id" binding:"required"`
}
type GetBlockUserResponse struct {
BlockUser
2022-01-27 01:08:02 +08:00
}
2022-02-07 08:44:21 +08:00
type DeleteUserRequest struct {
UserId string `json:"user_id" binding:"required"`
}
type DeleteUserResponse struct {
}