
package com.tmerclub.cloud.supplier.constant;

/**
 * 供应商钱包金额类型
 * 金额类型 0 未结算金额 1可提现金额  2冻结金额
 *
 * @author tmerclub
 */
public enum SupplierWalletAmountType {

    /**
     * 未结算金额
     */
    UNSETTLED_AMOUNT(0, "未结算金额"),

    /**
     * 可提现金额
     */
    SETTLED_AMOUNT(1, "可提现金额"),

    /**
     * 冻结金额
     */
    FREEZE_AMOUNT(2, "冻结金额"),

    ;

    private final Integer num;

    private final String supplierWalletAmountType;

    public Integer value() {
        return num;
    }

    public String getSupplierWalletAmountType() {
        return supplierWalletAmountType;
    }

    SupplierWalletAmountType(Integer num, String supplierWalletAmountType) {
        this.num = num;
        this.supplierWalletAmountType = supplierWalletAmountType;
    }

    public static SupplierWalletAmountType instance(Integer value) {
        SupplierWalletAmountType[] enums = values();
        for (SupplierWalletAmountType statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }

    public static String getAmountTypeName(Integer value) {
        SupplierWalletAmountType[] enums = values();
        for (SupplierWalletAmountType statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum.supplierWalletAmountType;
            }
        }
        return null;
    }
}
