package com.njcn.device.pms.pojo.vo;

import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 终端通信管理返回前端实体类
 * @Title RStatDevSignalVO
 * @Package com.njcn.device.pms.pojo.vo
 * @Author jianghaifei
 * @Date 2022-11-11 16:16
 * @Version V1.0
 */
@Data
public class RStatDevSignalVO {

    @ApiModelProperty(name = "orgId", value = "单位id")
    private String orgId; //单位id

    @ApiModelProperty(name = "orgName", value = "单位名称")
    private String orgName; //单位名称

    @ApiModelProperty(name = "terminalId", value = "终端编号")
    private String terminalId; //终端编号

    @ApiModelProperty(name = "terminalName", value = "终端名称")
    private String terminalName; //终端名称

    @ApiModelProperty(name = "deviceStatus", value = "设备状态(字典)")
    private String deviceStatus; //设备状态

    @ApiModelProperty(name = "runStatus", value = "运行状态(字典)")
    private String runStatus; //运行状态

    @ApiModelProperty(name = "ip", value = "ip地址")
    private String ip; //ip地址

    @ApiModelProperty(name = "port", value = "端口")
    private String port; //端口

    @ApiModelProperty(name = "updateTime", value = "最后通讯时间")
    private String updateTime; //最后通讯时间

    public void setDeviceStatus(String deviceStatus) {
        if(StrUtil.isNotBlank(deviceStatus)){
            this.deviceStatus = deviceStatus;
        }else{
            this.deviceStatus = "/";
        }
    }

    public void setRunStatus(String runStatus) {
        if(StrUtil.isNotBlank(runStatus)){
            this.runStatus = runStatus;
        }else{
            this.runStatus = "/";
        }
    }

    public void setUpdateTime(String updateTime) {
        if(StrUtil.isNotBlank(updateTime)){
            this.updateTime = updateTime;
        }else{
            this.updateTime = "/";
        }
    }
}
