package com.sky.ioc.enums;
/**
 * 菜品类型枚举类  热菜，凉菜，主食，汤
 * */
public enum CuisineTypeTwoEnums {
    CUISINE_TYPE_TWO_HOT_DISHES("1", "热菜"),
    CUISINE_TYPE_TWO_COLD_DISHES("2", "凉菜"),
    CUISINE_TYPE_TWO_STAPLE_FOOD("3", "主食"),
    CUISINE_TYPE_TWO_SOUP("4", "汤");

    private String type;

    private String desc;

    private CuisineTypeTwoEnums(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static String getValue(String type) {
        CuisineTypeTwoEnums[] CuisineTypeTwoEnumss = values();
        for (CuisineTypeTwoEnums CuisineTypeTwoEnums : CuisineTypeTwoEnumss) {
            if (CuisineTypeTwoEnums.type().equals(type)) {
                return CuisineTypeTwoEnums.desc();
            }
        }
        return null;
    }

    public static String getType(String desc) {
        CuisineTypeTwoEnums[] CuisineTypeTwoEnumss = values();
        for (CuisineTypeTwoEnums CuisineTypeTwoEnums : CuisineTypeTwoEnumss) {
            if (CuisineTypeTwoEnums.desc().equals(desc)) {
                return CuisineTypeTwoEnums.type();
            }
        }
        return null;
    }

    private String type() {
        return this.type;
    }

    private String desc() {
        return this.desc;
    }
}
