低空智控平台 后端go
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.
 
 

29 lines
1.0 KiB

package vo
import "laic-backend/common"
// UserPageReq 用户分页查询(admin)
type UserPageReq struct {
common.Pagination
Keyword string `json:"keyword" form:"keyword"` // 匹配 name / phone / email
Role string `json:"role" form:"role"`
Status int8 `json:"status" form:"status"`
}
// UserCreateReq 管理员创建用户
type UserCreateReq struct {
Name string `json:"name" validate:"required,max=32"`
Phone string `json:"phone" validate:"required,phone"`
Email string `json:"email" validate:"omitempty,email"`
Password string `json:"password" validate:"required,password"`
Role string `json:"role" validate:"omitempty,oneof=admin user"`
}
// UserUpdateReq 管理员编辑用户
type UserUpdateReq struct {
Name string `json:"name" validate:"max=32"`
Email string `json:"email" validate:"omitempty,email"`
Password string `json:"password" validate:"omitempty,password"`
Role string `json:"role" validate:"omitempty,oneof=admin user"`
Status *int8 `json:"status"`
}