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

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;

import java.math.BigDecimal;
import java.util.Optional;

@ApiModel("菜品详情(大小份)")
public class AppletCurrentDishesDetailVO {
   @ApiModelProperty("菜品id")
   private Long dishesId;
   @ApiModelProperty("菜品名称")
   private String dishesName;

   @Getter
   @ApiModelProperty("菜品简介")
   private String intro;
   @ApiModelProperty("库存数量")
   private Integer surplusNum;
   @ApiModelProperty("限购数量")
   private Integer restrictNum;
   @ApiModelProperty("菜品价格")
   private Integer dishesPrice;
   @ApiModelProperty("优惠价")
   private Integer prefPrice;
   @ApiModelProperty("规格类型(1-标准,2-大份,3-小份,4-50g,5-100g)")
   private Long sizeType;
   @ApiModelProperty("菜品规格")
   private String sizeJson;
   @ApiModelProperty("月销量")
   private Integer monthlySales;
   @ApiModelProperty("好评率")
   private BigDecimal goodProbability;

   public void setIntro(String intro) {
      this.intro = intro;
   }

   public Integer getMonthlySales() {
      return (Integer)Optional.ofNullable(this.monthlySales).orElse(0);
   }

   public BigDecimal getGoodProbability() {
      return (BigDecimal)Optional.ofNullable(this.goodProbability).orElse(BigDecimal.ZERO);
   }

   public Long getSizeType() {
      return (Long)Optional.ofNullable(this.sizeType).orElse(1L);
   }

   public Long getDishesId() {
      return this.dishesId;
   }

   public String getDishesName() {
      return this.dishesName;
   }

   public Integer getSurplusNum() {
      return this.surplusNum;
   }

   public Integer getRestrictNum() {
      return this.restrictNum;
   }

   public Integer getDishesPrice() {
      return this.dishesPrice;
   }

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

   public String getSizeJson() {
      return this.sizeJson;
   }

   public void setDishesId(final Long dishesId) {
      this.dishesId = dishesId;
   }

   public void setDishesName(final String dishesName) {
      this.dishesName = dishesName;
   }

   public void setSurplusNum(final Integer surplusNum) {
      this.surplusNum = surplusNum;
   }

   public void setRestrictNum(final Integer restrictNum) {
      this.restrictNum = restrictNum;
   }

   public void setDishesPrice(final Integer dishesPrice) {
      this.dishesPrice = dishesPrice;
   }

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

   public void setSizeType(final Long sizeType) {
      this.sizeType = sizeType;
   }

   public void setSizeJson(final String sizeJson) {
      this.sizeJson = sizeJson;
   }

   public void setMonthlySales(final Integer monthlySales) {
      this.monthlySales = monthlySales;
   }

   public void setGoodProbability(final BigDecimal goodProbability) {
      this.goodProbability = goodProbability;
   }
}
