package com.hs.api.common.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public enum BudgetType {
    NOT(1,"无"),
    SUMMARY(2,"汇总"),
    OUT(4,"门诊"),
    SUMMARY_OUT(8,"汇总/门诊");

    private int value;
    private String desc;

    BudgetType(int value,String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static List<Map<String,Object>> all() {
        List<Map<String,Object>> list = new ArrayList<>();
        for(BudgetType projectType : values()){
            Map<String,Object> map = new HashMap<String,Object>() {
                {
                    put("value",projectType.getValue());
                    put("description",projectType.getDesc());
                }
            };
            list.add(map);
        }
        return list;
    }
}
