package com.bonus.canteen.core.supermarket.vo;

import com.bonus.common.houqin.constant.LeConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;

@ApiModel
public class SupermarketNotRemovedProductListVO {
   @ApiModelProperty("超市商品明细id")
   private Long supermarketDetailId;
   @ApiModelProperty("商品id")
   private Long materialId;
   @ApiModelProperty("商品")
   private String materialName;
   @ApiModelProperty("单位id")
   private Long unitId;
   @ApiModelProperty("单位")
   private String unitName;
   @ApiModelProperty("售卖价格")
   private BigDecimal salePrice;
   @ApiModelProperty("优惠价格")
   private BigDecimal prefPrice;
   @ApiModelProperty("销售方式")
   private Integer salesMode;
   @ApiModelProperty("上架状态(1-上架,2-下架)")
   private Integer putawayState;
   @ApiModelProperty("是否线上销售(1是2否)")
   private Integer ifOnline;
   @ApiModelProperty("库存id")
   private Long inventoryId;
   @ApiModelProperty("库存数量")
   private BigDecimal inventoryNum;
   @ApiModelProperty("个人限购数量")
   private Integer personLimit;
   @ApiModelProperty("图片")
   private String imageUrl;

   public boolean ifExpired() {
      return !LeConstants.COMMON_YES.equals(this.putawayState) || !LeConstants.COMMON_YES.equals(this.ifOnline);
   }

   public Long getSupermarketDetailId() {
      return this.supermarketDetailId;
   }

   public Long getMaterialId() {
      return this.materialId;
   }

   public String getMaterialName() {
      return this.materialName;
   }

   public Long getUnitId() {
      return this.unitId;
   }

   public String getUnitName() {
      return this.unitName;
   }

   public BigDecimal getSalePrice() {
      return this.salePrice;
   }

   public BigDecimal getPrefPrice() {
      return this.prefPrice;
   }

   public Integer getSalesMode() {
      return this.salesMode;
   }

   public Integer getPutawayState() {
      return this.putawayState;
   }

   public Integer getIfOnline() {
      return this.ifOnline;
   }

   public Long getInventoryId() {
      return this.inventoryId;
   }

   public BigDecimal getInventoryNum() {
      return this.inventoryNum;
   }

   public Integer getPersonLimit() {
      return this.personLimit;
   }

   public String getImageUrl() {
      return this.imageUrl;
   }

   public void setSupermarketDetailId(final Long supermarketDetailId) {
      this.supermarketDetailId = supermarketDetailId;
   }

   public void setMaterialId(final Long materialId) {
      this.materialId = materialId;
   }

   public void setMaterialName(final String materialName) {
      this.materialName = materialName;
   }

   public void setUnitId(final Long unitId) {
      this.unitId = unitId;
   }

   public void setUnitName(final String unitName) {
      this.unitName = unitName;
   }

   public void setSalePrice(final BigDecimal salePrice) {
      this.salePrice = salePrice;
   }

   public void setPrefPrice(final BigDecimal prefPrice) {
      this.prefPrice = prefPrice;
   }

   public void setSalesMode(final Integer salesMode) {
      this.salesMode = salesMode;
   }

   public void setPutawayState(final Integer putawayState) {
      this.putawayState = putawayState;
   }

   public void setIfOnline(final Integer ifOnline) {
      this.ifOnline = ifOnline;
   }

   public void setInventoryId(final Long inventoryId) {
      this.inventoryId = inventoryId;
   }

   public void setInventoryNum(final BigDecimal inventoryNum) {
      this.inventoryNum = inventoryNum;
   }

   public void setPersonLimit(final Integer personLimit) {
      this.personLimit = personLimit;
   }

   public void setImageUrl(final String imageUrl) {
      this.imageUrl = imageUrl;
   }

   @Override
   public boolean equals(final Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof SupermarketNotRemovedProductListVO)) {
         return false;
      } else {
         SupermarketNotRemovedProductListVO other = (SupermarketNotRemovedProductListVO)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            Object this$supermarketDetailId = this.getSupermarketDetailId();
            Object other$supermarketDetailId = other.getSupermarketDetailId();
            if (this$supermarketDetailId == null) {
               if (other$supermarketDetailId != null) {
                  return false;
               }
            } else if (!this$supermarketDetailId.equals(other$supermarketDetailId)) {
               return false;
            }

            Object this$materialId = this.getMaterialId();
            Object other$materialId = other.getMaterialId();
            if (this$materialId == null) {
               if (other$materialId != null) {
                  return false;
               }
            } else if (!this$materialId.equals(other$materialId)) {
               return false;
            }

            Object this$unitId = this.getUnitId();
            Object other$unitId = other.getUnitId();
            if (this$unitId == null) {
               if (other$unitId != null) {
                  return false;
               }
            } else if (!this$unitId.equals(other$unitId)) {
               return false;
            }

            label158: {
               Object this$salesMode = this.getSalesMode();
               Object other$salesMode = other.getSalesMode();
               if (this$salesMode == null) {
                  if (other$salesMode == null) {
                     break label158;
                  }
               } else if (this$salesMode.equals(other$salesMode)) {
                  break label158;
               }

               return false;
            }

            label151: {
               Object this$putawayState = this.getPutawayState();
               Object other$putawayState = other.getPutawayState();
               if (this$putawayState == null) {
                  if (other$putawayState == null) {
                     break label151;
                  }
               } else if (this$putawayState.equals(other$putawayState)) {
                  break label151;
               }

               return false;
            }

            Object this$ifOnline = this.getIfOnline();
            Object other$ifOnline = other.getIfOnline();
            if (this$ifOnline == null) {
               if (other$ifOnline != null) {
                  return false;
               }
            } else if (!this$ifOnline.equals(other$ifOnline)) {
               return false;
            }

            label137: {
               Object this$inventoryId = this.getInventoryId();
               Object other$inventoryId = other.getInventoryId();
               if (this$inventoryId == null) {
                  if (other$inventoryId == null) {
                     break label137;
                  }
               } else if (this$inventoryId.equals(other$inventoryId)) {
                  break label137;
               }

               return false;
            }

            label130: {
               Object this$personLimit = this.getPersonLimit();
               Object other$personLimit = other.getPersonLimit();
               if (this$personLimit == null) {
                  if (other$personLimit == null) {
                     break label130;
                  }
               } else if (this$personLimit.equals(other$personLimit)) {
                  break label130;
               }

               return false;
            }

            Object this$materialName = this.getMaterialName();
            Object other$materialName = other.getMaterialName();
            if (this$materialName == null) {
               if (other$materialName != null) {
                  return false;
               }
            } else if (!this$materialName.equals(other$materialName)) {
               return false;
            }

            Object this$unitName = this.getUnitName();
            Object other$unitName = other.getUnitName();
            if (this$unitName == null) {
               if (other$unitName != null) {
                  return false;
               }
            } else if (!this$unitName.equals(other$unitName)) {
               return false;
            }

            label109: {
               Object this$salePrice = this.getSalePrice();
               Object other$salePrice = other.getSalePrice();
               if (this$salePrice == null) {
                  if (other$salePrice == null) {
                     break label109;
                  }
               } else if (this$salePrice.equals(other$salePrice)) {
                  break label109;
               }

               return false;
            }

            label102: {
               Object this$prefPrice = this.getPrefPrice();
               Object other$prefPrice = other.getPrefPrice();
               if (this$prefPrice == null) {
                  if (other$prefPrice == null) {
                     break label102;
                  }
               } else if (this$prefPrice.equals(other$prefPrice)) {
                  break label102;
               }

               return false;
            }

            Object this$inventoryNum = this.getInventoryNum();
            Object other$inventoryNum = other.getInventoryNum();
            if (this$inventoryNum == null) {
               if (other$inventoryNum != null) {
                  return false;
               }
            } else if (!this$inventoryNum.equals(other$inventoryNum)) {
               return false;
            }

            Object this$imageUrl = this.getImageUrl();
            Object other$imageUrl = other.getImageUrl();
            if (this$imageUrl == null) {
               if (other$imageUrl != null) {
                  return false;
               }
            } else if (!this$imageUrl.equals(other$imageUrl)) {
               return false;
            }

            return true;
         }
      }
   }

   protected boolean canEqual(final Object other) {
      return other instanceof SupermarketNotRemovedProductListVO;
   }

   @Override
   public int hashCode() {
      int result = 1;
      Object $supermarketDetailId = this.getSupermarketDetailId();
      result = result * 59 + ($supermarketDetailId == null ? 43 : $supermarketDetailId.hashCode());
      Object $materialId = this.getMaterialId();
      result = result * 59 + ($materialId == null ? 43 : $materialId.hashCode());
      Object $unitId = this.getUnitId();
      result = result * 59 + ($unitId == null ? 43 : $unitId.hashCode());
      Object $salesMode = this.getSalesMode();
      result = result * 59 + ($salesMode == null ? 43 : $salesMode.hashCode());
      Object $putawayState = this.getPutawayState();
      result = result * 59 + ($putawayState == null ? 43 : $putawayState.hashCode());
      Object $ifOnline = this.getIfOnline();
      result = result * 59 + ($ifOnline == null ? 43 : $ifOnline.hashCode());
      Object $inventoryId = this.getInventoryId();
      result = result * 59 + ($inventoryId == null ? 43 : $inventoryId.hashCode());
      Object $personLimit = this.getPersonLimit();
      result = result * 59 + ($personLimit == null ? 43 : $personLimit.hashCode());
      Object $materialName = this.getMaterialName();
      result = result * 59 + ($materialName == null ? 43 : $materialName.hashCode());
      Object $unitName = this.getUnitName();
      result = result * 59 + ($unitName == null ? 43 : $unitName.hashCode());
      Object $salePrice = this.getSalePrice();
      result = result * 59 + ($salePrice == null ? 43 : $salePrice.hashCode());
      Object $prefPrice = this.getPrefPrice();
      result = result * 59 + ($prefPrice == null ? 43 : $prefPrice.hashCode());
      Object $inventoryNum = this.getInventoryNum();
      result = result * 59 + ($inventoryNum == null ? 43 : $inventoryNum.hashCode());
      Object $imageUrl = this.getImageUrl();
      result = result * 59 + ($imageUrl == null ? 43 : $imageUrl.hashCode());
      return result;
   }

   @Override
   public String toString() {
      Long var10000 = this.getSupermarketDetailId();
      return "SupermarketNotRemovedProductListVO(supermarketDetailId=" + var10000 + ", materialId=" + this.getMaterialId() + ", materialName=" + this.getMaterialName() + ", unitId=" + this.getUnitId() + ", unitName=" + this.getUnitName() + ", salePrice=" + String.valueOf(this.getSalePrice()) + ", prefPrice=" + String.valueOf(this.getPrefPrice()) + ", salesMode=" + this.getSalesMode() + ", putawayState=" + this.getPutawayState() + ", ifOnline=" + this.getIfOnline() + ", inventoryId=" + this.getInventoryId() + ", inventoryNum=" + String.valueOf(this.getInventoryNum()) + ", personLimit=" + this.getPersonLimit() + ", imageUrl=" + this.getImageUrl() + ")";
   }
}
