package com.prolog.rdc.tms.constant.enums.intelligent;

import com.google.common.collect.Maps;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Map;

/**
 * 智能调度查询模式枚举
 * @author hongbo.pan
 * @date 2023/8/23
 */
@AllArgsConstructor
@Getter
public enum IntelligentQueryModeEnum {

    MAP("1", "地图"),
    LIST("2", "列表"),
    ;

    private static Map<String, IntelligentQueryModeEnum> enumMap = Maps.newHashMap();
    private String code;
    private String desc;

    static {
        for(IntelligentQueryModeEnum as : IntelligentQueryModeEnum.values()) {
            enumMap.put(as.code, as);
        }
    }

    public static IntelligentQueryModeEnum getByCode(String code) {
        return  enumMap.get(code);
    }

}
