package com.sky.ioc.enums;

public enum FitnesTypeEnums {
    /**健康情况 1. 健康 2.亚健康  3.不健康*/
    FITNES_TYPE_HEALTH("1", "健康"),
    FITNES_TYPE_SUBHEALTH("2", "亚健康"),
    FITNES_TYPE_UNHEALTH("3", "不健康");

    private String type;

    private String desc;

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

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

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

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

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