package com.prolog.rdc.tms.g7.enums;

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

import java.util.Map;

/**
 * G7接口类型枚举
 * @date 2023/03/21
 */
@AllArgsConstructor
@Getter
public enum URIEnum {

    CURRENT_LOCATION("CL", "车辆当前定位"),
    CURRENT_TEMPERATURE("CT", "车辆当前温度"),
    ;

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

    static {
        for(URIEnum as : URIEnum.values()) {
            enumMap.put(as.code, as);
        }
    }
    public static URIEnum getByCode(String code) {
        return  enumMap.get(code);
    }

}
