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

import com.bonus.common.houqin.constant.LeConstants;
import com.fasterxml.jackson.databind.JsonNode;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

public class OrderAndroidPayParam {
   @ApiModelProperty("是否为订单试算")
   private Integer ifTrial;
   @ApiModelProperty("总订单金额 单位分")
   private @NotNull(
   message = "{order.param-illegal}"
) @DecimalMin(
   value = "0",
   message = "{order.param-illegal}"
) BigDecimal amount;
   @ApiModelProperty("支付方式 支付宝、微信等")
   private Integer payType;
   @ApiModelProperty("在线状态 1在线 2离线")
   private Integer ifOnline;
   @ApiModelProperty("人员id")
   private Long custId;
   @ApiModelProperty("卡序列号（物理卡号）")
   private String serialNum;
   @ApiModelProperty("openid")
   private String openid;
   @ApiModelProperty("支付二维码")
   private String qrCode;
   @ApiModelProperty("核身方式")
   private Integer nuClearMode;
   @ApiModelProperty("加密参数")
   private String terminalParams;
   private Integer alipayFaceAsync;
   @ApiModelProperty("餐券编号")
   private String couponNum;
   @ApiModelProperty("点餐员id")
   private Long operatorId;
   @ApiModelProperty("点餐员姓名")
   private String operatorName;
   @ApiModelProperty("扩展字段")
   private JsonNode extParam;

   public boolean ifOnline() {
      return LeConstants.COMMON_YES.equals(this.ifOnline);
   }

   public boolean ifTrial() {
      return LeConstants.COMMON_YES.equals(this.ifTrial);
   }

   public OrderAndroidPayParam() {
      this.ifTrial = LeConstants.COMMON_NO;
      this.ifOnline = LeConstants.COMMON_YES;
   }

   public Integer getIfTrial() {
      return this.ifTrial;
   }

   public BigDecimal getAmount() {
      return this.amount;
   }

   public Integer getPayType() {
      return this.payType;
   }

   public Integer getIfOnline() {
      return this.ifOnline;
   }

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

   public String getSerialNum() {
      return this.serialNum;
   }

   public String getOpenid() {
      return this.openid;
   }

   public String getQrCode() {
      return this.qrCode;
   }

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

   public String getTerminalParams() {
      return this.terminalParams;
   }

   public Integer getAlipayFaceAsync() {
      return this.alipayFaceAsync;
   }

   public String getCouponNum() {
      return this.couponNum;
   }

   public Long getOperatorId() {
      return this.operatorId;
   }

   public String getOperatorName() {
      return this.operatorName;
   }

   public JsonNode getExtParam() {
      return this.extParam;
   }

   public void setIfTrial(final Integer ifTrial) {
      this.ifTrial = ifTrial;
   }

   public void setAmount(final BigDecimal amount) {
      this.amount = amount;
   }

   public void setPayType(final Integer payType) {
      this.payType = payType;
   }

   public void setIfOnline(final Integer ifOnline) {
      this.ifOnline = ifOnline;
   }

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

   public void setSerialNum(final String serialNum) {
      this.serialNum = serialNum;
   }

   public void setOpenid(final String openid) {
      this.openid = openid;
   }

   public void setQrCode(final String qrCode) {
      this.qrCode = qrCode;
   }

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

   public void setTerminalParams(final String terminalParams) {
      this.terminalParams = terminalParams;
   }

   public void setAlipayFaceAsync(final Integer alipayFaceAsync) {
      this.alipayFaceAsync = alipayFaceAsync;
   }

   public void setCouponNum(final String couponNum) {
      this.couponNum = couponNum;
   }

   public void setOperatorId(final Long operatorId) {
      this.operatorId = operatorId;
   }

   public void setOperatorName(final String operatorName) {
      this.operatorName = operatorName;
   }

   public void setExtParam(final JsonNode extParam) {
      this.extParam = extParam;
   }

}
