package cn.hanghui.outapi.platform.tenant.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @description:联动平台校验模式
 * @ClassName LinkageCheckMode
 * @Author WXG
 * @Date 2024/3/27 11:23
 */
@AllArgsConstructor
@Getter
public enum RelayOpenModelEnum {
    OPEN_CLOSE(1, "开-闭信号"),
    OPEN_GATE_CLOSE(2, "开-门磁-闭信息"),
            ;
    public static RelayOpenModelEnum getEnumByCode(Integer code){
        if(code == null){
            return null;
        }
        for (RelayOpenModelEnum enumObject : values()){
            if(enumObject.code.equals(code)){
                return enumObject;
            }
        }
        return null;
    }
    private Integer code;
    private String desc;
}
