package com.qiuguo.iot.base.enums;

/*
* 反馈意见类型类型
* 作者：吴林
* */
// 0：设备问题 1 技能服务 2 app问题
public enum SuggestionTypeEnum {
    DEVICE(0, "手动升级"),
    SKILL(1, "技能"),
    APP(2, "强制"),
    ;
     SuggestionTypeEnum(Integer c, String n){
        code = c;
        name = n;
    }
    private Integer code;
    private String name;
    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static SuggestionTypeEnum getEnumWithCode(Integer c){
        for (SuggestionTypeEnum e:values()
        ) {
            if(e.getCode().compareTo(c) == 0){
                return e;
            }
        }
        return null;
    }
    public static SuggestionTypeEnum getEnumWithName(String name){
        for (SuggestionTypeEnum e:values()
        ) {
            if(e.getName().equals(name)){
                return e;
            }
        }
        return null;
    }
}
