38 lines
2.2 KiB
Go
38 lines
2.2 KiB
Go
package requests
|
||
|
||
type UserRequest struct {
|
||
GetUserPage // 获取用户列表-分页
|
||
}
|
||
|
||
// GetUserPage 获取用户列表-分页
|
||
type GetUserPage struct {
|
||
PostName string `json:"post_name" form:"post_name" label:"岗位名称"`
|
||
DeptName string `json:"dept_name" form:"dept_name" label:"部门名称"`
|
||
NickName string `json:"nick_name" form:"nick_name" label:"用户昵称"`
|
||
Phone string `json:"phone" form:"phone" label:"手机号"`
|
||
Status int `json:"status" form:"status" label:"用户状态"` // (1:正常 2:审核中 3:审核失败)
|
||
DeptId int64 `json:"dept_id" form:"dept_id" label:"部门"`
|
||
PostId int64 `json:"post_id" form:"post_id" label:"岗位"`
|
||
Page int `json:"page" form:"page" label:"页码"`
|
||
PageSize int `json:"page_size" form:"page_size" label:"每页个数"`
|
||
}
|
||
|
||
// AddUser 新增用户
|
||
type AddUser struct {
|
||
Access string `json:"access" form:"access" label:"账号"`
|
||
Password string `json:"password" form:"password" label:"密码"`
|
||
Status string `json:"status" form:"status" label:"状态"` // (1:正常 2:审核中 3:审核失败)
|
||
//
|
||
// Status int `gorm:"column:status;type:tinyint(1);default:2;comment:'状态(1:正常 2:审核中 3:审核失败)'" json:"status"`
|
||
// IsDeleted int `gorm:"column:is_deleted;type:tinyint(1);default:0;comment:'是否被删除(0:否 1:是)'" json:"is_deleted"`
|
||
// IsDisabled int `gorm:"column:is_disabled;type:tinyint(1);default:0;comment:'是否被禁用(0:否 1:是)'" json:"is_disabled"`
|
||
// NickName string `gorm:"column:nick_name;type:varchar(255);comment:'昵称'" json:"nick_name"`
|
||
// Phone string `gorm:"column:phone;type:varchar(11);comment:'手机号'" json:"phone"`
|
||
// Avatar string `gorm:"column:avatar;type:varchar(255);comment:'头像'" json:"avatar"`
|
||
// Sex int `gorm:"column:sex;type:tinyint(1);comment:'性别(1:男 2:女)'" json:"sex"`
|
||
// Email string `gorm:"column:email;type:varchar(100);comment:'邮箱'" json:"email"`
|
||
// RoleID int64 `gorm:"column:role_id;type:bigint(19);comment:'角色id'" json:"role_id"`
|
||
// DeptID int64 `gorm:"column:dept_id;type:bigint(19);comment:'部门id'" json:"dept_id"`
|
||
// PostID int64 `gorm:"column:post_id;type:bigint(19);comment:'岗位id'" json:"post_id"`
|
||
}
|