package com.bonus.canteen.core.supply.purchase.domain.bo;

import cn.hutool.core.util.ObjectUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;

@ApiModel
public class MenuDishesMaterialModel {
   @ApiModelProperty("菜品id")
   private Long dishesId;
   @ApiModelProperty("菜品id")
   private Long baseDishesId;
   @ApiModelProperty("菜品")
   private String dishesName;
   @ApiModelProperty("原料id")
   private Long materialId;
   @ApiModelProperty("原料")
   private String materialName;
   @ApiModelProperty("原重量(g)")
   private BigDecimal weight;
   @ApiModelProperty("可食部分%")
   private BigDecimal edible;
   @ApiModelProperty("计算后重量(g)")
   private BigDecimal calWeight;
   @ApiModelProperty("预留比例(0-100)")
   private Integer reserveRate;

   public BigDecimal getEdible() {
      return ObjectUtil.isNull(this.edible) ? new BigDecimal(100) : this.edible;
   }

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

   public Long getBaseDishesId() {
      return this.baseDishesId;
   }

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

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

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

   public BigDecimal getWeight() {
      return this.weight;
   }

   public BigDecimal getCalWeight() {
      return this.calWeight;
   }

   public Integer getReserveRate() {
      return this.reserveRate;
   }

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

   public void setBaseDishesId(final Long baseDishesId) {
      this.baseDishesId = baseDishesId;
   }

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

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

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

   public void setWeight(final BigDecimal weight) {
      this.weight = weight;
   }

   public void setEdible(final BigDecimal edible) {
      this.edible = edible;
   }

   public void setCalWeight(final BigDecimal calWeight) {
      this.calWeight = calWeight;
   }

   public void setReserveRate(final Integer reserveRate) {
      this.reserveRate = reserveRate;
   }
}
