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

import cn.hutool.core.util.ObjectUtil;
import com.bonus.canteen.core.menu.constant.BigDecimalSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.math.RoundingMode;

@ApiModel("出品机菜品信息")
public class AndroidProductionDishesVO {
   @ApiModelProperty("自定义id")
   private Integer customId;
   @ApiModelProperty("名称")
   private String productName;
   @ApiModelProperty("剩余数量")
   private Integer surplusNum;
   @ApiModelProperty("个人限购数量")
   private Integer restrictNum;
   @ApiModelProperty("优惠价")
   private Integer prefPrice;
   @ApiModelProperty("销售价格")
   private Integer salePrice;
   @ApiModelProperty("原价")
   private Integer originalPrice;
   @ApiModelProperty("菜品简介")
   private String intro;
   @ApiModelProperty("销售模式")
   private Integer salesMode;
   @ApiModelProperty("质量偏差(g)")
   private BigDecimal weightDeviation;
   @ApiModelProperty("每份重量")
   private BigDecimal weight;
   @ApiModelProperty("菜品类型id")
   private Long typeId;
   @ApiModelProperty("菜品类型名称")
   private String typeName;
   @ApiModelProperty("总嘌呤含量(mg/100g)")
   @JsonSerialize(
      using = BigDecimalSerializer.class
   )
   private BigDecimal purine;
   @ApiModelProperty("碘(μg/100g)")
   @JsonSerialize(
      using = BigDecimalSerializer.class
   )
   private BigDecimal iodine;
   @ApiModelProperty("菜品初始推荐分值")
   private Integer initialScore;
   @ApiModelProperty("热量(千卡/100g)")
   @JsonSerialize(
      using = BigDecimalSerializer.class
   )
   private BigDecimal calories;
   @ApiModelProperty("蛋白质(g/100g)")
   @JsonSerialize(
      using = BigDecimalSerializer.class
   )
   private BigDecimal protein;
   @ApiModelProperty("脂肪(g/100g)")
   @JsonSerialize(
      using = BigDecimalSerializer.class
   )
   private BigDecimal fat;
   @ApiModelProperty("碳水化合物(g/100g)")
   @JsonSerialize(
      using = BigDecimalSerializer.class
   )
   private BigDecimal carbohydrate;
   @ApiModelProperty("膳食纤维(g/100g)")
   @JsonSerialize(
      using = BigDecimalSerializer.class
   )
   private BigDecimal dietaryFiber;
   @ApiModelProperty("胆固醇(mg/100g)")
   @JsonSerialize(
      using = BigDecimalSerializer.class
   )
   private BigDecimal cholesterol;
   @ApiModelProperty("钙(mg/100g)")
   @JsonSerialize(
      using = BigDecimalSerializer.class
   )
   private BigDecimal calcium;
   @ApiModelProperty("钠(mg/100g)")
   @JsonSerialize(
      using = BigDecimalSerializer.class
   )
   private BigDecimal sodium;
   @ApiModelProperty("菜品图片")
   private String foodImage;

   public BigDecimal getWeightDeviation() {
      return ObjectUtil.isNull(this.weightDeviation) ? BigDecimal.ZERO : this.weightDeviation.setScale(0, RoundingMode.HALF_UP);
   }

   public BigDecimal getWeight() {
      return ObjectUtil.isNull(this.weight) ? BigDecimal.ZERO : this.weight.setScale(0, RoundingMode.HALF_UP);
   }

   public Integer getCustomId() {
      return this.customId;
   }

   public String getProductName() {
      return this.productName;
   }

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

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

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

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

   public Integer getOriginalPrice() {
      return this.originalPrice;
   }

   public String getIntro() {
      return this.intro;
   }

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

   public Long getTypeId() {
      return this.typeId;
   }

   public String getTypeName() {
      return this.typeName;
   }

   public BigDecimal getPurine() {
      return this.purine;
   }

   public BigDecimal getIodine() {
      return this.iodine;
   }

   public Integer getInitialScore() {
      return this.initialScore;
   }

   public BigDecimal getCalories() {
      return this.calories;
   }

   public BigDecimal getProtein() {
      return this.protein;
   }

   public BigDecimal getFat() {
      return this.fat;
   }

   public BigDecimal getCarbohydrate() {
      return this.carbohydrate;
   }

   public BigDecimal getDietaryFiber() {
      return this.dietaryFiber;
   }

   public BigDecimal getCholesterol() {
      return this.cholesterol;
   }

   public BigDecimal getCalcium() {
      return this.calcium;
   }

   public BigDecimal getSodium() {
      return this.sodium;
   }

   public String getFoodImage() {
      return this.foodImage;
   }

   public void setCustomId(final Integer customId) {
      this.customId = customId;
   }

   public void setProductName(final String productName) {
      this.productName = productName;
   }

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

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

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

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

   public void setOriginalPrice(final Integer originalPrice) {
      this.originalPrice = originalPrice;
   }

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

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

   public void setWeightDeviation(final BigDecimal weightDeviation) {
      this.weightDeviation = weightDeviation;
   }

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

   public void setTypeId(final Long typeId) {
      this.typeId = typeId;
   }

   public void setTypeName(final String typeName) {
      this.typeName = typeName;
   }

   public void setPurine(final BigDecimal purine) {
      this.purine = purine;
   }

   public void setIodine(final BigDecimal iodine) {
      this.iodine = iodine;
   }

   public void setInitialScore(final Integer initialScore) {
      this.initialScore = initialScore;
   }

   public void setCalories(final BigDecimal calories) {
      this.calories = calories;
   }

   public void setProtein(final BigDecimal protein) {
      this.protein = protein;
   }

   public void setFat(final BigDecimal fat) {
      this.fat = fat;
   }

   public void setCarbohydrate(final BigDecimal carbohydrate) {
      this.carbohydrate = carbohydrate;
   }

   public void setDietaryFiber(final BigDecimal dietaryFiber) {
      this.dietaryFiber = dietaryFiber;
   }

   public void setCholesterol(final BigDecimal cholesterol) {
      this.cholesterol = cholesterol;
   }

   public void setCalcium(final BigDecimal calcium) {
      this.calcium = calcium;
   }

   public void setSodium(final BigDecimal sodium) {
      this.sodium = sodium;
   }

   public void setFoodImage(final String foodImage) {
      this.foodImage = foodImage;
   }

}
