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

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@ApiModel("设备订单支付总DTO")
public class OrderPayAndroidTotalDTO extends OrderAndroidPayParam {
   @ApiModelProperty(
      value = "设备订单号",
      required = true
   )
   private @NotNull(
   message = "{order.param-illegal}"
) String macOrderId;
   @ApiModelProperty("订单类型")
   private @NotNull(
   message = "{order.param-illegal}"
) Integer orderType;
   @ApiModelProperty("消费模式")
   private Integer consumMode;
   @ApiModelProperty("订单列表")
   private @NotNull(
   message = "订单列表不能为空"
) @Size(
   min = 1,
   max = 20,
   message = "最少1笔最多20笔订单"
) List<@Valid OrderPayAndroidDTO> orderList;

   public String[] printProps() {
      return new String[]{"macOrderId", "orderType"};
   }

   public String getMacOrderId() {
      return this.macOrderId;
   }

   public Integer getOrderType() {
      return this.orderType;
   }

   public Integer getConsumMode() {
      return this.consumMode;
   }

   public List<@Valid OrderPayAndroidDTO> getOrderList() {
      return this.orderList;
   }

   public void setMacOrderId(final String macOrderId) {
      this.macOrderId = macOrderId;
   }

   public void setOrderType(final Integer orderType) {
      this.orderType = orderType;
   }

   public void setConsumMode(final Integer consumMode) {
      this.consumMode = consumMode;
   }

   public void setOrderList(final List<@Valid OrderPayAndroidDTO> orderList) {
      this.orderList = orderList;
   }

}
