新版仿ok交易所-后端
zj
2025-01-06 6e21cf6973aa1898259ddceda665f0f1b06272ab
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
/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许,不可做商业用途!
 *
 * 版权所有,侵权必究!
 */
 
package com.yami.trading.sys.model;
 
 
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
 
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
 
/**
 * 系统用户
 */
@Data
@TableName("tz_sys_user")
public class SysUser implements Serializable {
    private static final long serialVersionUID = 1L;
 
    /**
     * 用户ID
     *
     */
    @TableId
    private Long userId;
 
    /**
     * 用户名
     */
    @NotBlank(message="用户名不能为空")
    @Size(min = 2,max = 20,message = "用户名长度要在2-20之间")
    private String username;
 
    /**
     * 密码
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String password;
 
    /**
     * 邮箱
     */
    @NotBlank(message="邮箱不能为空")
    @Email(message="邮箱格式不正确")
    private String email;
 
    /**
     * 手机号
     */
    @Pattern(regexp="0?1[0-9]{10}",message = "请输入正确的手机号")
    private String mobile;
 
    /**
     * 状态  0:禁用   1:正常
     */
    private Integer status;
 
    /**
     * 用户所在店铺id
     */
    private Long shopId;
 
    /**
     * 角色ID列表
     */
    @TableField(exist=false)
    private List<Long> roleIdList;
 
    @TableField(exist=false)
    private List<String> roleName;
 
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 资金密码
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private   String safePassword;
 
 
 
    /**
     * 谷歌验证器
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String googleAuthSecret;
    /**
     * 谷歌验证器是否绑定
     */
    private boolean googleAuthBind=false ;
 
    /**
     * 更新日期
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
 
 
    @ApiModelProperty("备注")
    private String remarks;
}