package com.house365.beans.vo;

import com.house365.common.beans.DomainObject;

import java.util.Date;

public class User extends DomainObject {

    private String wechatUserId;

    private String companyUserId;

    private String companyId;

    private String userName;

    private Integer wechatDepartmentId;

    private String companyDepartmentId;

    private String position;

    private String mobile;

    private String gender;

    private String email;

    private String weixinid;

    private String avatarMediaid;

    private String extattr;

    private String creater;

    private Date createTime;

    public String getWechatUserId() {
        return wechatUserId;
    }

    public void setWechatUserId(String wechatUserId) {
        this.wechatUserId = wechatUserId;
    }

    public Integer getWechatDepartmentId() {
        return wechatDepartmentId;
    }

    public void setWechatDepartmentId(Integer wechatDepartmentId) {
        this.wechatDepartmentId = wechatDepartmentId;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public String getCompanyUserId() {
        return companyUserId;
    }

    public void setCompanyUserId(String companyUserId) {
        this.companyUserId = companyUserId;
    }

    public String getCompanyDepartmentId() {
        return companyDepartmentId;
    }

    public void setCompanyDepartmentId(String companyDepartmentId) {
        this.companyDepartmentId = companyDepartmentId;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position == null ? null : position.trim();
    }

    public String getMobile() {
        return mobile;
    }

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

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public String getWeixinid() {
        return weixinid;
    }

    public void setWeixinid(String weixinid) {
        this.weixinid = weixinid == null ? null : weixinid.trim();
    }

    public String getAvatarMediaid() {
        return avatarMediaid;
    }

    public void setAvatarMediaid(String avatarMediaid) {
        this.avatarMediaid = avatarMediaid == null ? null : avatarMediaid.trim();
    }

    public String getExtattr() {
        return extattr;
    }

    public void setExtattr(String extattr) {
        this.extattr = extattr == null ? null : extattr.trim();
    }

    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater == null ? null : creater.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        User other = (User) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getWechatUserId() == null ? other.getWechatUserId() == null : this.getWechatUserId().equals(other.getWechatUserId()))
                && (this.getCompanyUserId() == null ? other.getCompanyUserId() == null : this.getCompanyUserId().equals(other.getCompanyUserId()))
                && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
                && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
                && (this.getWechatDepartmentId() == null ? other.getWechatDepartmentId() == null : this.getWechatDepartmentId().equals(other.getWechatDepartmentId()))
                && (this.getCompanyDepartmentId() == null ? other.getCompanyDepartmentId() == null : this.getCompanyDepartmentId().equals(other.getCompanyDepartmentId()))
                && (this.getPosition() == null ? other.getPosition() == null : this.getPosition().equals(other.getPosition()))
                && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile()))
                && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
                && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
                && (this.getWeixinid() == null ? other.getWeixinid() == null : this.getWeixinid().equals(other.getWeixinid()))
                && (this.getAvatarMediaid() == null ? other.getAvatarMediaid() == null : this.getAvatarMediaid().equals(other.getAvatarMediaid()))
                && (this.getExtattr() == null ? other.getExtattr() == null : this.getExtattr().equals(other.getExtattr()))
                && (this.getCreater() == null ? other.getCreater() == null : this.getCreater().equals(other.getCreater()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getWechatUserId() == null) ? 0 : getWechatUserId().hashCode());
        result = prime * result + ((getCompanyUserId() == null) ? 0 : getCompanyUserId().hashCode());
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getWechatDepartmentId() == null) ? 0 : getWechatDepartmentId().hashCode());
        result = prime * result + ((getCompanyDepartmentId() == null) ? 0 : getCompanyDepartmentId().hashCode());
        result = prime * result + ((getPosition() == null) ? 0 : getPosition().hashCode());
        result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode());
        result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getWeixinid() == null) ? 0 : getWeixinid().hashCode());
        result = prime * result + ((getAvatarMediaid() == null) ? 0 : getAvatarMediaid().hashCode());
        result = prime * result + ((getExtattr() == null) ? 0 : getExtattr().hashCode());
        result = prime * result + ((getCreater() == null) ? 0 : getCreater().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", wechatUserId=").append(wechatUserId);
        sb.append(", companyUserId=").append(companyUserId);
        sb.append(", companyId=").append(companyId);
        sb.append(", userName=").append(userName);
        sb.append(", wechatDepartmentId=").append(wechatDepartmentId);
        sb.append(", companyDepartmentId=").append(companyDepartmentId);
        sb.append(", position=").append(position);
        sb.append(", mobile=").append(mobile);
        sb.append(", gender=").append(gender);
        sb.append(", email=").append(email);
        sb.append(", weixinid=").append(weixinid);
        sb.append(", avatarMediaid=").append(avatarMediaid);
        sb.append(", extattr=").append(extattr);
        sb.append(", creater=").append(creater);
        sb.append(", createTime=").append(createTime);
        sb.append("]");
        return sb.toString();
    }
}
