|
|
@@ -0,0 +1,76 @@
|
|
|
+package space.anyi.seataStorageMicroService.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 storage
|
|
|
+ */
|
|
|
+@TableName(value ="storage")
|
|
|
+@Data
|
|
|
+public class Storage implements Serializable {
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @TableId(type = IdType.AUTO)
|
|
|
+ private Long id;
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ */
|
|
|
+ private Long productId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 库存量
|
|
|
+ */
|
|
|
+ private Integer amount;
|
|
|
+
|
|
|
+ @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;
|
|
|
+ }
|
|
|
+ Storage other = (Storage) that;
|
|
|
+ return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
|
|
+ && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
|
|
|
+ && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int hashCode() {
|
|
|
+ final int prime = 31;
|
|
|
+ int result = 1;
|
|
|
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
|
|
+ result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
|
|
|
+ result = prime * result + ((getAmount() == null) ? 0 : getAmount().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(", productId=").append(productId);
|
|
|
+ sb.append(", amount=").append(amount);
|
|
|
+ sb.append(", serialVersionUID=").append(serialVersionUID);
|
|
|
+ sb.append("]");
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
+}
|