package com.bonus.canteen.core.account.v4.app.vo;

import com.bonus.canteen.core.account.v3.api.vo.AccInfoDetailVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
@Data
public class AppWalletBalanceVO {
   @ApiModelProperty("个人钱包余额/分")
   private BigDecimal walletBal;
   @ApiModelProperty("补贴钱包余额/分")
   private BigDecimal subsidyBal;
   @ApiModelProperty("红包余额")
   private BigDecimal redEnvelope;
   @ApiModelProperty("个人钱包冻结金额")
   private BigDecimal walletFreezeBal;
   @ApiModelProperty("补贴钱包冻结金额")
   private BigDecimal subFreezeBal;
   @ApiModelProperty("冻结金额")
   private BigDecimal accFreezeBalTotal;
   @ApiModelProperty("账户总余额(包含冻结金额)")
   private BigDecimal accAllBal;
   @ApiModelProperty("账户可用余额总余额(不包括冻结金额)")
   private BigDecimal accBalTotal;
   @ApiModelProperty("账户状态 1正常  2冻结  3销户 4过期")
   private Integer accStatus;


   public static AppWalletBalanceVO of(AccInfoDetailVO accInfoDetailVO) {
      AppWalletBalanceVO walletBalanceVO = new AppWalletBalanceVO();
      walletBalanceVO.setAccBalTotal(accInfoDetailVO.getAccBalTotal());
      walletBalanceVO.setAccAllBal(accInfoDetailVO.getAccAllBal());
      walletBalanceVO.setWalletBal(accInfoDetailVO.getWalletBal());
      walletBalanceVO.setSubsidyBal(accInfoDetailVO.getSubsidyBal());
      walletBalanceVO.setRedEnvelope(accInfoDetailVO.getRedEnvelope());
      walletBalanceVO.setWalletFreezeBal(accInfoDetailVO.getWalletFreezeBal());
      walletBalanceVO.setSubFreezeBal(accInfoDetailVO.getSubFreezeBal());
      walletBalanceVO.setAccFreezeBalTotal(accInfoDetailVO.getAccFreezeBalTotal());
      walletBalanceVO.setAccStatus(accInfoDetailVO.getAccStatus());
      return walletBalanceVO;
   }
}
