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

import com.bonus.canteen.core.common.utils.SysUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@ApiModel
public class SupermarketProductEditDTO {
   @ApiModelProperty("超市商品明细id")
   private @NotNull(
   message = "超市商品明细id不能为空!"
) Long supermarketDetailId;
   @ApiModelProperty("超市id")
   private @NotNull(
   message = "超市id不能为空!"
) Long supermarketId;
   @ApiModelProperty("商品id")
   private Long materialId;
   @ApiModelProperty("上架状态(1-上架,2-下架)")
   private Integer putawayState;
   @ApiModelProperty("是否线上销售(1-是,2-否)")
   private Integer ifOnline;
   @ApiModelProperty("零售价")
   private @NotNull(
   message = "零售价不能为空!"
) Integer salePrice;
   @ApiModelProperty("会员价")
   private @NotNull(
   message = "会员价不能为空!"
) Integer prefPrice;
   @ApiModelProperty("个人限购数量")
   private Integer personLimit;
   @ApiModelProperty("每日限购数量")
   private Integer oneDayLimit;
   @ApiModelProperty("图片")
   private String imgUrl;
   @ApiModelProperty("库存数")
   private BigDecimal inventoryNum;

   public void setImgUrl(String imgUrl) {
      this.imgUrl = SysUtil.getCutPath(imgUrl);
   }

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

   public Long getSupermarketId() {
      return this.supermarketId;
   }

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

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

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

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

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

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

   public Integer getOneDayLimit() {
      return this.oneDayLimit;
   }

   public String getImgUrl() {
      return this.imgUrl;
   }

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

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

   public void setSupermarketId(final Long supermarketId) {
      this.supermarketId = supermarketId;
   }

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

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

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

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

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

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

   public void setOneDayLimit(final Integer oneDayLimit) {
      this.oneDayLimit = oneDayLimit;
   }

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

}
