package com.futu.course.user.domain; 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 lombok.Data; /** * 收货地址表 * @TableName user_address */ @TableName(value ="user_address") @Data public class UserAddress implements Serializable { /** * */ @TableId private Long id; /** * */ private Long userId; /** * 收货人 */ private String receiver; /** * */ private String phone; /** * */ private String province; /** * */ private String city; /** * */ private String district; /** * 详细地址 */ private String detail; /** * 是否默认地址 */ private Integer isDefault; @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; } UserAddress other = (UserAddress) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getReceiver() == null ? other.getReceiver() == null : this.getReceiver().equals(other.getReceiver())) && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone())) && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince())) && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity())) && (this.getDistrict() == null ? other.getDistrict() == null : this.getDistrict().equals(other.getDistrict())) && (this.getDetail() == null ? other.getDetail() == null : this.getDetail().equals(other.getDetail())) && (this.getIsDefault() == null ? other.getIsDefault() == null : this.getIsDefault().equals(other.getIsDefault())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getReceiver() == null) ? 0 : getReceiver().hashCode()); result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode()); result = prime * result + ((getProvince() == null) ? 0 : getProvince().hashCode()); result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode()); result = prime * result + ((getDistrict() == null) ? 0 : getDistrict().hashCode()); result = prime * result + ((getDetail() == null) ? 0 : getDetail().hashCode()); result = prime * result + ((getIsDefault() == null) ? 0 : getIsDefault().hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", userId=").append(userId); sb.append(", receiver=").append(receiver); sb.append(", phone=").append(phone); sb.append(", province=").append(province); sb.append(", city=").append(city); sb.append(", district=").append(district); sb.append(", detail=").append(detail); sb.append(", isDefault=").append(isDefault); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } }