package com.jsowell.common.enums.ykc;

/**
 * 卡状态枚举
 *
 * @author JS-ZZA
 * @date 2023/4/6 9:17
 */
public enum CardStatusEnum {

    WAIT_ACTIVATION("0", "待激活"),
    NORMAL("1", "正常使用"),
    START_LOCK("2", "启动锁定"),
    STOP_USE("9", "停用"),
    ;


    private String code;
    private String value;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    CardStatusEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getCardStatus(String code) {
        for (CardStatusEnum cardStatusEnum : CardStatusEnum.values()) {
            if (cardStatusEnum.getCode().equals(code)) {
                return cardStatusEnum.getValue();
            }
        }
        return "";
    }
}
