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

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

import java.util.Map;

/**
 * 部门基础关联表类型枚举
 * @author hongbo.pan
 * @date 2022/10/8
 */
@AllArgsConstructor
@Getter
public enum DepartmentBaseLinkBaseTypeEnum {

    DEVICE("DEVICE", "设备管理"),

    CONTAINER("CONTAINER", "容器管理"),

    ;

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

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

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

}
