package nckd.jimin.jyyy.fi.common;

import java.util.Arrays;

/**
 * 报表类型
 */
public enum ReimDetailTypeEnum {
    APPLY("apply","申请中"),
    WAIREIM("waitreim","待报销"),
    REIMING("reiming","报销中"),
    COMPLETE("complete","已完成"),
    REPAY("repay","还款");
    private String key ;

    private String name ;

    ReimDetailTypeEnum(String key, String name) {
        this.key = key;
        this.name = name;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static ReimDetailTypeEnum getValueByKey(String key){
        return Arrays.stream(ReimDetailTypeEnum.values()).filter(r -> r.getKey().equals(key)).findFirst().orElse(null);
    }
}
