|
@@ -0,0 +1,117 @@
|
|
|
+package com.zhentao.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_item
|
|
|
+ */
|
|
|
+@TableName(value ="order_item")
|
|
|
+@Data
|
|
|
+public class OrderItem implements Serializable {
|
|
|
+ /**
|
|
|
+ * 明细ID
|
|
|
+ */
|
|
|
+ private Long detailId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 订单ID
|
|
|
+ */
|
|
|
+ private Long orderId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商品SKU ID
|
|
|
+ */
|
|
|
+ private Long skuId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商品名称
|
|
|
+ */
|
|
|
+ private String productName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 单价
|
|
|
+ */
|
|
|
+ private BigDecimal unitPrice;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 数量
|
|
|
+ */
|
|
|
+ private Integer quantity;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 小计金额
|
|
|
+ */
|
|
|
+ private BigDecimal amount;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 创建时间
|
|
|
+ */
|
|
|
+ private Date createTime;
|
|
|
+
|
|
|
+ @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;
|
|
|
+ }
|
|
|
+ OrderItem other = (OrderItem) that;
|
|
|
+ return (this.getDetailId() == null ? other.getDetailId() == null : this.getDetailId().equals(other.getDetailId()))
|
|
|
+ && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
|
|
|
+ && (this.getSkuId() == null ? other.getSkuId() == null : this.getSkuId().equals(other.getSkuId()))
|
|
|
+ && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
|
|
|
+ && (this.getUnitPrice() == null ? other.getUnitPrice() == null : this.getUnitPrice().equals(other.getUnitPrice()))
|
|
|
+ && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
|
|
|
+ && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
|
|
|
+ && (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 + ((getDetailId() == null) ? 0 : getDetailId().hashCode());
|
|
|
+ result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
|
|
|
+ result = prime * result + ((getSkuId() == null) ? 0 : getSkuId().hashCode());
|
|
|
+ result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
|
|
|
+ result = prime * result + ((getUnitPrice() == null) ? 0 : getUnitPrice().hashCode());
|
|
|
+ result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
|
|
|
+ result = prime * result + ((getAmount() == null) ? 0 : getAmount().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(", detailId=").append(detailId);
|
|
|
+ sb.append(", orderId=").append(orderId);
|
|
|
+ sb.append(", skuId=").append(skuId);
|
|
|
+ sb.append(", productName=").append(productName);
|
|
|
+ sb.append(", unitPrice=").append(unitPrice);
|
|
|
+ sb.append(", quantity=").append(quantity);
|
|
|
+ sb.append(", amount=").append(amount);
|
|
|
+ sb.append(", createTime=").append(createTime);
|
|
|
+ sb.append(", serialVersionUID=").append(serialVersionUID);
|
|
|
+ sb.append("]");
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
+}
|