package com.ruoyi.dataprocess.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 设备信息对象 hw_device
 * 
 * @author xins
 * @date 2023-09-13
 */
public class HwDevice extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 设备ID */
    private Long deviceId;

    /** 设备编号 */
    @Excel(name = "设备编号")
    private String deviceCode;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String deviceName;

    /** 所属场景，关联hw_scene表的scene_id字段 */
    @Excel(name = "所属场景，关联hw_scene表的scene_id字段")
    private Long sceneId;

    /** 所属监控单元，关联表hw_monitor_unit字段monitor_unit_id */
    @Excel(name = "所属监控单元，关联表hw_monitor_unit字段monitor_unit_id")
    private Long monitorUnitId;

    /** 设备类型（1：网关设备，2：网关子设备，3：直连设备） */
    @Excel(name = "设备类型", readConverterExp = "1=：网关设备，2：网关子设备，3：直连设备")
    private String deviceType;

    /** 联网方式(1:Wi-Fi，2、蜂窝(2G/3G/4G/5G),3、以太网，4、其他) */
    @Excel(name = "联网方式(1:Wi-Fi，2、蜂窝(2G/3G/4G/5G),3、以太网，4、其他)")
    private String networkingMode;

    /** 接入协议（1、MQTT） */
    @Excel(name = "接入协议", readConverterExp = "1=、MQTT")
    private Long accessProtocol;

    /** 数据格式（1、Json） */
    @Excel(name = "数据格式", readConverterExp = "1=、Json")
    private Long dataFormat;

    /** 关联设备，hw_device表中国的device_id */
    @Excel(name = "关联设备，hw_device表中国的device_id")
    private Long releatedDeviceId;

    /** 设备模型，关联表hw_device_mode的字段device_mode_id */
    @Excel(name = "设备模型，关联表hw_device_mode的字段device_mode_id")
    private Long deviceModeId;

    /** 接入网关协议（1、Modbus）
            OPC-UA,Modbus，北向接入（阿里云、小度接入），南向接入，视频类接入，通道类接入，自定义接入 */
    @Excel(name = "接入网关协议", readConverterExp = "1=、Modbus")
    private Long accessGwProtocol;

    /** 激活状态（1、激活，0、未激活） */
    @Excel(name = "激活状态", readConverterExp = "1=、激活，0、未激活")
    private String activeStatus;

    /** 设备状态（0、测试，1、发布，9、删除） */
    @Excel(name = "设备状态", readConverterExp = "0=、测试，1、发布，9、删除")
    private String deviceStatus;

    /** 设备激活时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "设备激活时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date activeTime;

    /** 设备图片地址（如果为空则可以使用设备模型图片） */
    @Excel(name = "设备图片地址", readConverterExp = "如=果为空则可以使用设备模型图片")
    private String devicePic;

    /** 网络地址 */
    @Excel(name = "网络地址")
    private String ipAddress;

    /** 预留字段，设备所在区域ID，关联表hw_area字段area_id) */
    @Excel(name = "预留字段，设备所在区域ID，关联表hw_area字段area_id)")
    private Long areaId;

    /** 预留字段，设备位置（手动定位（在地图上选择设备所在的固定位置），自动定位（设备自动定位位置，关联网关自动定位位置。目前仅G780V2(固件版本V2.2.0之后)、PLCNET510、G800 V2和ModbusRTU(云端轮询)定位型变量支持选择自动定位功能）） */
    @Excel(name = "预留字段，设备位置", readConverterExp = "手=动定位（在地图上选择设备所在的固定位置")
    private String deviceLocation;

    /** 当前固件版本(Linux系统) */
    @Excel(name = "当前固件版本(Linux系统)")
    private String currentModuleVersion;

    /** 当前单片机固件版本 */
    @Excel(name = "当前单片机固件版本")
    private String currentSinglechipVersion;

    /** 预留字段 */
    @Excel(name = "预留字段")
    private String deviceField;

    /** 租户ID，关联hw_tenant的tenant_id */
    @Excel(name = "租户ID，关联hw_tenant的tenant_id")
    private Long tenantId;

    /** 在线状态（1、在线，0、离线） */
    @Excel(name = "在线状态", readConverterExp = "1=、在线，0、离线")
    private String onlineStatus;

    public void setDeviceId(Long deviceId) 
    {
        this.deviceId = deviceId;
    }

    public Long getDeviceId() 
    {
        return deviceId;
    }
    public void setDeviceCode(String deviceCode) 
    {
        this.deviceCode = deviceCode;
    }

    public String getDeviceCode() 
    {
        return deviceCode;
    }
    public void setDeviceName(String deviceName) 
    {
        this.deviceName = deviceName;
    }

    public String getDeviceName() 
    {
        return deviceName;
    }
    public void setSceneId(Long sceneId) 
    {
        this.sceneId = sceneId;
    }

    public Long getSceneId() 
    {
        return sceneId;
    }
    public void setMonitorUnitId(Long monitorUnitId) 
    {
        this.monitorUnitId = monitorUnitId;
    }

    public Long getMonitorUnitId() 
    {
        return monitorUnitId;
    }
    public void setDeviceType(String deviceType) 
    {
        this.deviceType = deviceType;
    }

    public String getDeviceType() 
    {
        return deviceType;
    }
    public void setNetworkingMode(String networkingMode) 
    {
        this.networkingMode = networkingMode;
    }

    public String getNetworkingMode() 
    {
        return networkingMode;
    }
    public void setAccessProtocol(Long accessProtocol) 
    {
        this.accessProtocol = accessProtocol;
    }

    public Long getAccessProtocol() 
    {
        return accessProtocol;
    }
    public void setDataFormat(Long dataFormat) 
    {
        this.dataFormat = dataFormat;
    }

    public Long getDataFormat() 
    {
        return dataFormat;
    }
    public void setReleatedDeviceId(Long releatedDeviceId) 
    {
        this.releatedDeviceId = releatedDeviceId;
    }

    public Long getReleatedDeviceId() 
    {
        return releatedDeviceId;
    }
    public void setDeviceModeId(Long deviceModeId) 
    {
        this.deviceModeId = deviceModeId;
    }

    public Long getDeviceModeId() 
    {
        return deviceModeId;
    }
    public void setAccessGwProtocol(Long accessGwProtocol) 
    {
        this.accessGwProtocol = accessGwProtocol;
    }

    public Long getAccessGwProtocol() 
    {
        return accessGwProtocol;
    }
    public void setActiveStatus(String activeStatus) 
    {
        this.activeStatus = activeStatus;
    }

    public String getActiveStatus() 
    {
        return activeStatus;
    }
    public void setDeviceStatus(String deviceStatus) 
    {
        this.deviceStatus = deviceStatus;
    }

    public String getDeviceStatus() 
    {
        return deviceStatus;
    }
    public void setActiveTime(Date activeTime) 
    {
        this.activeTime = activeTime;
    }

    public Date getActiveTime() 
    {
        return activeTime;
    }
    public void setDevicePic(String devicePic) 
    {
        this.devicePic = devicePic;
    }

    public String getDevicePic() 
    {
        return devicePic;
    }
    public void setIpAddress(String ipAddress) 
    {
        this.ipAddress = ipAddress;
    }

    public String getIpAddress() 
    {
        return ipAddress;
    }
    public void setAreaId(Long areaId) 
    {
        this.areaId = areaId;
    }

    public Long getAreaId() 
    {
        return areaId;
    }
    public void setDeviceLocation(String deviceLocation) 
    {
        this.deviceLocation = deviceLocation;
    }

    public String getDeviceLocation() 
    {
        return deviceLocation;
    }
    public void setCurrentModuleVersion(String currentModuleVersion) 
    {
        this.currentModuleVersion = currentModuleVersion;
    }

    public String getCurrentModuleVersion() 
    {
        return currentModuleVersion;
    }
    public void setCurrentSinglechipVersion(String currentSinglechipVersion) 
    {
        this.currentSinglechipVersion = currentSinglechipVersion;
    }

    public String getCurrentSinglechipVersion() 
    {
        return currentSinglechipVersion;
    }
    public void setDeviceField(String deviceField) 
    {
        this.deviceField = deviceField;
    }

    public String getDeviceField() 
    {
        return deviceField;
    }
    public void setTenantId(Long tenantId) 
    {
        this.tenantId = tenantId;
    }

    public Long getTenantId() 
    {
        return tenantId;
    }
    public void setOnlineStatus(String onlineStatus) 
    {
        this.onlineStatus = onlineStatus;
    }

    public String getOnlineStatus() 
    {
        return onlineStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("deviceId", getDeviceId())
            .append("deviceCode", getDeviceCode())
            .append("deviceName", getDeviceName())
            .append("sceneId", getSceneId())
            .append("monitorUnitId", getMonitorUnitId())
            .append("deviceType", getDeviceType())
            .append("networkingMode", getNetworkingMode())
            .append("accessProtocol", getAccessProtocol())
            .append("dataFormat", getDataFormat())
            .append("releatedDeviceId", getReleatedDeviceId())
            .append("deviceModeId", getDeviceModeId())
            .append("accessGwProtocol", getAccessGwProtocol())
            .append("activeStatus", getActiveStatus())
            .append("deviceStatus", getDeviceStatus())
            .append("activeTime", getActiveTime())
            .append("devicePic", getDevicePic())
            .append("ipAddress", getIpAddress())
            .append("areaId", getAreaId())
            .append("deviceLocation", getDeviceLocation())
            .append("currentModuleVersion", getCurrentModuleVersion())
            .append("currentSinglechipVersion", getCurrentSinglechipVersion())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("deviceField", getDeviceField())
            .append("tenantId", getTenantId())
            .append("onlineStatus", getOnlineStatus())
            .toString();
    }
}
