package bus.model.enums;

public enum StationTypeEnum {

    /**
     * 状态
     */
    N1("1", "商圈"),
    N2("2", "公园"),
    N3("3", "学校"),
    N4("4", "社区"),
    N5("5", "枢纽"),
    N6("6", "市场"),
    N7("7", "酒店"),
    N8("8", "医院"),
    N9("9", "加油站"),
    N10("10", "车站"),
    N11("101", "其他");
    private final String code;
    private final String name;


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

    public static String getInfoByCode(String value) {
        for (StationTypeEnum a : StationTypeEnum.values()) {
            if (a.code.equals(value)) {
                return a.name;
            }
        }
        return "";
    }

    public String getCode() {
        return code;
    }
    public String getName() {
        return name;
    }
}
