package com.jsowell.common.enums.sim;


/**
 * Sim卡商
 *
 * @author JS-ZZA
 * @date 2022/12/17 14:30
 */
public enum SimSupplierEnum {
    XUN_ZHONG("1", "讯众物联"),
    WU_LIAN_INTERNET("2", "物联网智能云平台")


    ;
    private String code;
    private String name;

    public String getCode() {
        return code;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    SimSupplierEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    /**
     * 根据code获取name
     * @param code
     * @return
     */
    public static String getNameByCode(String code) {
        for (SimSupplierEnum item : SimSupplierEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getName();
            }
        }
        return null;
    }
}
