package com.jsowell.common.enums.sim;


/**
 * Sim卡状态对应Enum
 * （WuLian）
 *
 * @author JS-ZZA
 * @date 2023/1/5 10:59
 */
public enum SimCardStatusCorrespondEnum {
    // 正常
    NORMAL("9", "0"),

    // 断网
    OFFLINE("5", "1"),

    // 销卡
    PIN_CARD("99", "6"),

    // 服务结束
    SERVICE_FINISHED("20", "1"),

    // 未开卡
    NOT_OPEN_CARD("0", "7"),

    // 沉默期
    SILENCE_PERIOD("2", "8"),

    // 已停机
    SHUT_DOWN_CARD("4", "9"),

    // 待激活
    INACTIVE_CARD("8", "10"),

    // 已回收
    RECYCLE_CARD("21", "11"),

    // 未知
    UN_KNOW("80", "99"),

    ;
    private String WuLianCardStatus;
    private String dataBaseCardStatus;

    public String getWuLianCardStatus() {
        return WuLianCardStatus;
    }

    public void setWuLianCardStatus(String wuLianCardStatus) {
        WuLianCardStatus = wuLianCardStatus;
    }

    public String getDataBaseCardStatus() {
        return dataBaseCardStatus;
    }

    public void setDataBaseCardStatus(String dataBaseCardStatus) {
        this.dataBaseCardStatus = dataBaseCardStatus;
    }

    SimCardStatusCorrespondEnum(String wuLianCardStatus, String dataBaseCardStatus) {
        WuLianCardStatus = wuLianCardStatus;
        this.dataBaseCardStatus = dataBaseCardStatus;
    }

    /**
     * 根据 WuLianCardStatus 获取 dataBaseCardStatus
     * @param WuLianCardStatus
     * @return
     */
    public static String getDataBaseCardStatus(String WuLianCardStatus) {
        for (SimCardStatusCorrespondEnum item : SimCardStatusCorrespondEnum.values()) {
            if (item.getWuLianCardStatus().equals(WuLianCardStatus)) {
                return item.getDataBaseCardStatus();
            }
        }
        return null;
    }
}
