
package com.tmerclub.cloud.multishop.constant;

/**
 * 店铺钱包金额类型
 * 金额类型 0 未结算金额 1可提现金额  2冻结金额
 *
 * @author tmerclub
 */
public enum ShopWalletAmountType {

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

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

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

    ;

    private final Integer num;

    private final String shopWalletAmountType;

    public Integer value() {
        return num;
    }

    public String getShopWalletAmountType() {
        return shopWalletAmountType;
    }

    ShopWalletAmountType(Integer num, String shopWalletAmountType) {
        this.num = num;
        this.shopWalletAmountType = shopWalletAmountType;
    }

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

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