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

import cn.hutool.core.text.CharSequenceUtil;
import com.bonus.canteen.core.common.page.PageDTO;
import io.swagger.annotations.ApiModelProperty;

import java.util.Collections;
import java.util.List;

public class MenuDishesV2PageDTO extends PageDTO {
   @ApiModelProperty("菜品名称")
   private String dishesName;
   @ApiModelProperty("区域id")
   private List<Long> areaIds;
   @ApiModelProperty("食堂id")
   private List<Long> canteenIds;
   @ApiModelProperty("档口id")
   private List<Long> stallIds;
   private Long canteenId;
   @ApiModelProperty("计价方式(1按份,2称重)")
   private Integer salesMode;
   @ApiModelProperty("原料id")
   private Long materialId;
   @ApiModelProperty("菜品类型列表")
   private List<Long> typeIdList;

   public String getDishesName() {
      return CharSequenceUtil.isBlank(this.dishesName) ? this.dishesName : "%" + this.dishesName + "%";
   }

   public List<Long> getCanteenIds() {
      return this.canteenId != null ? Collections.singletonList(this.canteenId) : this.canteenIds;
   }

   public List<Long> getAreaIds() {
      return this.areaIds;
   }

   public List<Long> getStallIds() {
      return this.stallIds;
   }

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

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

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

   public List<Long> getTypeIdList() {
      return this.typeIdList;
   }

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

   public void setAreaIds(final List<Long> areaIds) {
      this.areaIds = areaIds;
   }

   public void setCanteenIds(final List<Long> canteenIds) {
      this.canteenIds = canteenIds;
   }

   public void setStallIds(final List<Long> stallIds) {
      this.stallIds = stallIds;
   }

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

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

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

   public void setTypeIdList(final List<Long> typeIdList) {
      this.typeIdList = typeIdList;
   }
}
