#
Junjie
2 天以前 d9411a6692197efabcf132d61c051e51cb85e219
src/main/java/com/zy/system/entity/User.java
@@ -8,6 +8,7 @@
import com.core.common.SpringUtils;
import com.zy.system.service.HostService;
import com.zy.system.service.RoleService;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.text.SimpleDateFormat;
@@ -48,6 +49,31 @@
    private String password;
    /**
     * 是否允许使用 MFA
     */
    @TableField("mfa_allow")
    private Integer mfaAllow;
    /**
     * 是否已启用 MFA
     */
    @TableField("mfa_enabled")
    private Integer mfaEnabled;
    /**
     * MFA 密钥
     */
    @TableField(value = "mfa_secret", select = false)
    private String mfaSecret;
    /**
     * MFA 绑定时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("mfa_bound_time")
    private Date mfaBoundTime;
    /**
     * 角色
     */
    @TableField("role_id")
@@ -56,6 +82,7 @@
    /**
     * 注册时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private Date createTime;
@@ -113,6 +140,59 @@
        this.password = password;
    }
    public Integer getMfaAllow() {
        return mfaAllow;
    }
    public String getMfaAllow$() {
        if (null == this.mfaAllow) {
            return null;
        }
        return Integer.valueOf(1).equals(this.mfaAllow) ? "是" : "否";
    }
    public void setMfaAllow(Integer mfaAllow) {
        this.mfaAllow = mfaAllow;
    }
    public Integer getMfaEnabled() {
        return mfaEnabled;
    }
    public String getMfaEnabled$() {
        if (null == this.mfaEnabled) {
            return null;
        }
        return Integer.valueOf(1).equals(this.mfaEnabled) ? "是" : "否";
    }
    public void setMfaEnabled(Integer mfaEnabled) {
        this.mfaEnabled = mfaEnabled;
    }
    public String getMfaSecret() {
        return mfaSecret;
    }
    public void setMfaSecret(String mfaSecret) {
        this.mfaSecret = mfaSecret;
    }
    public Date getMfaBoundTime() {
        return mfaBoundTime;
    }
    public String getMfaBoundTime$() {
        if (Cools.isEmpty(this.mfaBoundTime)) {
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.mfaBoundTime);
    }
    public void setMfaBoundTime(Date mfaBoundTime) {
        this.mfaBoundTime = mfaBoundTime;
    }
    public Long getRoleId() {
        return roleId;
    }