package com.limap.common.enums.iot;

public enum ProbeCEnums {

    one(1,"溶解氧探头掉线"),
    two(10,"pH探头掉线"),
    three(100,"盐度探头掉线"),
    four(1000,"浊度掉线");

    private Integer code;
    private String value;

    ProbeCEnums(Integer code, String value){
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static ProbeCEnums getByCode(Integer code) {
        for (ProbeCEnums e : ProbeCEnums.values()) {
            if (e.code.equals(code)) {
                return e;
            }
        }
        return null;
    }
}
