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

import org.apache.commons.collections4.MapUtils;

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

//打款状态
public enum PaymentStatusEnum {
    UNDER_REVIEW("20", "未打款"),
    REJECT("10", "已打款"),
    ;
    private String key;

    private String value;

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

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

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
}
