package com.hs.api.common.enums;

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

public enum TypeState {
    CORE(1,"核心"),
    COMPREHENSIVE(2,"综合"),
    RESOURCES(3,"资源分配");

    private int value;
    private String desc;

    TypeState(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(TypeState typeState : values()){
            Map<String,Object> map = new HashMap<String,Object>() {
                {
                    put("value",typeState.getValue());
                    put("description",typeState.getDesc());
                }
            };
            list.add(map);
        }
        return list;
    }

}
