package com.willalp.common.enums;

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

/**
 * 首页类别
 *
 * @author willalp
 */
public enum IndexType
{
    /**
     * 用户
     */
    USER("/monitor/logininfor/list"),

    /**
     * 金额
     */
    FEE("/canteen/order/sumpay"),

    /**
     * 订单
     */
    ORDER("/canteen/order/sumordernum"),

    /**
     * charts
     */
    CHARTS("/canteen/order/lists");

    private String value;

    IndexType(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public IndexType fromValue(String value){

        return ALL_ENTRIES.get(value);
    }

    private static final Map<String, IndexType> ALL_ENTRIES = new HashMap<>(IndexType.values().length);
    static {
        for(IndexType each : IndexType.values()){
            ALL_ENTRIES.put(each.value, each);
        }
    }
}
