You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/cms_api_struct/user.go

127 lines
2.9 KiB

3 years ago
package cms_api_struct
3 years ago
type UserResponse struct {
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"`
3 years ago
}
type GetUserRequest struct {
3 years ago
UserId string `form:"user_id" binding:"required"`
3 years ago
}
type GetUserResponse struct {
UserResponse
}
type GetUsersRequest struct {
RequestPagination
}
3 years ago
type GetUsersResponse struct {
3 years ago
Users []*UserResponse `json:"users"`
3 years ago
ResponsePagination
3 years ago
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"`
3 years ago
}
type ResignUserRequest struct {
UserId string `json:"user_id"`
}
3 years ago
3 years ago
type ResignUserResponse struct {
3 years ago
}
3 years ago
type AlterUserRequest struct {
3 years ago
UserId string `json:"user_id" binding:"required"`
Nickname string `json:"nickname"`
PhoneNumber string `json:"phone_number" validate:"len=11"`
3 years ago
Email string `json:"email"`
Birth string `json:"birth"`
Gender string `json:"gender"`
Photo string `json:"photo"`
3 years ago
}
3 years ago
3 years ago
type AlterUserResponse struct {
}
type AddUserRequest struct {
3 years ago
PhoneNumber string `json:"phone_number" binding:"required"`
3 years ago
UserId string `json:"user_id" binding:"required"`
Name string `json:"name" binding:"required"`
Email string `json:"email"`
Birth string `json:"birth"`
Gender string `json:"gender"`
Photo string `json:"photo"`
3 years ago
}
type AddUserResponse struct {
}
3 years ago
type BlockUser struct {
UserResponse
BeginDisableTime string `json:"begin_disable_time"`
3 years ago
EndDisableTime string `json:"end_disable_time"`
3 years ago
}
3 years ago
type BlockUserRequest struct {
3 years ago
UserId string `json:"user_id" binding:"required"`
3 years ago
EndDisableTime string `json:"end_disable_time" binding:"required"`
3 years ago
}
type BlockUserResponse struct {
}
type UnblockUserRequest struct {
3 years ago
UserId string `json:"user_id" binding:"required"`
3 years ago
}
type UnBlockUserResponse struct {
}
type GetBlockUsersRequest struct {
RequestPagination
}
type GetBlockUsersResponse struct {
3 years ago
BlockUsers []BlockUser `json:"block_users"`
3 years ago
ResponsePagination
3 years ago
UserNums int32 `json:"user_nums"`
3 years ago
}
3 years ago
type GetBlockUserRequest struct {
UserId string `form:"user_id" binding:"required"`
}
type GetBlockUserResponse struct {
BlockUser
3 years ago
}
3 years ago
type DeleteUserRequest struct {
UserId string `json:"user_id" binding:"required"`
}
type DeleteUserResponse struct {
}