GarAddress.java 4.79 KB
package com.trash.garbage.pojo.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import lombok.Data;


/**
 * 建筑垃圾-用户地址
 *
 * @author 20412
 * @TableName gar_address
 */
@TableName(value = "gar_address")
@Data
public class GarAddress implements Serializable {
    /**
     * 地址id
     */
    @TableId
    private Long garAddressId;

    /**
     * 用户id
     */
    private String garUserId;

    /**
     * 用户地址
     */
    private String garUserAddress;

    /**
     * 默认地址
     */
    private Integer garUserDefault;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date garCreateTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date garUpdateTime;

    /**
     * 联系人名
     */
    private String garUserContactName;

    /**
     * 联系电话
     */
    private String garUserContactTel;

    /**
     * 备注
     */
    private String garRemark;

    @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;
        }
        GarAddress other = (GarAddress) that;
        return (this.getGarAddressId() == null ? other.getGarAddressId() == null : this.getGarAddressId().equals(other.getGarAddressId()))
                && (this.getGarUserId() == null ? other.getGarUserId() == null : this.getGarUserId().equals(other.getGarUserId()))
                && (this.getGarUserAddress() == null ? other.getGarUserAddress() == null : this.getGarUserAddress().equals(other.getGarUserAddress()))
                && (this.getGarUserDefault() == null ? other.getGarUserDefault() == null : this.getGarUserDefault().equals(other.getGarUserDefault()))
                && (this.getGarCreateTime() == null ? other.getGarCreateTime() == null : this.getGarCreateTime().equals(other.getGarCreateTime()))
                && (this.getGarUpdateTime() == null ? other.getGarUpdateTime() == null : this.getGarUpdateTime().equals(other.getGarUpdateTime()))
                && (this.getGarUserContactName() == null ? other.getGarUserContactName() == null : this.getGarUserContactName().equals(other.getGarUserContactName()))
                && (this.getGarUserContactTel() == null ? other.getGarUserContactTel() == null : this.getGarUserContactTel().equals(other.getGarUserContactTel()))
                && (this.getGarRemark() == null ? other.getGarRemark() == null : this.getGarRemark().equals(other.getGarRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGarAddressId() == null) ? 0 : getGarAddressId().hashCode());
        result = prime * result + ((getGarUserId() == null) ? 0 : getGarUserId().hashCode());
        result = prime * result + ((getGarUserAddress() == null) ? 0 : getGarUserAddress().hashCode());
        result = prime * result + ((getGarUserDefault() == null) ? 0 : getGarUserDefault().hashCode());
        result = prime * result + ((getGarCreateTime() == null) ? 0 : getGarCreateTime().hashCode());
        result = prime * result + ((getGarUpdateTime() == null) ? 0 : getGarUpdateTime().hashCode());
        result = prime * result + ((getGarUserContactName() == null) ? 0 : getGarUserContactName().hashCode());
        result = prime * result + ((getGarUserContactTel() == null) ? 0 : getGarUserContactTel().hashCode());
        result = prime * result + ((getGarRemark() == null) ? 0 : getGarRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", garAddressId=").append(garAddressId);
        sb.append(", garUserId=").append(garUserId);
        sb.append(", garUserAddress=").append(garUserAddress);
        sb.append(", garUserDefault=").append(garUserDefault);
        sb.append(", garCreateTime=").append(garCreateTime);
        sb.append(", garUpdateTime=").append(garUpdateTime);
        sb.append(", garUserContactName=").append(garUserContactName);
        sb.append(", garUserContactTel=").append(garUserContactTel);
        sb.append(", garRemark=").append(garRemark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}