package com.bonus.canteen.core.pay.common.vo;

import com.bonus.canteen.core.order.utils.LeNumUtil;
import com.bonus.common.houqin.framework.config.deserializer.DateTimeDeserializer;
import com.bonus.common.houqin.framework.config.serializer.DateTimeSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.math.BigDecimal;
import java.time.LocalDateTime;

public class MobileNotifyVO {
   /** @deprecated */
   @Deprecated
   private Long tradeId;
   private Long tradeChannelId;
   private String outTradeNo;
   private Integer payState;
   private String tradeResult;
   private BigDecimal payAmount;
   private Long merchantId;
   @JsonSerialize(
      using = DateTimeSerializer.YYYY_MM_DD_HH_MM_SS.class
   )
   @JsonDeserialize(
      using = DateTimeDeserializer.class
   )
   private LocalDateTime payTime;
   /** @deprecated */
   @Deprecated
   private Integer payChannel;
   /** @deprecated */
   @Deprecated
   private Integer tradeType;
   /** @deprecated */
   @Deprecated
   private Integer tradeState;

   public Long getTradeChannelId() {
      return LeNumUtil.isValidId(this.tradeChannelId) ? this.tradeChannelId : this.tradeId;
   }

   /** @deprecated */
   @Deprecated
   public Long getTradeId() {
      return this.tradeId;
   }

   public String getOutTradeNo() {
      return this.outTradeNo;
   }

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

   public String getTradeResult() {
      return this.tradeResult;
   }

   public BigDecimal getPayAmount() {
      return this.payAmount;
   }

   public Long getMerchantId() {
      return this.merchantId;
   }

   public LocalDateTime getPayTime() {
      return this.payTime;
   }

   /** @deprecated */
   @Deprecated
   public Integer getPayChannel() {
      return this.payChannel;
   }

   /** @deprecated */
   @Deprecated
   public Integer getTradeType() {
      return this.tradeType;
   }

   /** @deprecated */
   @Deprecated
   public Integer getTradeState() {
      return this.tradeState;
   }

   /** @deprecated */
   @Deprecated
   public void setTradeId(final Long tradeId) {
      this.tradeId = tradeId;
   }

   public void setTradeChannelId(final Long tradeChannelId) {
      this.tradeChannelId = tradeChannelId;
   }

   public void setOutTradeNo(final String outTradeNo) {
      this.outTradeNo = outTradeNo;
   }

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

   public void setTradeResult(final String tradeResult) {
      this.tradeResult = tradeResult;
   }

   public void setPayAmount(final BigDecimal payAmount) {
      this.payAmount = payAmount;
   }

   public void setMerchantId(final Long merchantId) {
      this.merchantId = merchantId;
   }

   @JsonDeserialize(
      using = DateTimeDeserializer.class
   )
   public void setPayTime(final LocalDateTime payTime) {
      this.payTime = payTime;
   }

   /** @deprecated */
   @Deprecated
   public void setPayChannel(final Integer payChannel) {
      this.payChannel = payChannel;
   }

   /** @deprecated */
   @Deprecated
   public void setTradeType(final Integer tradeType) {
      this.tradeType = tradeType;
   }

   /** @deprecated */
   @Deprecated
   public void setTradeState(final Integer tradeState) {
      this.tradeState = tradeState;
   }
}
