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

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

import java.util.Map;

/**
 * 关联外围系统枚举
 * @author hongbo.pan
 * @date 2023/1/12
 */
@AllArgsConstructor
@Getter
public enum RelationThirdSystemEnum {

    GPS("1", "gps设备系统"),
    TEMPERATURE("2", "温控系统"),
    CONTAINER("3", "容器管理"),
    ;

    public static final String ENUM_NAME = "RELATION_THIRD_SYSTEM";
    private static Map<String, RelationThirdSystemEnum> enumMap = Maps.newHashMap();
    private String code;
    private String desc;

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

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

}
