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

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.bonus.canteen.core.common.utils.CustomNumberConverter;
import com.bonus.canteen.core.common.utils.CustomYesNoConverter;
import com.bonus.canteen.core.common.utils.SysUtil;
import com.bonus.canteen.core.supermarket.converter.PutawayStateConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@ApiModel(
   value = "超市商品表",
   description = "超市商品表"
)
public class SupermarketProductPageVO {
   @ExcelIgnore
   @ApiModelProperty("主键id")
   @TableId(
      value = "id",
      type = IdType.AUTO
   )
   private Long id;
   @ExcelIgnore
   @ApiModelProperty("超市商品明细id")
   private Long supermarketDetailId;
   @ExcelIgnore
   @ApiModelProperty("超市id")
   private Long supermarketId;
   @ExcelIgnore
   @ApiModelProperty("超市")
   private String supermarketName;
   @ExcelIgnore
   @ApiModelProperty("商品id")
   private Long materialId;
   @ExcelProperty(
      value = {"名称"},
      order = 0
   )
   @ApiModelProperty("商品")
   private String materialName;
   @ExcelIgnore
   @ApiModelProperty("单位id")
   private Long unitId;
   @ExcelProperty(
      value = {"单位"},
      order = 1
   )
   @ApiModelProperty("单位")
   private String unitName;
   @ExcelProperty(
      value = {"上架状态"},
      order = 3,
      converter = PutawayStateConverter.class
   )
   @ApiModelProperty("上架状态(1-上架,2-下架)")
   private Integer putawayState;
   @ExcelProperty(
      value = {"是否线上销售"},
      order = 4,
      converter = CustomYesNoConverter.class
   )
   @ApiModelProperty("是否线上销售(1-是,2-否)")
   private Integer ifOnline;
   @ExcelProperty(
      value = {"零售价"},
      order = 5,
      converter = CustomNumberConverter.class
   )
   @ApiModelProperty("零售价")
   private Integer salePrice;
   @ExcelProperty(
      value = {"会员价"},
      order = 6,
      converter = CustomNumberConverter.class
   )
   @ApiModelProperty("会员价")
   private Integer prefPrice;
   @ExcelProperty(
      value = {"个人限购"},
      order = 7
   )
   @ApiModelProperty("个人限购数量")
   private Integer personLimit;
   @ExcelProperty(
      value = {"每日限购"},
      order = 8
   )
   @ApiModelProperty("每日限购数量")
   private Integer oneDayLimit;
   @ExcelIgnore
   @ApiModelProperty("图片")
   private String imgUrl;
   @ExcelProperty(
      value = {"库存数"},
      order = 9
   )
   @ApiModelProperty("库存")
   private BigDecimal inventoryNum;
   @ExcelProperty(
      value = {"条码"},
      order = 10
   )
   @ApiModelProperty("条码")
   private String barCode;
   @ExcelIgnore
   @ApiModelProperty("更新人")
   private String upby;
   @ExcelIgnore
   @ApiModelProperty("更新时间")
   private LocalDateTime uptime;
   @ExcelProperty(
      value = {"商品类别"},
      order = 2
   )
   @ApiModelProperty("商品类别")
   private String categoryName;
   @ExcelProperty(
      value = {"进货价"},
      order = 11,
      converter = CustomNumberConverter.class
   )
   @ApiModelProperty("进货价")
   private BigDecimal buyingPrice;
   @ExcelProperty(
      value = {"库存金额"},
      order = 12,
      converter = CustomNumberConverter.class
   )
   @ApiModelProperty("库存金额")
   private BigDecimal drpPrice;
   @ExcelProperty(
      value = {"售价金额"},
      order = 13,
      converter = CustomNumberConverter.class
   )
   @ApiModelProperty("售价金额")
   private BigDecimal sellingPrice;
   @ExcelProperty(
      value = {"毛利率"},
      order = 14
   )
   @ApiModelProperty("毛利率")
   private BigDecimal rateOfMargin;

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

   public Long getId() {
      return this.id;
   }

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

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

   public String getSupermarketName() {
      return this.supermarketName;
   }

   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 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 BigDecimal getInventoryNum() {
      return this.inventoryNum;
   }

   public String getBarCode() {
      return this.barCode;
   }

   public String getUpby() {
      return this.upby;
   }

   public LocalDateTime getUptime() {
      return this.uptime;
   }

   public String getCategoryName() {
      return this.categoryName;
   }

   public BigDecimal getBuyingPrice() {
      return this.buyingPrice;
   }

   public BigDecimal getDrpPrice() {
      return this.drpPrice;
   }

   public BigDecimal getSellingPrice() {
      return this.sellingPrice;
   }

   public BigDecimal getRateOfMargin() {
      return this.rateOfMargin;
   }

   public void setId(final Long id) {
      this.id = id;
   }

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

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

   public void setSupermarketName(final String supermarketName) {
      this.supermarketName = supermarketName;
   }

   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 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 setImgUrl(final String imgUrl) {
      this.imgUrl = imgUrl;
   }

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

   public void setBarCode(final String barCode) {
      this.barCode = barCode;
   }

   public void setUpby(final String upby) {
      this.upby = upby;
   }

   public void setUptime(final LocalDateTime uptime) {
      this.uptime = uptime;
   }

   public void setCategoryName(final String categoryName) {
      this.categoryName = categoryName;
   }

   public void setBuyingPrice(final BigDecimal buyingPrice) {
      this.buyingPrice = buyingPrice;
   }

   public void setDrpPrice(final BigDecimal drpPrice) {
      this.drpPrice = drpPrice;
   }

   public void setSellingPrice(final BigDecimal sellingPrice) {
      this.sellingPrice = sellingPrice;
   }

   public void setRateOfMargin(final BigDecimal rateOfMargin) {
      this.rateOfMargin = rateOfMargin;
   }

}
