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

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

import java.util.Map;

/**
 * 待送达处理方式
 * @author hongbo.pan
 * @date 2022/12/1
 */
@AllArgsConstructor
@Getter
public enum DeliveryHandleTypeEnum {

    SHOW("1", "输入签收件数"),
    HIDE("2", "隐藏签收件数"),
    ;

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

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

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

}
