package com.bocloud.cmp.model.jumpserver;

import com.alibaba.fastjson.annotation.JSONField;
import com.bocloud.cmp.model.DepartmentBean;

import java.util.Date;
import java.util.List;
import java.util.Map;

public class User {
    private Long id;
    private String loginName;
    private String userName;
    private String password;
    private String email;
    private String mobile;
    private AuthType authType;
    private Role role; // 338版本一个用户只属于一个角色，所以放到了这个字段
    private Long departmentId;
    private DepartmentBean department;
    private AuthInfo authInfo;
    private Integer state; // 338 0-活动；1-密码过期；2-帐号过期；3-禁用。
    private Integer status; // 335 0-禁用 1-活动
    private Map<String, String> extInfo;
    private Map<String, String> extra;
    @JSONField(name = "usergroups")
    private List<UserGroup> userGroups;
    private Long lastLoginTime;
    private Long updateTime;
    private Long joinTime;
    private Integer pwdValidType;
    private Integer joinUser;
    private Date validFrom;
    private Date validTo;
    private Boolean deleted;
    private Integer userType;
    private Boolean enabled;
    private List<Role> roles; // 335版本一个用户只属于多个角色，所以放到了这个字段

    public User() {
    }

    public User(Long id) {
        this.id = id;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public AuthType getAuthType() {
        return authType;
    }

    public void setAuthType(AuthType authType) {
        this.authType = authType;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Long getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Long departmentId) {
        this.departmentId = departmentId;
    }

    public DepartmentBean getDepartment() {
        return department;
    }

    public void setDepartment(DepartmentBean department) {
        this.department = department;
    }

    public AuthInfo getAuthInfo() {
        return authInfo;
    }

    public void setAuthInfo(AuthInfo authInfo) {
        this.authInfo = authInfo;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Map<String, String> getExtInfo() {
        return extInfo;
    }

    public void setExtInfo(Map<String, String> extInfo) {
        this.extInfo = extInfo;
    }

    public Map<String, String> getExtra() {
        return extra;
    }

    public void setExtra(Map<String, String> extra) {
        this.extra = extra;
    }

    public List<UserGroup> getUserGroups() {
        return userGroups;
    }

    public void setUserGroups(List<UserGroup> userGroups) {
        this.userGroups = userGroups;
    }

    public Long getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Long lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public Long getJoinTime() {
        return joinTime;
    }

    public void setJoinTime(Long joinTime) {
        this.joinTime = joinTime;
    }

    public Integer getPwdValidType() {
        return pwdValidType;
    }

    public void setPwdValidType(Integer pwdValidType) {
        this.pwdValidType = pwdValidType;
    }

    public Integer getJoinUser() {
        return joinUser;
    }

    public void setJoinUser(Integer joinUser) {
        this.joinUser = joinUser;
    }

    public Date getValidFrom() {
        return validFrom;
    }

    public void setValidFrom(Date validFrom) {
        this.validFrom = validFrom;
    }

    public Date getValidTo() {
        return validTo;
    }

    public void setValidTo(Date validTo) {
        this.validTo = validTo;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }
}
