SysUser.java
1.75 KB
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
package com.youjia.system.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.youjia.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
/**
* 用户表(sys_user)。
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = true)
@TableName("sys_user")
@Schema(description = "账号")
public class SysUser extends BaseEntity {
@TableId(value = "user_id", type = IdType.AUTO)
@Schema(description = "用户 ID")
private Long userId;
@Schema(description = "登录账号,唯一,创建后不可修改")
private String account;
@JsonIgnore
@Schema(description = "密码(BCrypt 密文)", hidden = true)
private String password;
@Schema(description = "姓名")
private String name;
@Schema(description = "手机号,用于企微通知")
private String mobile;
@Schema(description = "邮箱")
private String email;
@Schema(description = "主属组织 ID")
private Long orgId;
@Schema(description = "数据域:1-全部数据 2-本部门及下级 3-本部门 4-仅本人")
private Integer dataScope;
@Schema(description = "状态:1-启用 0-停用")
private Integer status;
@Schema(description = "最后登录时间")
private LocalDateTime lastLoginAt;
@Schema(description = "是否需强制改密:1-是 0-否(初始/重置密码后为 1,自助改密后为 0)")
private Integer needChangePwd;
@Schema(description = "备注")
private String remark;
}