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

    ORDER_DATE("1", "运单下单日期"),
    ESTIMATED_PICKUP_START_TIME("2", "提货日期"),
    ESTIMATED_DELIVERY_START_TIME("3", "送达日期"),
    ;

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

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

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

}
