|
|
@@ -1,56 +1,144 @@
|
|
|
package com.zhentao.entity;
|
|
|
|
|
|
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 com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
+import java.util.Date;
|
|
|
import lombok.Data;
|
|
|
|
|
|
-import java.io.Serializable;
|
|
|
-import java.time.LocalDateTime;
|
|
|
-
|
|
|
/**
|
|
|
- * 积分商品实体类
|
|
|
+ *
|
|
|
+ * @TableName points_product
|
|
|
*/
|
|
|
+@TableName(value ="points_product")
|
|
|
@Data
|
|
|
-@TableName("points_product")
|
|
|
-public class PointsProduct implements Serializable {
|
|
|
-
|
|
|
- private static final long serialVersionUID = 1L;
|
|
|
-
|
|
|
- @TableId(value = "id", type = IdType.AUTO)
|
|
|
+public class PointsProduct {
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @TableId(type = IdType.AUTO)
|
|
|
private Long id;
|
|
|
-
|
|
|
- /** 商品名称 */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商品名称
|
|
|
+ */
|
|
|
private String name;
|
|
|
-
|
|
|
- /** 商品描述 */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商品描述
|
|
|
+ */
|
|
|
private String description;
|
|
|
-
|
|
|
- /** 商品图片 */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商品图片
|
|
|
+ */
|
|
|
private String imageUrl;
|
|
|
-
|
|
|
- /** 积分价格 */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 积分价格
|
|
|
+ */
|
|
|
private Integer pointsPrice;
|
|
|
-
|
|
|
- /** 库存数量 */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 库存
|
|
|
+ */
|
|
|
private Integer stock;
|
|
|
-
|
|
|
- /** 分类: 1-实物商品 2-虚拟商品 */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 1-实物 2-虚拟
|
|
|
+ */
|
|
|
private Integer category;
|
|
|
-
|
|
|
- /** 是否推荐: 0-否 1-是 */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否推荐
|
|
|
+ */
|
|
|
private Integer isRecommend;
|
|
|
-
|
|
|
- /** 状态: 0-下架 1-上架 */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 0-下架 1-上架
|
|
|
+ */
|
|
|
private Integer status;
|
|
|
-
|
|
|
- /** 排序 */
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ */
|
|
|
private Integer sortOrder;
|
|
|
-
|
|
|
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
|
- private LocalDateTime createTime;
|
|
|
-
|
|
|
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
|
- private LocalDateTime updateTime;
|
|
|
-}
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ */
|
|
|
+ private Date createTime;
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ */
|
|
|
+ private Date updateTime;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean equals(Object that) {
|
|
|
+ if (this == that) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (that == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (getClass() != that.getClass()) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ PointsProduct other = (PointsProduct) that;
|
|
|
+ return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
|
|
+ && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
|
|
+ && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
|
|
|
+ && (this.getImageUrl() == null ? other.getImageUrl() == null : this.getImageUrl().equals(other.getImageUrl()))
|
|
|
+ && (this.getPointsPrice() == null ? other.getPointsPrice() == null : this.getPointsPrice().equals(other.getPointsPrice()))
|
|
|
+ && (this.getStock() == null ? other.getStock() == null : this.getStock().equals(other.getStock()))
|
|
|
+ && (this.getCategory() == null ? other.getCategory() == null : this.getCategory().equals(other.getCategory()))
|
|
|
+ && (this.getIsRecommend() == null ? other.getIsRecommend() == null : this.getIsRecommend().equals(other.getIsRecommend()))
|
|
|
+ && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
|
|
+ && (this.getSortOrder() == null ? other.getSortOrder() == null : this.getSortOrder().equals(other.getSortOrder()))
|
|
|
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
|
|
+ && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int hashCode() {
|
|
|
+ final int prime = 31;
|
|
|
+ int result = 1;
|
|
|
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
|
|
+ result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
|
|
+ result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
|
|
|
+ result = prime * result + ((getImageUrl() == null) ? 0 : getImageUrl().hashCode());
|
|
|
+ result = prime * result + ((getPointsPrice() == null) ? 0 : getPointsPrice().hashCode());
|
|
|
+ result = prime * result + ((getStock() == null) ? 0 : getStock().hashCode());
|
|
|
+ result = prime * result + ((getCategory() == null) ? 0 : getCategory().hashCode());
|
|
|
+ result = prime * result + ((getIsRecommend() == null) ? 0 : getIsRecommend().hashCode());
|
|
|
+ result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
|
|
+ result = prime * result + ((getSortOrder() == null) ? 0 : getSortOrder().hashCode());
|
|
|
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
|
|
+ result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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(", name=").append(name);
|
|
|
+ sb.append(", description=").append(description);
|
|
|
+ sb.append(", imageUrl=").append(imageUrl);
|
|
|
+ sb.append(", pointsPrice=").append(pointsPrice);
|
|
|
+ sb.append(", stock=").append(stock);
|
|
|
+ sb.append(", category=").append(category);
|
|
|
+ sb.append(", isRecommend=").append(isRecommend);
|
|
|
+ sb.append(", status=").append(status);
|
|
|
+ sb.append(", sortOrder=").append(sortOrder);
|
|
|
+ sb.append(", createTime=").append(createTime);
|
|
|
+ sb.append(", updateTime=").append(updateTime);
|
|
|
+ sb.append("]");
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
+}
|