package com.fjhx.sale.entity.contract.enums;

import org.apache.commons.collections4.MapUtils;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 销售跟单状态枚举
 */
public enum DocumentaryTypeEnum {
    TYPE_1("1", "签样"),
    TYPE_2("2", "LOGO"),
    TYPE_3("3", "包材稿件"),
    TYPE_4("4", "箱唛"),
    TYPE_5("5", "标签"),
    TYPE_6("6", "验货"),
    TYPE_7("7", "出货通知"),
    TYPE_8("8", "大货样"),
    TYPE_9("9", "订舱"),
    TYPE_10("10", "发货日期"),
    TYPE_11("11", "ETD"),
    TYPE_12("12", "ETA"),
    ;
    private String key;

    private String value;

    private static Map<String, String> map = new LinkedHashMap<>();

    DocumentaryTypeEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    /**
     * 获取枚举map
     *
     * @return
     */
    public static Map<String, String> getMap() {
        if (MapUtils.isNotEmpty(map)) {
            return map;
        }
        for (DocumentaryTypeEnum ms : values()) {
            map.put(ms.key, ms.value);
        }
        return map;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

}
