commit | author | age
|
9bcb19
|
1 |
/* |
I |
2 |
Copyright [2020] [https://www.xiaonuo.vip] |
|
3 |
|
|
4 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
you may not use this file except in compliance with the License. |
|
6 |
You may obtain a copy of the License at |
|
7 |
|
|
8 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
|
|
10 |
Unless required by applicable law or agreed to in writing, software |
|
11 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
See the License for the specific language governing permissions and |
|
14 |
limitations under the License. |
|
15 |
|
|
16 |
Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点: |
|
17 |
|
|
18 |
1.请不要删除和修改根目录下的LICENSE文件。 |
|
19 |
2.请不要删除和修改Snowy源码头部的版权声明。 |
|
20 |
3.请保留源码和相关描述文件的项目出处,作者声明等。 |
|
21 |
4.分发源码时候,请注明软件出处 https://gitee.com/xiaonuobase/snowy |
|
22 |
5.在修改包名,模块名称,项目代码等时,请注明软件出处 https://gitee.com/xiaonuobase/snowy |
|
23 |
6.若您的项目无法满足以上几点,可申请商业授权,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip |
|
24 |
*/ |
|
25 |
package vip.xiaonuo.sys.modular.user.param; |
|
26 |
|
|
27 |
import lombok.Data; |
|
28 |
import lombok.EqualsAndHashCode; |
|
29 |
import vip.xiaonuo.core.pojo.base.param.BaseParam; |
|
30 |
import vip.xiaonuo.core.validation.date.DateValue; |
|
31 |
import vip.xiaonuo.sys.modular.emp.param.SysEmpParam; |
|
32 |
|
|
33 |
import javax.validation.Valid; |
|
34 |
import javax.validation.constraints.*; |
|
35 |
import java.util.List; |
|
36 |
|
|
37 |
/** |
|
38 |
* 系统用户参数 |
|
39 |
* |
|
40 |
* @author xuyuxiang |
|
41 |
* @date 2020/3/23 9:21 |
|
42 |
*/ |
|
43 |
@EqualsAndHashCode(callSuper = true) |
|
44 |
@Data |
|
45 |
public class SysUserParam extends BaseParam { |
|
46 |
|
|
47 |
/** |
|
48 |
* 主键 |
|
49 |
*/ |
|
50 |
@NotNull(message = "id不能为空,请检查id参数", |
|
51 |
groups = {edit.class, delete.class, detail.class, start.class, |
|
52 |
stop.class, grantRole.class, grantData.class, updateInfo.class, |
|
53 |
updatePwd.class, resetPwd.class, changeStatus.class, updateAvatar.class}) |
|
54 |
private Long id; |
|
55 |
|
|
56 |
/** |
|
57 |
* 账号 |
|
58 |
*/ |
|
59 |
@NotBlank(message = "账号不能为空,请检查account参数", groups = {add.class, edit.class}) |
|
60 |
private String account; |
|
61 |
|
|
62 |
/** |
|
63 |
* 密码 |
|
64 |
*/ |
|
65 |
@NotBlank(message = "密码不能为空,请检查password参数", groups = {updatePwd.class}) |
|
66 |
private String password; |
|
67 |
|
|
68 |
/** |
|
69 |
* 新密码 |
|
70 |
*/ |
|
71 |
@NotBlank(message = "新密码不能为空,请检查newPassword参数", groups = {updatePwd.class}) |
|
72 |
private String newPassword; |
|
73 |
|
|
74 |
/** |
|
75 |
* 昵称 |
|
76 |
*/ |
|
77 |
private String nickName; |
|
78 |
|
|
79 |
/** |
|
80 |
* 姓名 |
|
81 |
*/ |
|
82 |
@NotBlank(message = "姓名不能为空,请检查name参数", groups = {add.class, edit.class}) |
|
83 |
private String name; |
|
84 |
|
|
85 |
/** |
|
86 |
* 头像 |
|
87 |
*/ |
|
88 |
@NotNull(message = "头像不能为空,请检查avatar参数", groups = {updateAvatar.class}) |
|
89 |
private Long avatar; |
|
90 |
|
|
91 |
/** |
|
92 |
* 生日 |
|
93 |
*/ |
|
94 |
@DateValue(message = "生日格式不正确,请检查birthday参数", groups = {add.class, edit.class, updateInfo.class}) |
|
95 |
private String birthday; |
|
96 |
|
|
97 |
/** |
|
98 |
* 性别(字典 1男 2女) |
|
99 |
*/ |
|
100 |
@NotNull(message = "性别不能为空,请检查sex参数", groups = {updateInfo.class}) |
|
101 |
@Min(value = 1, message = "性别格式错误,请检查sex参数", groups = {updateInfo.class}) |
|
102 |
@Max(value = 2, message = "性别格式错误,请检查sex参数", groups = {updateInfo.class}) |
|
103 |
private Integer sex; |
|
104 |
|
|
105 |
/** |
|
106 |
* 邮箱 |
|
107 |
*/ |
|
108 |
@Email(message = "邮箱格式错误,请检查email参数", groups = {updateInfo.class}) |
|
109 |
private String email; |
|
110 |
|
|
111 |
/** |
|
112 |
* 手机 |
|
113 |
*/ |
|
114 |
@NotNull(message = "手机号码不能为空,请检查phone参数", groups = {add.class, edit.class, updateInfo.class}) |
|
115 |
@Size(min = 11, max = 11, message = "手机号码格式错误,请检查phone参数", groups = {add.class, edit.class, updateInfo.class}) |
|
116 |
private String phone; |
|
117 |
|
|
118 |
/** |
|
119 |
* 电话 |
|
120 |
*/ |
|
121 |
private String tel; |
|
122 |
|
|
123 |
/** |
|
124 |
* 授权角色 |
|
125 |
*/ |
|
126 |
@NotNull(message = "授权角色不能为空,请检查grantRoleIdList参数", groups = {grantRole.class}) |
|
127 |
private List<Long> grantRoleIdList; |
|
128 |
|
|
129 |
/** |
|
130 |
* 授权数据 |
|
131 |
*/ |
|
132 |
@NotNull(message = "授权数据不能为空,请检查grantOrgIdList参数", groups = {grantData.class}) |
|
133 |
private List<Long> grantOrgIdList; |
|
134 |
|
|
135 |
/*==============员工相关信息==========*/ |
|
136 |
|
|
137 |
@NotNull(message = "员工信息不能为空,请检查sysEmpParam参数", groups = {add.class, edit.class}) |
|
138 |
@Valid |
|
139 |
private SysEmpParam sysEmpParam; |
|
140 |
|
|
141 |
/** |
|
142 |
* 状态(字典 0正常 1停用 2删除) |
|
143 |
*/ |
|
144 |
@NotNull(message = "状态不能为空,请检查status参数", groups = changeStatus.class) |
|
145 |
private Integer status; |
|
146 |
} |