package com.battery.business.domain;
|
|
import jakarta.validation.constraints.Max;
|
import jakarta.validation.constraints.Min;
|
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.Size;
|
import java.time.Instant;
|
import java.util.List;
|
import com.battery.business.domain.vo.DeviceRelatedTestVo;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
|
/**
|
* 采集器对象 t_collector。
|
*
|
* @author ruoyi
|
*/
|
public class TCollector extends BaseEntity
|
{
|
private static final long serialVersionUID = 1L;
|
|
/** 采集器主键 */
|
private Long collectorId;
|
|
/** 所属设备适配器实例;不表达测试占用。 */
|
private Long adapterId;
|
|
/** 适配器最近一次观测该采集器的时间(UTC)。 */
|
private Instant lastSeenAtUtc;
|
|
/** 设备综合查询条件 */
|
private String device;
|
|
/** 创建时间起始值 */
|
private String beginCreateTime;
|
|
/** 创建时间结束值 */
|
private String endCreateTime;
|
|
/** 设备编码 */
|
@NotBlank(message = "设备编码不能为空")
|
@Size(max = 64, message = "设备编码长度不能超过64个字符")
|
private String collectorCode;
|
|
/** IP 地址 */
|
@NotBlank(message = "IP地址不能为空")
|
@Size(max = 45, message = "IP地址长度不能超过45个字符")
|
private String ipAddress;
|
|
/** MAC 地址 */
|
@NotBlank(message = "MAC地址不能为空")
|
@Size(max = 17, message = "MAC地址长度不能超过17个字符")
|
private String macAddress;
|
|
/** 采集器名称 */
|
@NotBlank(message = "采集器名称不能为空")
|
@Size(max = 100, message = "采集器名称长度不能超过100个字符")
|
private String collectorName;
|
|
/** 制造商 */
|
@Size(max = 100, message = "制造商长度不能超过100个字符")
|
private String manufacturer;
|
|
/** 型号 */
|
@Size(max = 100, message = "型号长度不能超过100个字符")
|
private String model;
|
|
/** 通道数 */
|
@NotNull(message = "通道数不能为空")
|
@Min(value = 1, message = "通道数不能小于1")
|
@Max(value = 10000, message = "通道数不能大于10000")
|
private Integer channelCount;
|
|
/** 接口在线状态:ONLINE 在线、OFFLINE 离线;数据库约束只允许这两个值。 */
|
private String onlineStatus;
|
|
/** 进行中测试关联标记,供启禁用和删除校验使用,不写入采集器表。 */
|
private String testStatus;
|
|
/** 关联测试与本采集器绑定通道,由现有绑定关系查询,不写入设备表。 */
|
private List<DeviceRelatedTestVo> relatedTests = List.of();
|
|
/** 兼容旧页面的派生字段,不参与采集器登记持久化。 */
|
private String currentSampleName;
|
|
/** 状态:0启用、1禁用 */
|
private String status;
|
|
/** 逻辑删除标识:0正常,其他值表示已删除 */
|
private String delFlag;
|
|
public Long getCollectorId()
|
{
|
return collectorId;
|
}
|
|
public void setCollectorId(Long collectorId)
|
{
|
this.collectorId = collectorId;
|
}
|
|
public Long getAdapterId() { return adapterId; }
|
|
public void setAdapterId(Long adapterId) { this.adapterId = adapterId; }
|
|
public Instant getLastSeenAtUtc() { return lastSeenAtUtc; }
|
|
public void setLastSeenAtUtc(Instant lastSeenAtUtc) { this.lastSeenAtUtc = lastSeenAtUtc; }
|
|
public String getDevice()
|
{
|
return device;
|
}
|
|
public void setDevice(String device)
|
{
|
this.device = device;
|
}
|
|
public String getBeginCreateTime()
|
{
|
return beginCreateTime;
|
}
|
|
public void setBeginCreateTime(String beginCreateTime)
|
{
|
this.beginCreateTime = beginCreateTime;
|
}
|
|
public String getEndCreateTime()
|
{
|
return endCreateTime;
|
}
|
|
public void setEndCreateTime(String endCreateTime)
|
{
|
this.endCreateTime = endCreateTime;
|
}
|
|
public String getCollectorCode()
|
{
|
return collectorCode;
|
}
|
|
public void setCollectorCode(String collectorCode)
|
{
|
this.collectorCode = collectorCode;
|
}
|
|
public String getIpAddress()
|
{
|
return ipAddress;
|
}
|
|
public void setIpAddress(String ipAddress)
|
{
|
this.ipAddress = ipAddress;
|
}
|
|
public String getMacAddress()
|
{
|
return macAddress;
|
}
|
|
public void setMacAddress(String macAddress)
|
{
|
this.macAddress = macAddress;
|
}
|
|
public String getCollectorName()
|
{
|
return collectorName;
|
}
|
|
public void setCollectorName(String collectorName)
|
{
|
this.collectorName = collectorName;
|
}
|
|
public String getManufacturer()
|
{
|
return manufacturer;
|
}
|
|
public void setManufacturer(String manufacturer)
|
{
|
this.manufacturer = manufacturer;
|
}
|
|
public String getModel()
|
{
|
return model;
|
}
|
|
public void setModel(String model)
|
{
|
this.model = model;
|
}
|
|
public Integer getChannelCount()
|
{
|
return channelCount;
|
}
|
|
public void setChannelCount(Integer channelCount)
|
{
|
this.channelCount = channelCount;
|
}
|
|
public String getOnlineStatus()
|
{
|
return onlineStatus;
|
}
|
|
public void setOnlineStatus(String onlineStatus)
|
{
|
this.onlineStatus = onlineStatus;
|
}
|
|
public String getTestStatus()
|
{
|
return testStatus;
|
}
|
|
public void setTestStatus(String testStatus)
|
{
|
this.testStatus = testStatus;
|
}
|
|
public List<DeviceRelatedTestVo> getRelatedTests()
|
{
|
return relatedTests;
|
}
|
|
public void setRelatedTests(List<DeviceRelatedTestVo> relatedTests)
|
{
|
this.relatedTests = relatedTests;
|
}
|
|
public String getCurrentSampleName()
|
{
|
return currentSampleName;
|
}
|
|
public void setCurrentSampleName(String currentSampleName)
|
{
|
this.currentSampleName = currentSampleName;
|
}
|
|
public String getStatus()
|
{
|
return status;
|
}
|
|
public void setStatus(String status)
|
{
|
this.status = status;
|
}
|
|
public String getDelFlag()
|
{
|
return delFlag;
|
}
|
|
public void setDelFlag(String delFlag)
|
{
|
this.delFlag = delFlag;
|
}
|
|
@Override
|
public String toString()
|
{
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
.append("collectorId", getCollectorId())
|
.append("collectorCode", getCollectorCode())
|
.append("ipAddress", getIpAddress())
|
.append("macAddress", getMacAddress())
|
.append("collectorName", getCollectorName())
|
.append("manufacturer", getManufacturer())
|
.append("model", getModel())
|
.append("channelCount", getChannelCount())
|
.append("onlineStatus", getOnlineStatus())
|
.append("testStatus", getTestStatus())
|
.append("relatedTests", getRelatedTests())
|
.append("currentSampleName", getCurrentSampleName())
|
.append("status", getStatus())
|
.append("delFlag", getDelFlag())
|
.append("remark", getRemark())
|
.append("createBy", getCreateBy())
|
.append("createTime", getCreateTime())
|
.append("updateBy", getUpdateBy())
|
.append("updateTime", getUpdateTime())
|
.toString();
|
}
|
}
|