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

import cn.hutool.core.collection.CollUtil;
import com.bonus.canteen.core.common.utils.SysUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalTime;
import java.util.List;

@ApiModel("获取预定餐食堂列表(食堂嵌套档口版)")
public class AppletReserveCanteenVO {
   @ApiModelProperty("食堂id")
   private Long canteenId;
   @ApiModelProperty("食堂名称")
   private String canteenName;
   @ApiModelProperty("食堂营业状态")
   private Integer canteenState;
   @ApiModelProperty("食堂图片")
   private String canteenImgUrl;
   @ApiModelProperty("月销量")
   private Integer monthlySales;
   @ApiModelProperty("营业开始时间")
   private LocalTime startBusinessTime;
   @ApiModelProperty("营业结束时间")
   private LocalTime endBusinessTime;
   @ApiModelProperty("食堂营业状态")
   private Integer businessState;
   @ApiModelProperty("档口菜谱")
   private List<AppletReserveStallVO> stallList;

   public String getCanteenImgUrl() {
      return SysUtil.getCutFileUrl(this.canteenImgUrl);
   }

   public Integer getMonthlySales() {
      return CollUtil.isNotEmpty(this.stallList) ? this.stallList.stream().mapToInt(AppletReserveStallVO::getMonthlySales).sum() : 0;
   }

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

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

   public Integer getCanteenState() {
      return this.canteenState;
   }

   public LocalTime getStartBusinessTime() {
      return this.startBusinessTime;
   }

   public LocalTime getEndBusinessTime() {
      return this.endBusinessTime;
   }

   public Integer getBusinessState() {
      return this.businessState;
   }

   public List<AppletReserveStallVO> getStallList() {
      return this.stallList;
   }

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

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

   public void setCanteenState(final Integer canteenState) {
      this.canteenState = canteenState;
   }

   public void setCanteenImgUrl(final String canteenImgUrl) {
      this.canteenImgUrl = canteenImgUrl;
   }

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

   public void setStartBusinessTime(final LocalTime startBusinessTime) {
      this.startBusinessTime = startBusinessTime;
   }

   public void setEndBusinessTime(final LocalTime endBusinessTime) {
      this.endBusinessTime = endBusinessTime;
   }

   public void setBusinessState(final Integer businessState) {
      this.businessState = businessState;
   }

   public void setStallList(final List<AppletReserveStallVO> stallList) {
      this.stallList = stallList;
   }
}
