package com.fjhx.account.entity.account.enums;

import org.apache.commons.collections4.MapUtils;

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

//请款审批状态
public enum AccountRequestFundsStatusEnum {
    UNDER_REVIEW("10", "审批中"),
    REJECT("20", "驳回"),
    PASS("30", "审批通过"),
    ;
    private String key;

    private String value;

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

    AccountRequestFundsStatusEnum(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 (AccountRequestFundsStatusEnum ms : values()) {
            map.put(ms.key, ms.value);
        }
        return map;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
}
