package com.fastbee.iot.enums;

public enum ProductTypeEnum {

    SOLAR_DEVICE(138, "太阳能供电设备"),
    FLOW_METER_DEVICE(139, "流量计设备"),
    DOOR_LOCK_DEVICE(140, "门锁控制设备"),
    WENSHIDU_SHEBEI(4, "温湿度");

    private String name;
    private Integer type;


    ProductTypeEnum(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public static ProductTypeEnum getName(Integer type) {
        for (ProductTypeEnum scoreEnum : ProductTypeEnum.values()) {
            if (scoreEnum.type.equals(type)) {
                return scoreEnum;
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
