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 IntelligentDispatchLoadingStatusEnum {

    PENDING(1, "待调度"),
    DISPATCH(2, "已调度"),
    ;

    public static final String NAME = "INTELLIGENT_DISPATCH_LOADING_STATUS";
    private static Map<Integer, IntelligentDispatchLoadingStatusEnum> enumMap = Maps.newHashMap();
    private Integer code;
    private String desc;

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

    public static IntelligentDispatchLoadingStatusEnum getByCode(Integer code) {
        return  enumMap.get(code);
    }

}
