package com.bizzan.bitrade.vo;

import java.math.BigDecimal;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@ApiModel("资产账户对象")
@Data
public class SpotWalletVo {

	@ApiModelProperty("可用资产")
	private BigDecimal balance;
	@ApiModelProperty("冻结资产")
	private BigDecimal frozenBalance;

	public BigDecimal getTotalBalance() {
		BigDecimal total = BigDecimal.ZERO;
		if (balance != null) {
			total = total.add(balance);
		}
		if (frozenBalance != null) {
			total = total.add(frozenBalance);
		}
		return total;
	}
}
