jinlin
2023-11-03 35435e8b1995e6775c82b86652381e07e3faff54
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
/**
 * Copyright (c) 2018 人人开源 All rights reserved.
 * <p>
 * https://www.renren.io
 * <p>
 * 版权所有,侵权必究!
 */
 
package com.zt.life.sys.model;
 
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.zt.common.annotation.OssField;
import com.zt.common.entity.BaseEntity;
import com.zt.common.entity.BusiEntity;
import com.zt.common.entity.CompanyEntity;
import com.zt.common.validator.group.DefaultGroup;
import com.zt.core.oss.dto.OssDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Range;
import org.springframework.format.annotation.DateTimeFormat;
 
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
 
/**
 * 系统用户
 *
 * @author hehz
 */
@Data
@ApiModel(value = "用户")
@EqualsAndHashCode(callSuper = false)
@TableName("SYS_USER")
public class SysUserReg extends BaseEntity {
    private static final long serialVersionUID = 1L;
 
    @ApiModelProperty(value = "员工工号", required = false)
    // @NotBlank(message = "员工工号不能为空", groups = DefaultGroup.class)
    private String userCode;
 
    @ApiModelProperty(value = "用户名", required = true)
    @NotBlank(message = "用户名不能为空", groups = DefaultGroup.class)
    private String username;
 
    @ApiModelProperty(value = "密码")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    // @NotBlank(message="密码不能为空", groups = AddGroup.class)
    @JsonIgnore
    private String password;
 
    @ApiModelProperty(value = "真实姓名", required = true)
    @NotBlank(message = "真实姓名不能为空", groups = DefaultGroup.class)
    private String realName;
 
    @ApiModelProperty(value = "昵称")
    private String nickName;
 
    @ApiModelProperty(value = "姓名简拼")
    private String simpleSpelling;
 
    @ApiModelProperty(value = "姓名全拼")
    private String fullSpelling;
 
    @ApiModelProperty(value = "头像")
    private String headUrl;
 
    @ApiModelProperty(value = "性别   0:男   1:女    2:保密", required = false)
    @Range(min = 0, max = 2, message = "sysuser.gender.range", groups = DefaultGroup.class)
    private Integer gender;
 
    @ApiModelProperty(value = "邮箱")
    @Email(message = "邮箱格式不正确", groups = DefaultGroup.class)
    private String email;
 
    @ApiModelProperty(value = "手机号")
    private String mobile;
 
    @ApiModelProperty(value = "部门名称")
    @TableField(exist = false)
    private String deptName;
 
    @ApiModelProperty(value = "钉钉号")
    private String dingcode;
 
    @ApiModelProperty(value = "微信号")
    private String wechat;
 
    @ApiModelProperty(value = "单点登录标识")
    private Long openid;
 
    @ApiModelProperty(value = "是否允许用户同时登录0:不允许 1:允许")
    private Boolean isMulonline;
 
    @ApiModelProperty(value = "允许登录开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtAllowstart;
 
    @ApiModelProperty(value = "允许登录结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtAllowend;
 
    @ApiModelProperty(value = "暂停登录开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtLockstart;
 
    @ApiModelProperty(value = "暂停登录结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtLockend;
 
    @ApiModelProperty(value = "排序")
    private Integer sort;
 
    @ApiModelProperty(value = "是否是超级管理员")
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    @TableField("is_super_admin")
    private boolean isSuperAdmin;
 
    @ApiModelProperty(value = "状态")
    @TableField(fill = FieldFill.INSERT)
    private Integer status;
 
    @ApiModelProperty(value = "最后一次登录时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date lastLoginErrorTime;
 
    @ApiModelProperty(value = "登录错误计数")
    private Integer loginErrorCount;
 
    @ApiModelProperty(value = "是否锁定")
    private Integer isLocked;
 
    @OssField("用户头像")
    @ApiModelProperty(value = "用户头像")
    @TableField(exist = false)
    private OssDto avatar;
 
    @ApiModelProperty(value = "岗位ID列表")
    @TableField(exist = false)
    private List<Long> postIdList = new ArrayList<>();
 
    @ApiModelProperty(value = "职位ID列表")
    @TableField(exist = false)
    private List<Long> jobIdList = new ArrayList<>();
 
    @OssField("register")
    @ApiModelProperty(value = "注册标识")
    @TableField(exist = false)
    private Integer register;
 
    @OssField("isDelete")
    @ApiModelProperty(value = "删除")
    private Integer isDelete;
 
    @ApiModelProperty(value = "")
    private Date createDate;
 
    @ApiModelProperty(value = "")
    private Date updateDate;
 
    @ApiModelProperty(value = "")
    private Long creator;
 
    @ApiModelProperty(value = "")
    private Long updater;
 
    @ApiModelProperty(value = "")
    private Long companyId;
 
    @ApiModelProperty(value = "")
    private Long deptId;
 
    @ApiModelProperty(value = "")
    private Long tenantId;
 
    @ApiModelProperty(value = "")
    private Long id;
 
    @ApiModelProperty(value = "")
    private String teamgroupIds;
 
    @ApiModelProperty(value = "")
    private String shipIds ;
 
}