package com.bonus.canteen.core.account.v3.mq.send.model;

import cn.hutool.core.util.ObjectUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

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

@ApiModel("账户支付钱包使用情况")
public class RepAccMqDetailModel implements Serializable {
   private static final long serialVersionUID = 1L;
   @ApiModelProperty("交易时间")
   private LocalDateTime tradeTime;
   @ApiModelProperty("变动流水号")
   private Long flowId;
   @ApiModelProperty("钱包类型Id")
   private Long walletId;
   @ApiModelProperty("支付金额")
   private BigDecimal amount;
   @ApiModelProperty("对应钱包余额")
   private BigDecimal walletBal;
   @ApiModelProperty("交易类型")
   private Integer flowType;
   @ApiModelProperty("对应钱包(冻结、解冻)后剩余冻结余额")
   private BigDecimal frozenBalance;

   public BigDecimal getFrozenBalance() {
      return ObjectUtil.isNull(this.frozenBalance) ? BigDecimal.ZERO : this.frozenBalance;
   }

   public LocalDateTime getTradeTime() {
      return this.tradeTime;
   }

   public Long getFlowId() {
      return this.flowId;
   }

   public Long getWalletId() {
      return this.walletId;
   }

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

   public BigDecimal getWalletBal() {
      return this.walletBal;
   }

   public Integer getFlowType() {
      return this.flowType;
   }

   public RepAccMqDetailModel setTradeTime(final LocalDateTime tradeTime) {
      this.tradeTime = tradeTime;
      return this;
   }

   public RepAccMqDetailModel setFlowId(final Long flowId) {
      this.flowId = flowId;
      return this;
   }

   public RepAccMqDetailModel setWalletId(final Long walletId) {
      this.walletId = walletId;
      return this;
   }

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

   public RepAccMqDetailModel setWalletBal(final BigDecimal walletBal) {
      this.walletBal = walletBal;
      return this;
   }

   public RepAccMqDetailModel setFlowType(final Integer flowType) {
      this.flowType = flowType;
      return this;
   }

   public RepAccMqDetailModel setFrozenBalance(final BigDecimal frozenBalance) {
      this.frozenBalance = frozenBalance;
      return this;
   }
}
