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

import com.bonus.canteen.core.allocation.canteen.model.AllocCanteenModifyModel;
import com.bonus.canteen.core.common.utils.SysUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalTime;

@ApiModel("食堂基础配置修改DTO")
public class AllocCanteenModifyDTO {
   @ApiModelProperty("食堂编号")
   private String canteenNum;
   @ApiModelProperty(
      value = "食堂名称",
      required = true
   )
   private String canteenName;
   @ApiModelProperty("区域id")
   private Long areaId;
   @ApiModelProperty("第三方食堂id")
   private String thirdCanteenId;
   @ApiModelProperty("授权人员")
   private Long effId;
   @ApiModelProperty("人员id")
   private Long custId;
   @ApiModelProperty(
      value = "联系电话",
      required = true
   )
   private String contactTel;
   @ApiModelProperty("主营项目")
   private String mainProject;
   @ApiModelProperty("营业时间")
   private LocalTime startBusinessTime;
   private LocalTime endBusinessTime;
   @ApiModelProperty("食堂图片链接")
   private String imgUrl;
   @ApiModelProperty("最大容纳人数")
   private Integer capacity;
   @ApiModelProperty("是否启用支付配置")
   private Integer ifEnablePay;
   @ApiModelProperty("支付方式(多个数据之间使用,分隔)")
   private String payTypes;
   @ApiModelProperty("是否启用配送配置")
   private Integer ifEnableDelivery;
   @ApiModelProperty("配送方式(多个数据之间 使用,分隔)")
   private String deliveries;
   @ApiModelProperty("是否启用点餐配置")
   private Integer ifEnableOrder;
   @ApiModelProperty("是否支持报餐")
   private Integer ifBook;
   @ApiModelProperty("是否支持预定餐")
   private Integer ifReserve;
   @ApiModelProperty("是否启用收款码")
   private Integer ifEnablePayCode;
   @ApiModelProperty("食堂收款码链接")
   private String payCodeUrl;
   @ApiModelProperty("食堂id")
   private Long canteenId;
   @ApiModelProperty("原区域id")
   private Long oldAreaId;

   public void ifEnableHandler(AllocCanteenModifyModel canteenModel) {
      this.ifEnablePay = canteenModel.getPayDTO().getIfEnablePay();
      this.payTypes = canteenModel.getPayDTO().getPayTypes();
      this.ifEnableDelivery = canteenModel.getDeliveryModel().getIfEnableDelivery();
      this.deliveries = canteenModel.getDeliveryModel().getDeliveries();
      this.ifEnableOrder = canteenModel.getOrderDTO().getIfEnableOrder();
   }

   public String getImgUrl() {
      return SysUtil.getCutPath(this.imgUrl);
   }

   public String getPayCodeUrl() {
      return SysUtil.getCutPath(this.payCodeUrl);
   }

   public String getCanteenNum() {
      return this.canteenNum;
   }

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

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

   public String getThirdCanteenId() {
      return this.thirdCanteenId;
   }

   public Long getEffId() {
      return this.effId;
   }

   public Long getCustId() {
      return this.custId;
   }

   public String getContactTel() {
      return this.contactTel;
   }

   public String getMainProject() {
      return this.mainProject;
   }

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

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

   public Integer getCapacity() {
      return this.capacity;
   }

   public Integer getIfEnablePay() {
      return this.ifEnablePay;
   }

   public String getPayTypes() {
      return this.payTypes;
   }

   public Integer getIfEnableDelivery() {
      return this.ifEnableDelivery;
   }

   public String getDeliveries() {
      return this.deliveries;
   }

   public Integer getIfEnableOrder() {
      return this.ifEnableOrder;
   }

   public Integer getIfBook() {
      return this.ifBook;
   }

   public Integer getIfReserve() {
      return this.ifReserve;
   }

   public Integer getIfEnablePayCode() {
      return this.ifEnablePayCode;
   }

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

   public Long getOldAreaId() {
      return this.oldAreaId;
   }

   public void setCanteenNum(final String canteenNum) {
      this.canteenNum = canteenNum;
   }

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

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

   public void setThirdCanteenId(final String thirdCanteenId) {
      this.thirdCanteenId = thirdCanteenId;
   }

   public void setEffId(final Long effId) {
      this.effId = effId;
   }

   public void setCustId(final Long custId) {
      this.custId = custId;
   }

   public void setContactTel(final String contactTel) {
      this.contactTel = contactTel;
   }

   public void setMainProject(final String mainProject) {
      this.mainProject = mainProject;
   }

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

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

   public void setImgUrl(final String imgUrl) {
      this.imgUrl = imgUrl;
   }

   public void setCapacity(final Integer capacity) {
      this.capacity = capacity;
   }

   public void setIfEnablePay(final Integer ifEnablePay) {
      this.ifEnablePay = ifEnablePay;
   }

   public void setPayTypes(final String payTypes) {
      this.payTypes = payTypes;
   }

   public void setIfEnableDelivery(final Integer ifEnableDelivery) {
      this.ifEnableDelivery = ifEnableDelivery;
   }

   public void setDeliveries(final String deliveries) {
      this.deliveries = deliveries;
   }

   public void setIfEnableOrder(final Integer ifEnableOrder) {
      this.ifEnableOrder = ifEnableOrder;
   }

   public void setIfBook(final Integer ifBook) {
      this.ifBook = ifBook;
   }

   public void setIfReserve(final Integer ifReserve) {
      this.ifReserve = ifReserve;
   }

   public void setIfEnablePayCode(final Integer ifEnablePayCode) {
      this.ifEnablePayCode = ifEnablePayCode;
   }

   public void setPayCodeUrl(final String payCodeUrl) {
      this.payCodeUrl = payCodeUrl;
   }

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

   public void setOldAreaId(final Long oldAreaId) {
      this.oldAreaId = oldAreaId;
   }

}
