package cn.quant.baa.pay.dict;

import java.math.BigDecimal;

/**
 * Created by Administrator on 2021/8/27 0027.
 */
public enum  CreditDebitFlag {
    N("非金融交易", BigDecimal.ZERO),
    C("贷记", BigDecimal.ONE),
    D("借记", BigDecimal.ONE.negate());

    public final String text;
    public final BigDecimal sign;
    public final boolean positive;

    CreditDebitFlag(String txt, BigDecimal sign) {
        this.sign = sign;
        this.text = txt;
        this.positive = (sign.compareTo(BigDecimal.ZERO) >= 0);
    }
}
