package com.goafanti.expenseAccount.Enums;

import java.util.HashMap;
import java.util.Map;

public enum EATypes {

    QT(0,"其他"),
    CLF(1,"差旅费"),
    FYWBX(2,"非业务报销"),
    DSFFK(3,"第三方付款"),
    SQJZ(4,"申请借支"),
    DQ(5,"抵扣");
    private Integer code;
    private String desc;

    EATypes(Integer code, String desc){
        this.code = code;
        this.desc = desc;
    }
    private static Map<Integer,EATypes> status =new HashMap<>();

    static {
        for (EATypes e:EATypes.values()){
            status.put(e.getCode(),e);
        }
    }
    public static String getDescByCode(Integer code){
        for (EATypes value : EATypes.values()) {
            if (value.getCode() == code)return value.getDesc();
        }
        return "";
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
