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

import cn.hutool.core.collection.CollUtil;
import com.bonus.canteen.core.common.enums.AllocMealtimeTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.List;

@ApiModel("设备获取菜谱信息(电子菜排)")
public class MenuEleDishRowRecipeVO implements Serializable {
   @ApiModelProperty("菜谱日期")
   private LocalDate applyDate;
   @ApiModelProperty("餐次id")
   private Long intervalId;
   @ApiModelProperty("餐次名称")
   private String intervalName;
   @ApiModelProperty("开始时间")
   private LocalTime startTime;
   @ApiModelProperty("结束时间")
   private LocalTime endTime;
   @ApiModelProperty("食堂id")
   private Long canteenId;
   @ApiModelProperty("食堂名称")
   private String canteenName;
   @ApiModelProperty("档口或店铺id")
   private Long shopstallId;
   @ApiModelProperty("档口或店铺名称")
   private String shopstallName;
   @ApiModelProperty("餐品数量")
   private Integer detailTotal;
   @ApiModelProperty("菜品列表")
   private List<MenuEleDishRowRecipeDetailVO> detailList;

   public Integer getDetailTotal() {
      return CollUtil.isEmpty(this.detailList) ? 0 : this.detailList.size();
   }

   public String getIntervalName() {
      return AllocMealtimeTypeEnum.getDescByKey(this.intervalId.intValue());
   }

   public LocalDate getApplyDate() {
      return this.applyDate;
   }

   public Long getIntervalId() {
      return this.intervalId;
   }

   public LocalTime getStartTime() {
      return this.startTime;
   }

   public LocalTime getEndTime() {
      return this.endTime;
   }

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

   public String getCanteenName() {
      return this.canteenName;
   }

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

   public String getShopstallName() {
      return this.shopstallName;
   }

   public List<MenuEleDishRowRecipeDetailVO> getDetailList() {
      return this.detailList;
   }

   public void setApplyDate(final LocalDate applyDate) {
      this.applyDate = applyDate;
   }

   public void setIntervalId(final Long intervalId) {
      this.intervalId = intervalId;
   }

   public void setIntervalName(final String intervalName) {
      this.intervalName = intervalName;
   }

   public void setStartTime(final LocalTime startTime) {
      this.startTime = startTime;
   }

   public void setEndTime(final LocalTime endTime) {
      this.endTime = endTime;
   }

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

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

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

   public void setShopstallName(final String shopstallName) {
      this.shopstallName = shopstallName;
   }

   public void setDetailTotal(final Integer detailTotal) {
      this.detailTotal = detailTotal;
   }

   public void setDetailList(final List<MenuEleDishRowRecipeDetailVO> detailList) {
      this.detailList = detailList;
   }

}
