package com.bonus.core.account.v3.web.vo;

import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;

import java.math.BigDecimal;

public class AccOrdBasicsVO {
   private BigDecimal accBal;
   private BigDecimal walletPay;
   private BigDecimal subsidyPay;
   private BigDecimal redEnvelopePay;
   private BigDecimal walletBal;
   private BigDecimal subBal;
   private BigDecimal redBal;
   private Long accTradeId;
   private Integer code;
   private BigDecimal unpaidBalance;
   private String msg;

   public BigDecimal getAccBal() {
      return NumberUtil.add(new BigDecimal[]{this.walletBal, this.subBal, this.redBal});
   }

   public BigDecimal getWalletPay() {
      return ObjectUtil.isNull(this.walletPay) ? BigDecimal.ZERO : this.walletPay;
   }

   public BigDecimal getSubsidyPay() {
      return ObjectUtil.isNull(this.subsidyPay) ? BigDecimal.ZERO : this.subsidyPay;
   }

   public BigDecimal getRedEnvelopePay() {
      return ObjectUtil.isNull(this.redEnvelopePay) ? BigDecimal.ZERO : this.redEnvelopePay;
   }

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

   public BigDecimal getSubBal() {
      return this.subBal;
   }

   public BigDecimal getRedBal() {
      return this.redBal;
   }

   public Long getAccTradeId() {
      return this.accTradeId;
   }

   public Integer getCode() {
      return this.code;
   }

   public BigDecimal getUnpaidBalance() {
      return this.unpaidBalance;
   }

   public String getMsg() {
      return this.msg;
   }

   public void setAccBal(final BigDecimal accBal) {
      this.accBal = accBal;
   }

   public void setWalletPay(final BigDecimal walletPay) {
      this.walletPay = walletPay;
   }

   public void setSubsidyPay(final BigDecimal subsidyPay) {
      this.subsidyPay = subsidyPay;
   }

   public void setRedEnvelopePay(final BigDecimal redEnvelopePay) {
      this.redEnvelopePay = redEnvelopePay;
   }

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

   public void setSubBal(final BigDecimal subBal) {
      this.subBal = subBal;
   }

   public void setRedBal(final BigDecimal redBal) {
      this.redBal = redBal;
   }

   public void setAccTradeId(final Long accTradeId) {
      this.accTradeId = accTradeId;
   }

   public void setCode(final Integer code) {
      this.code = code;
   }

   public void setUnpaidBalance(final BigDecimal unpaidBalance) {
      this.unpaidBalance = unpaidBalance;
   }

   public void setMsg(final String msg) {
      this.msg = msg;
   }

}
