package cn.van333.mt2ql.wxMessage.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 
 * @TableName wx_user
 */
@TableName(value ="wx_user")
@Data
public class WxUser implements Serializable {
    /**
     * wxid
     */
    @TableId
    private String wxid;

    /**
     * 累计充值
     */
    private BigDecimal moneyLeiji;

    /**
     * 余额
     */
    private BigDecimal moneyShengyu;

    /**
     * 累计充值次数
     */
    private BigDecimal countChongzhi;

    /**
     * 累计消费次数
     */
    private BigDecimal countXiaofei;

    /**
     * 微信昵称
     */
    private String name;

    /**
     * 0 正常 1  拉黑
     */
    private Integer status;

    /**
     * 0 是 1 不是
     */
    private Integer isnew;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WxUser other = (WxUser) that;
        return (this.getWxid() == null ? other.getWxid() == null : this.getWxid().equals(other.getWxid()))
            && (this.getMoneyLeiji() == null ? other.getMoneyLeiji() == null : this.getMoneyLeiji().equals(other.getMoneyLeiji()))
            && (this.getMoneyShengyu() == null ? other.getMoneyShengyu() == null : this.getMoneyShengyu().equals(other.getMoneyShengyu()))
            && (this.getCountChongzhi() == null ? other.getCountChongzhi() == null : this.getCountChongzhi().equals(other.getCountChongzhi()))
            && (this.getCountXiaofei() == null ? other.getCountXiaofei() == null : this.getCountXiaofei().equals(other.getCountXiaofei()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getIsnew() == null ? other.getIsnew() == null : this.getIsnew().equals(other.getIsnew()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getWxid() == null) ? 0 : getWxid().hashCode());
        result = prime * result + ((getMoneyLeiji() == null) ? 0 : getMoneyLeiji().hashCode());
        result = prime * result + ((getMoneyShengyu() == null) ? 0 : getMoneyShengyu().hashCode());
        result = prime * result + ((getCountChongzhi() == null) ? 0 : getCountChongzhi().hashCode());
        result = prime * result + ((getCountXiaofei() == null) ? 0 : getCountXiaofei().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getIsnew() == null) ? 0 : getIsnew().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", wxid=").append(wxid);
        sb.append(", moneyLeiji=").append(moneyLeiji);
        sb.append(", moneyShengyu=").append(moneyShengyu);
        sb.append(", countChongzhi=").append(countChongzhi);
        sb.append(", countXiaofei=").append(countXiaofei);
        sb.append(", name=").append(name);
        sb.append(", status=").append(status);
        sb.append(", isnew=").append(isnew);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}