package com.hzs.common.core.enums;

import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 钱包冻结状态
 *
 * @author: hzs
 */
@AllArgsConstructor
@Getter
public enum EWalletFreezeState {

    /**
     * 禁止消费
     */
    PROHIBIT_CONSUME(1, 1, "禁止消费", "lockConsume", EnumsPrefixConstants.WALLET_FREEZE_STATE + 1),
    /**
     * 禁止转账
     */
    PROHIBIT_TRANSFER(2, 1, "禁止转账", "lockTransfer", EnumsPrefixConstants.WALLET_FREEZE_STATE + 2),
    /**
     * 禁止提现
     */
    PROHIBIT_WITHDRAW(3, 1, "禁止提现", "lockWithdraw", EnumsPrefixConstants.WALLET_FREEZE_STATE + 3),

    ;

    /**
     * 实际值
     */
    private final int value;
    /**
     * 是否
     */
    private final int isYesNo;
    /**
     * 显示标签
     */
    private final String label;

    private final String field;
    /**
     * 国际化翻译key值
     */
    private final String key;


    /**
     * 根据枚举值获取枚举
     *
     * @param value 枚举值
     * @return
     */
    public static EWalletFreezeState getEnumByValue(int value) {
        for (EWalletFreezeState eApproveStatus : EWalletFreezeState.values()) {
            if (eApproveStatus.getValue() == value) {
                return eApproveStatus;
            }
        }
        return null;
    }


}
