content: package priv.jesse.mall.entity;
  
  import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
  
  import javax.persistence.*;
  import java.io.Serializable;
  import java.util.Date;
  @Entity
  @JsonIgnoreProperties({ "handler","hibernateLazyInitializer" })
  public class Product implements Serializable {
      @Id
      @GeneratedValue
      @Column
      private Integer id;
      /**
       * 商品标题
       */
      @Column
      private String title;
      /**
       * 市场价
       */
      @Column
      private Double marketPrice;
      /**
       * 商城价
       */
      @Column
      private Double shopPrice;
      /**
       * 主图
       */
      @Column
      private String image;
      /**
       * 描述
       */
      @Column(name = "`desc`")
      private String desc;
      /**
       * 是否热门商品
       */
      @Column
      private Integer isHot;
      /**
       * 二级分类Id
       */
      @Column
      private Integer csid;
      /**
       * 商品创建日期
       */
      @Column
      private Date pdate;
      /**
       * 评论内容
       */
      @Column
      private String content;
  
      @Transient
      private Classification categorySec;
  
      public Classification getCategorySec() {
          return categorySec;
      }
  
      public void setCategorySec(Classification categorySec) {
          this.categorySec = categorySec;
      }
  
      private static final long serialVersionUID = 1L;
  
      public Product(Integer id, String title, Double marketPrice, Double shopPrice, String image, String desc, Integer isHot, Integer csid, Date pdate,String content) {
          this.id = id;
          this.title = title;
          this.marketPrice = marketPrice;
          this.shopPrice = shopPrice;
          this.image = image;
          this.desc = desc;
          this.isHot = isHot;
          this.csid = csid;
          this.pdate = pdate;
          this.content=content;
      }
  
      public Product() {
          super();
      }
  
      public Integer getId() {
          return id;
      }
  
      public void setId(Integer id) {
          this.id = id;
      }
  
      public String getTitle() {
          return title;
      }
  
      public void setTitle(String title) {
          this.title = title == null ? null : title.trim();
      }
  
      public Double getMarketPrice() {
          return marketPrice;
      }
  
      public void setMarketPrice(Double marketPrice) {
          this.marketPrice = marketPrice;
      }
  
      public Double getShopPrice() {
          return shopPrice;
      }
  
      public void setShopPrice(Double shopPrice) {
          this.shopPrice = shopPrice;
      }
  
      public String getImage() {
          return image;
      }
  
      public void setImage(String image) {
          this.image = image == null ? null : image.trim();
      }
  
      public String getDesc() {
          return desc;
      }
  
      public void setDesc(String desc) {
          this.desc = desc == null ? null : desc.trim();
      }
  
      public Integer getIsHot() {
          return isHot;
      }
  
      public void setIsHot(Integer isHot) {
          this.isHot = isHot;
      }
  
      public Integer getCsid() {
          return csid;
      }
  
      public void setCsid(Integer csid) {
          this.csid = csid;
      }
  
      public Date getPdate() {
          return pdate;
      }
  
      public void setPdate(Date pdate) {
          this.pdate = pdate;
      }
      public String getContent() {
          return content;
      }
  
      public void setContent(String content) {
          this.content = content;
      }
  
      @Override
      public boolean equals(Object that) {
          if (this == that) {
              return true;
          }
          if (that == null) {
              return false;
          }
          if (getClass() != that.getClass()) {
              return false;
          }
          Product other = (Product) that;
          return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
              && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
              && (this.getMarketPrice() == null ? other.getMarketPrice() == null : this.getMarketPrice().equals(other.getMarketPrice()))
              && (this.getShopPrice() == null ? other.getShopPrice() == null : this.getShopPrice().equals(other.getShopPrice()))
              && (this.getImage() == null ? other.getImage() == null : this.getImage().equals(other.getImage()))
              && (this.getDesc() == null ? other.getDesc() == null : this.getDesc().equals(other.getDesc()))
              && (this.getIsHot() == null ? other.getIsHot() == null : this.getIsHot().equals(other.getIsHot()))
              && (this.getCsid() == null ? other.getCsid() == null : this.getCsid().equals(other.getCsid()))
              && (this.getPdate() == null ? other.getPdate() == null : this.getPdate().equals(other.getPdate()))
                  && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()));
      }
  
      @Override
      public int hashCode() {
          final int prime = 31;
          int result = 1;
          result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
          result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
          result = prime * result + ((getMarketPrice() == null) ? 0 : getMarketPrice().hashCode());
          result = prime * result + ((getShopPrice() == null) ? 0 : getShopPrice().hashCode());
          result = prime * result + ((getImage() == null) ? 0 : getImage().hashCode());
          result = prime * result + ((getDesc() == null) ? 0 : getDesc().hashCode());
          result = prime * result + ((getIsHot() == null) ? 0 : getIsHot().hashCode());
          result = prime * result + ((getCsid() == null) ? 0 : getCsid().hashCode());
          result = prime * result + ((getPdate() == null) ? 0 : getPdate().hashCode());
          result = prime * result + ((getContent() == null) ? 0 : getContent().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(", title=").append(title);
          sb.append(", marketPrice=").append(marketPrice);
          sb.append(", shopPrice=").append(shopPrice);
          sb.append(", image=").append(image);
          sb.append(", desc=").append(desc);
          sb.append(", isHot=").append(isHot);
          sb.append(", csid=").append(csid);
          sb.append(", pdate=").append(pdate);
          sb.append(", content=").append(content);
          sb.append(", serialVersionUID=").append(serialVersionUID);
          sb.append("]");
          return sb.toString();
      }
  }