package ink.wgink.pojo.dtos.department;

import ink.wgink.pojo.dtos.user.UserDTO;

import java.io.Serializable;

/**
 * @ClassName: DepartmentUserDTO
 * @Description: 部门用户
 * @Author: wenc
 * @Date: 2019/1/10 10:39 PM
 * @Version: 1.0
 **/
public class DepartmentUserDTO implements Serializable {

    private static final long serialVersionUID = -2899875759045646539L;
    private String userId;
    private String userUsername;
    private String userName;
    private String userPhone;
    private String userEmail;
    private Integer loginType;
    private Integer userType;
    private Integer userState;
    private String userAvatar;
    private String departmentId;
    private String departmentName;
    private String userSort;

    public DepartmentUserDTO() {
    }

    public DepartmentUserDTO(UserDTO userDTO) {
        this.userId = userDTO.getUserId();
        this.userUsername = userDTO.getUserUsername();
        this.userName = userDTO.getUserName();
        this.userPhone = userDTO.getUserPhone();
        this.userEmail = userDTO.getUserEmail();
        this.loginType = userDTO.getLoginType();
        this.userType = userDTO.getUserType();
        this.userState = userDTO.getUserState();
        this.userAvatar = userDTO.getUserAvatar();
    }

    public void setUser(UserDTO userDTO) {
        this.userId = userDTO.getUserId();
        this.userUsername = userDTO.getUserUsername();
        this.userName = userDTO.getUserName();
        this.userPhone = userDTO.getUserPhone();
        this.userEmail = userDTO.getUserEmail();
        this.loginType = userDTO.getLoginType();
        this.userType = userDTO.getUserType();
        this.userState = userDTO.getUserState();
        this.userAvatar = userDTO.getUserAvatar();
    }

    public String getUserId() {
        return userId == null ? "" : userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserUsername() {
        return userUsername == null ? "" : userUsername;
    }

    public void setUserUsername(String userUsername) {
        this.userUsername = userUsername;
    }

    public String getUserName() {
        return userName == null ? "" : userName;
    }

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

    public String getUserPhone() {
        return userPhone == null ? "" : userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getUserEmail() {
        return userEmail == null ? "" : userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public Integer getLoginType() {
        return loginType == null ? 0 : loginType;
    }

    public void setLoginType(Integer loginType) {
        this.loginType = loginType;
    }

    public Integer getUserType() {
        return userType == null ? 0 : userType;
    }

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

    public Integer getUserState() {
        return userState == null ? 0 : userState;
    }

    public void setUserState(Integer userState) {
        this.userState = userState;
    }

    public String getUserAvatar() {
        return userAvatar == null ? "" : userAvatar;
    }

    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }

    public String getDepartmentId() {
        return departmentId == null ? "" : departmentId;
    }

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

    public String getDepartmentName() {
        return departmentName == null ? "" : departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getUserSort() {
        return userSort == null ? "" : userSort;
    }

    public void setUserSort(String userSort) {
        this.userSort = userSort;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"userId\":\"")
                .append(userId).append('\"');
        sb.append(",\"userUsername\":\"")
                .append(userUsername).append('\"');
        sb.append(",\"userName\":\"")
                .append(userName).append('\"');
        sb.append(",\"userPhone\":\"")
                .append(userPhone).append('\"');
        sb.append(",\"userEmail\":\"")
                .append(userEmail).append('\"');
        sb.append(",\"loginType\":")
                .append(loginType);
        sb.append(",\"userType\":")
                .append(userType);
        sb.append(",\"userState\":")
                .append(userState);
        sb.append(",\"userAvatar\":\"")
                .append(userAvatar).append('\"');
        sb.append(",\"departmentId\":\"")
                .append(departmentId).append('\"');
        sb.append(",\"departmentName\":\"")
                .append(departmentName).append('\"');
        sb.append(",\"userSort\":\"")
                .append(userSort).append('\"');
        sb.append('}');
        return sb.toString();
    }
}
