package com.bonus.canteen.core.order.deprecated.dto;

import com.bonus.canteen.core.order.android.dto.OrderCallQueryDTO;
import com.bonus.canteen.core.order.utils.LeNumUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;

@ApiModel("叫号数据分页dto")
public class OrdCallListDto {
   @ApiModelProperty("订单状态")
   private @NotNull(
   message = "订单状态"
) Integer ordState;
   private Integer type;
   @ApiModelProperty("食堂id")
   private Long canteenId;
   private Long shopstallId;
   private Long intervalId;
   private Integer payState;
   private Integer headerSourceType;
   @ApiModelProperty("设备sn码")
   private String machineSn;
   @ApiModelProperty("核身方式")
   private Integer nuClearMode;

   public OrderCallQueryDTO convertToOrderCallQueryDTO() {
      OrderCallQueryDTO orderCallQueryDTO = new OrderCallQueryDTO();
      orderCallQueryDTO.setMachineSn(this.machineSn);
      orderCallQueryDTO.setOrdState(this.ordState);
      if (LeNumUtil.isValidId(this.intervalId)) {
         orderCallQueryDTO.setMealtimeType(this.intervalId.intValue());
      }

      if (LeNumUtil.isValidId(this.shopstallId)) {
         orderCallQueryDTO.setStallId(this.shopstallId);
      }

      return orderCallQueryDTO;
   }

   public Integer getOrdState() {
      return this.ordState;
   }

   public Integer getType() {
      return this.type;
   }

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

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

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

   public Integer getPayState() {
      return this.payState;
   }

   public Integer getHeaderSourceType() {
      return this.headerSourceType;
   }

   public String getMachineSn() {
      return this.machineSn;
   }

   public Integer getNuClearMode() {
      return this.nuClearMode;
   }

   public void setOrdState(final Integer ordState) {
      this.ordState = ordState;
   }

   public void setType(final Integer type) {
      this.type = type;
   }

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

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

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

   public void setPayState(final Integer payState) {
      this.payState = payState;
   }

   public void setHeaderSourceType(final Integer headerSourceType) {
      this.headerSourceType = headerSourceType;
   }

   public void setMachineSn(final String machineSn) {
      this.machineSn = machineSn;
   }

   public void setNuClearMode(final Integer nuClearMode) {
      this.nuClearMode = nuClearMode;
   }

}
