package com.futu.course.orders.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 java.math.BigDecimal; import java.util.Date; import lombok.Data; /** * * @TableName order_info */ @TableName(value ="order_info") @Data public class OrderInfo implements Serializable { /** * */ @TableId private Long id; /** * */ private Long userId; /** * 总金额 */ private BigDecimal totalAount; /** * 优惠金额 */ private BigDecimal desAount; /** * 实付金额 */ private BigDecimal queAount; /** * */ private Date createTime; private Long couponId; private Integer status; @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; } OrderInfo other = (OrderInfo) 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.getTotalAount() == null ? other.getTotalAount() == null : this.getTotalAount().equals(other.getTotalAount())) && (this.getDesAount() == null ? other.getDesAount() == null : this.getDesAount().equals(other.getDesAount())) && (this.getQueAount() == null ? other.getQueAount() == null : this.getQueAount().equals(other.getQueAount())) && (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (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 + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getTotalAount() == null) ? 0 : getTotalAount().hashCode()); result = prime * result + ((getDesAount() == null) ? 0 : getDesAount().hashCode()); result = prime * result + ((getQueAount() == null) ? 0 : getQueAount().hashCode()); result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().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(", id=").append(id); sb.append(", userId=").append(userId); sb.append(", totalAount=").append(totalAount); sb.append(", desAount=").append(desAount); sb.append(", queAount=").append(queAount); sb.append(", couponId=").append(couponId); sb.append(", status=").append(status); sb.append(", createTime=").append(createTime); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } }