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

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.bonus.canteen.core.common.utils.FileUrlUtil;
import com.bonus.canteen.core.menu.dto.MenuDishesAddMaterialDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;

import javax.validation.Valid;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@TableName("menu_dishes")
@ApiModel("菜品信息")
public class MenuDishes extends Model<MenuDishes> {
    private static final long serialVersionUID = 1L;
    @TableId
    @ApiModelProperty("主键id")
    private Long id;
    @ApiModelProperty("菜品id")
    private Long dishesId;
    @ApiModelProperty("菜品基础id")
    private Long baseDishesId;
    @ApiModelProperty("类型(1-菜品,2-套餐)")
    private Integer mealType;
    @ApiModelProperty("菜品编码")
    private String dishesNum;
    @ApiModelProperty("自定义id")
    private Integer customId;
    @ApiModelProperty("存货id(数据同步)")
    private String inventoryId;
    @ApiModelProperty("菜品名称")
    private String dishesName;
    @ApiModelProperty("菜品别称")
    private String aliasName;
    @ApiModelProperty("菜品名称拼音首字母")
    private String pinyinInitials;
    @ApiModelProperty("菜品名称全拼")
    private String pinyinFull;
    @ApiModelProperty("菜品简介")
    private String intro;
    @ApiModelProperty("菜品类型ID")
    private Long typeId;

    @ApiModelProperty("菜品类型ID List")
    @TableField(exist = false)
    private List typeIdList;

    @ApiModelProperty("菜品类型名称")
    @TableField(exist = false)
    private String typeName;

    @ApiModelProperty("菜品灶类ID")
    private Long cookId;
    @ApiModelProperty("菜品分类id(自定义)")
    private Long classifyId;
    @ApiModelProperty("菜品功效id（强筋健骨）")
    private Long effectId;
    @ApiModelProperty("菜系id(鲁系主食，沪系主食)")
    private Long styleId;
    @ApiModelProperty("是否本地特色(1是2否)")
    private Integer ifLocalFeature;
    @ApiModelProperty("菜别(1小荤,2大荤,3素)")
    private Integer dishesDepart;
    @ApiModelProperty("次序（1餐前,2餐后）")
    private Integer sequence;
    @ApiModelProperty("辣度")
    private Integer pungencyDegree;
    @ApiModelProperty("销售方式(1按份,2称重)")
    private Integer salesMode;
    @ApiModelProperty("规格类型(1-标准,2-大小份)")
    private Long sizeType;
    @ApiModelProperty("规格json")
    private String sizeJson;
    @ApiModelProperty("菜品质量(g/份)")
    private Double weight;
    @ApiModelProperty("大份份量")
    private Double largeWeight;
    @ApiModelProperty("小份份量")
    private Double littleWeight;
    @ApiModelProperty("质量偏差(g)")
    private Double weightDeviation;
    @ApiModelProperty("菜品基础单价(分)")
    private Integer price;
    @ApiModelProperty("称重单位多少克(默认1kg)")
    private Integer unitPrice;
    @ApiModelProperty("大份单价")
    private Integer largePrice;
    @ApiModelProperty("小份单价")
    private Integer littlePrice;
    @ApiModelProperty("结果图转注册图 1 是  2否")
    private Integer convertFlag;
    private Integer materialCost;
    private Integer grossProfit;
    private BigDecimal grossProfitRate;
    @ApiModelProperty("菜品图片url")
    private String imageUrl;
    @ApiModelProperty("菜品详情")
    private String particulars;
    @ApiModelProperty("菜品推荐")
    private String recommend;
    @ApiModelProperty("首页推荐(1-推荐,2-不推荐)")
    private Integer indexRecommend;
    @ApiModelProperty("点赞调查标识(1-是,2-否)")
    private Integer likeSurvey;
    @ApiModelProperty("点赞调查批次号")
    private Long likeBatch;
    @ApiModelProperty("点赞数")
    private Integer likeNum;
    @ApiModelProperty("菜品初始推荐分值")
    private Integer initialScore;
    @ApiModelProperty("热量(千卡/100g)")
    private Double calories;
    @ApiModelProperty("蛋白质(g/100g)")
    private Double protein;
    @ApiModelProperty("脂肪(g/100g)")
    private Double fat;
    @ApiModelProperty("碳水化合物(g/100g)")
    private Double carbohydrate;
    @ApiModelProperty("膳食纤维(g/100g)")
    private Double dietaryFiber;
    @ApiModelProperty("胆固醇(mg/100g)")
    private Double cholesterol;
    @ApiModelProperty("钙(mg/100g)")
    private Double calcium;
    @ApiModelProperty("钠(mg/100g)")
    private Double sodium;
    @ApiModelProperty("总嘌呤含量(mg/100g)")
    private Double purine;
    @ApiModelProperty("铁(mg/100g)")
    private Double iron;
    @ApiModelProperty("碘(μg/100g)")
    private Double iodine;
    @ApiModelProperty("钾(mg/100g)")
    private Double kalium;
    @ApiModelProperty("维生素a(μg/100g)")
    private Double vitaminA;
    @ApiModelProperty("维生素c(mg/100g)")
    private Double vitaminC;
    @ApiModelProperty("维生素e(g/100g)")
    private Double vitaminE;
    @ApiModelProperty("镁(mg/100g)")
    private Double magnesium;
    @ApiModelProperty("锌(mg/100g)")
    private Double zinc;
    @ApiModelProperty("血糖生成指数(GI)")
    private Double glycemicIndex;
    @ApiModelProperty("区域id")
    private Long areaId;
    @ApiModelProperty("食堂ID")
    private Long canteenId;
    @ApiModelProperty("档口或店铺id")
    private Long shopstallId;
    @ApiModelProperty("是否是公共菜品(1-是,2-否,)")
    private Integer publicDishes;
    @ApiModelProperty("隐藏标识(1隐藏,2展示)")
    private Integer hideFlag;
    @ApiModelProperty("删除标识")
    @TableField(exist = false)
    private Integer delFlag;
    @ApiModelProperty("乐观锁")
    private Integer revision;
    @TableField(
            value = "create_by",
            fill = FieldFill.INSERT
    )
    @ApiModelProperty("创建人")
    private String createBy;
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
    @TableField(
            value = "update_by",
            fill = FieldFill.UPDATE
    )
    @ApiModelProperty("更新人")
    private String updateBy;
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("条形码")
    private String barCode;

    @ApiModelProperty("优先级")
    private String sort;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("食堂名称")
    @TableField(exist = false)
    private String canteenName;
    @ApiModelProperty("档口名称")
    @TableField(exist = false)
    private String stallName;

    @Getter
    @ApiModelProperty("区域名称")
    @TableField(exist = false)
    private String areaName;

    @Getter
    @ApiModelProperty("原材料")
    @TableField(exist = false)
    private @Valid List<MenuDishesAddMaterialDTO> materialList;

    @Getter
    @ApiModelProperty("标签id")
    @TableField(exist = false)
    private List<Integer> labelIdList;

    @Getter
    @ApiModelProperty("口味id")
    private @Size( max = 3,message = "口味最多配置3个")
    @TableField(exist = false)
    List<Integer> tasteIdList;

    @Getter
    @ApiModelProperty("季节分类")
    @TableField(exist = false)
    private List<Integer> season;

    @Getter
    @ApiModelProperty("适宜人群")
    @TableField(exist = false)
    private List<Integer> suitIdList;

    @Getter
    @ApiModelProperty("餐次")
    @TableField(exist = false)
    private List<Integer> mealList;

    @Getter
    @TableField(exist = false)
    private String labelId;

    @Getter
    @TableField(exist = false)
    private String tasteId;

    @Getter
    @TableField(exist = false)
    private String seasonId;

    @Getter
    @TableField(exist = false)
    private String suitId;

    @Getter
    @TableField(exist = false)
    private String mealId;




    public void setMaterialList(List<MenuDishesAddMaterialDTO> materialList) {
        this.materialList = materialList;
    }

    public void setLabelIdList(List<Integer> labelIdList) {
        this.labelIdList = labelIdList;
    }

    public void setTasteIdList(List<Integer> tasteIdList) {
        this.tasteIdList = tasteIdList;
    }

    public void setSeason(List<Integer> season) {
        this.season = season;
    }

    public void setSuitIdList(List<Integer> suitIdList) {
        this.suitIdList = suitIdList;
    }

    public void setMealList(List<Integer> mealList) {
        this.mealList = mealList;
    }

    public void setLabelId(String labelId) {
        this.labelId = labelId;
    }

    public void setTasteId(String tasteId) {
        this.tasteId = tasteId;
    }

    public void setSeasonId(String seasonId) {
        this.seasonId = seasonId;
    }

    public void setSuitId(String suitId) {
        this.suitId = suitId;
    }

    public void setMealId(String mealId) {
        this.mealId = mealId;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getCanteenName() {
        return canteenName;
    }

    public void setCanteenName(String canteenName) {
        this.canteenName = canteenName;
    }

    public String getStallName() {
        return stallName;
    }

    public void setStallName(String stallName) {
        this.stallName = stallName;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getBarCode() {
        return barCode;
    }

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

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

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

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

    public Integer getMealType() {
        return this.mealType;
    }

    public String getDishesNum() {
        return this.dishesNum;
    }

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

    public String getInventoryId() {
        return this.inventoryId;
    }

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

    public String getAliasName() {
        return this.aliasName;
    }

    public String getPinyinInitials() {
        return this.pinyinInitials;
    }

    public String getPinyinFull() {
        return this.pinyinFull;
    }

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

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

    public List getTypeIdList() {
        return typeIdList;
    }

    public void setTypeIdList(List typeIdList) {
        this.typeIdList = typeIdList;
    }

    public Long getCookId() {
        return this.cookId;
    }

    public Long getClassifyId() {
        return this.classifyId;
    }

    public Long getEffectId() {
        return this.effectId;
    }

    public Long getStyleId() {
        return this.styleId;
    }

    public Integer getIfLocalFeature() {
        return this.ifLocalFeature;
    }

    public Integer getDishesDepart() {
        return this.dishesDepart;
    }

    public Integer getSequence() {
        return this.sequence;
    }

    public Integer getPungencyDegree() {
        return this.pungencyDegree;
    }

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

    public Long getSizeType() {
        return this.sizeType;
    }

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

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

    public Double getLargeWeight() {
        return this.largeWeight;
    }

    public Double getLittleWeight() {
        return this.littleWeight;
    }

    public Double getWeightDeviation() {
        return this.weightDeviation;
    }

    public Integer getPrice() {
        return this.price;
    }

    public Integer getUnitPrice() {
        return this.unitPrice;
    }

    public Integer getLargePrice() {
        return this.largePrice;
    }

    public Integer getLittlePrice() {
        return this.littlePrice;
    }

    public Integer getConvertFlag() {
        return this.convertFlag;
    }

    public Integer getMaterialCost() {
        return this.materialCost;
    }

    public Integer getGrossProfit() {
        return this.grossProfit;
    }

    public BigDecimal getGrossProfitRate() {
        return this.grossProfitRate;
    }

    public String getImageUrl() {
        return FileUrlUtil.getFileUrl(this.imageUrl);
    }

    public String getParticulars() {
        return this.particulars;
    }

    public String getRecommend() {
        return this.recommend;
    }

    public Integer getIndexRecommend() {
        return this.indexRecommend;
    }

    public Integer getLikeSurvey() {
        return this.likeSurvey;
    }

    public Long getLikeBatch() {
        return this.likeBatch;
    }

    public Integer getLikeNum() {
        return this.likeNum;
    }

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

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

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

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

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

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

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

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

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

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

    public Double getIron() {
        return this.iron;
    }

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

    public Double getKalium() {
        return this.kalium;
    }

    public Double getVitaminA() {
        return this.vitaminA;
    }

    public Double getVitaminC() {
        return this.vitaminC;
    }

    public Double getVitaminE() {
        return this.vitaminE;
    }

    public Double getMagnesium() {
        return this.magnesium;
    }

    public Double getZinc() {
        return this.zinc;
    }

    public Double getGlycemicIndex() {
        return this.glycemicIndex;
    }

    public Long getAreaId() {
        return this.areaId;
    }

    public Long getCanteenId() {
        return this.canteenId;
    }

    public Long getShopstallId() {
        return this.shopstallId;
    }

    public Integer getPublicDishes() {
        return this.publicDishes;
    }

    public Integer getHideFlag() {
        return this.hideFlag;
    }

    public Integer getDelFlag() {
        return this.delFlag;
    }

    public Integer getRevision() {
        return this.revision;
    }


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

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

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

    public void setMealType(final Integer mealType) {
        this.mealType = mealType;
    }

    public void setDishesNum(final String dishesNum) {
        this.dishesNum = dishesNum;
    }

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

    public void setInventoryId(final String inventoryId) {
        this.inventoryId = inventoryId;
    }

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

    public void setAliasName(final String aliasName) {
        this.aliasName = aliasName;
    }

    public void setPinyinInitials(final String pinyinInitials) {
        this.pinyinInitials = pinyinInitials;
    }

    public void setPinyinFull(final String pinyinFull) {
        this.pinyinFull = pinyinFull;
    }

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

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

    public void setCookId(final Long cookId) {
        this.cookId = cookId;
    }

    public void setClassifyId(final Long classifyId) {
        this.classifyId = classifyId;
    }

    public void setEffectId(final Long effectId) {
        this.effectId = effectId;
    }

    public void setStyleId(final Long styleId) {
        this.styleId = styleId;
    }

    public void setIfLocalFeature(final Integer ifLocalFeature) {
        this.ifLocalFeature = ifLocalFeature;
    }

    public void setDishesDepart(final Integer dishesDepart) {
        this.dishesDepart = dishesDepart;
    }

    public void setSequence(final Integer sequence) {
        this.sequence = sequence;
    }

    public void setPungencyDegree(final Integer pungencyDegree) {
        this.pungencyDegree = pungencyDegree;
    }

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

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

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

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

    public void setLargeWeight(final Double largeWeight) {
        this.largeWeight = largeWeight;
    }

    public void setLittleWeight(final Double littleWeight) {
        this.littleWeight = littleWeight;
    }

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

    public void setPrice(final Integer price) {
        this.price = price;
    }

    public void setUnitPrice(final Integer unitPrice) {
        this.unitPrice = unitPrice;
    }

    public void setLargePrice(final Integer largePrice) {
        this.largePrice = largePrice;
    }

    public void setLittlePrice(final Integer littlePrice) {
        this.littlePrice = littlePrice;
    }

    public void setConvertFlag(final Integer convertFlag) {
        this.convertFlag = convertFlag;
    }

    public void setMaterialCost(final Integer materialCost) {
        this.materialCost = materialCost;
    }

    public void setGrossProfit(final Integer grossProfit) {
        this.grossProfit = grossProfit;
    }

    public void setGrossProfitRate(final BigDecimal grossProfitRate) {
        this.grossProfitRate = grossProfitRate;
    }

    public void setImageUrl(final String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public void setParticulars(final String particulars) {
        this.particulars = particulars;
    }

    public void setRecommend(final String recommend) {
        this.recommend = recommend;
    }

    public void setIndexRecommend(final Integer indexRecommend) {
        this.indexRecommend = indexRecommend;
    }

    public void setLikeSurvey(final Integer likeSurvey) {
        this.likeSurvey = likeSurvey;
    }

    public void setLikeBatch(final Long likeBatch) {
        this.likeBatch = likeBatch;
    }

    public void setLikeNum(final Integer likeNum) {
        this.likeNum = likeNum;
    }

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

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

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

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

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

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

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

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

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

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

    public void setIron(final Double iron) {
        this.iron = iron;
    }

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

    public void setKalium(final Double kalium) {
        this.kalium = kalium;
    }

    public void setVitaminA(final Double vitaminA) {
        this.vitaminA = vitaminA;
    }

    public void setVitaminC(final Double vitaminC) {
        this.vitaminC = vitaminC;
    }

    public void setVitaminE(final Double vitaminE) {
        this.vitaminE = vitaminE;
    }

    public void setMagnesium(final Double magnesium) {
        this.magnesium = magnesium;
    }

    public void setZinc(final Double zinc) {
        this.zinc = zinc;
    }

    public void setGlycemicIndex(final Double glycemicIndex) {
        this.glycemicIndex = glycemicIndex;
    }

    public void setAreaId(final Long areaId) {
        this.areaId = areaId;
    }

    public void setCanteenId(final Long canteenId) {
        this.canteenId = canteenId;
    }

    public void setShopstallId(final Long shopstallId) {
        this.shopstallId = shopstallId;
    }

    public void setPublicDishes(final Integer publicDishes) {
        this.publicDishes = publicDishes;
    }

    public void setHideFlag(final Integer hideFlag) {
        this.hideFlag = hideFlag;
    }

    public void setDelFlag(final Integer delFlag) {
        this.delFlag = delFlag;
    }

    public void setRevision(final Integer revision) {
        this.revision = revision;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public String getTypeName() {
        return typeName;
    }

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