package com.battery.business.domain;
|
|
import java.math.BigDecimal;
|
import java.time.Instant;
|
import java.util.Date;
|
import java.util.List;
|
import com.battery.business.domain.vo.DeviceRelatedTestVo;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
import jakarta.validation.constraints.Max;
|
import jakarta.validation.constraints.Min;
|
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.Pattern;
|
import jakarta.validation.constraints.Size;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
|
/**
|
* 检测柜对象 t_detection_cabinet
|
*
|
* @author ruoyi
|
*/
|
public class TDetectionCabinet extends BaseEntity
|
{
|
private static final long serialVersionUID = 1L;
|
|
/** 检测柜主键。 */
|
private Long cabinetId;
|
|
/** 所属设备适配器实例。 */
|
private Long adapterId;
|
private String adapterCode;
|
|
/** 数据来源名称,仅供展示,用于区分不同机器上的同名柜号;不落库。 */
|
private String adapterName;
|
|
private Integer vendorDeviceType;
|
private Integer vendorDeviceId;
|
private Instant lastSeenAtUtc;
|
|
/** 登记状态:新记录只使用 REGISTERED;DISCOVERED 仅兼容有业务引用的历史记录。 */
|
private String registrationStatus;
|
|
/** 全局唯一的设备编码。 */
|
@NotBlank(message = "设备编码不能为空")
|
@Size(max = 64, message = "设备编码长度不能超过64个字符")
|
private String cabinetCode;
|
|
/** 检测柜显示名称。 */
|
@NotBlank(message = "设备名称不能为空")
|
@Size(max = 100, message = "设备名称长度不能超过100个字符")
|
private String cabinetName;
|
|
/** 检测柜网络 IP 地址,支持 IPv4 和 IPv6。 */
|
@NotBlank(message = "IP地址不能为空")
|
@Size(max = 45, message = "IP地址长度不能超过45个字符")
|
private String ipAddress;
|
|
/** 检测柜 MAC 地址,保存前统一为大写冒号分隔格式。 */
|
@Pattern(regexp = "^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$", message = "MAC地址格式不正确")
|
private String macAddress;
|
|
/** 设备制造商。 */
|
@Size(max = 100, message = "制造商长度不能超过100个字符")
|
private String manufacturer;
|
|
/** 设备型号。 */
|
@Size(max = 100, message = "型号长度不能超过100个字符")
|
private String model;
|
|
/** 检测柜规格/容量,最多保留两位小数。 */
|
private BigDecimal capacity;
|
|
/** 检测柜可用通道数量。 */
|
@NotNull(message = "通道数不能为空")
|
@Min(value = 1, message = "通道数必须在1到10000之间")
|
@Max(value = 10000, message = "通道数必须在1到10000之间")
|
private Integer channelCount;
|
|
/** 接口在线状态:0在线,1离线;数据库保存 ONLINE/OFFLINE。 */
|
private String onlineStatus;
|
|
/** 进行中测试关联标记,供启禁用和删除校验使用,不写入检测柜表。 */
|
private String testStatus;
|
|
/** 关联测试与本柜绑定通道,由现有绑定关系查询,不写入检测柜表。 */
|
private List<DeviceRelatedTestVo> relatedTests = List.of();
|
|
/** 启用状态:0启用,1停用。 */
|
private String status;
|
|
/** 逻辑删除标识:0存在,1删除。 */
|
private String delFlag;
|
|
/** 设备综合查询条件:IP、设备编码、MAC、设备名称 */
|
private String device;
|
|
/** 创建时间开始值 */
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
private Date beginCreateTime;
|
|
/** 创建时间结束值 */
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
private Date endCreateTime;
|
|
public Long getCabinetId()
|
{
|
return cabinetId;
|
}
|
|
public Long getAdapterId() { return adapterId; }
|
public void setAdapterId(Long adapterId) { this.adapterId = adapterId; }
|
public String getAdapterCode() { return adapterCode; }
|
public void setAdapterCode(String value) { this.adapterCode = value; }
|
public String getAdapterName() { return adapterName; }
|
public void setAdapterName(String value) { adapterName = value; }
|
public Integer getVendorDeviceType() { return vendorDeviceType; }
|
public void setVendorDeviceType(Integer value) { vendorDeviceType = value; }
|
public Integer getVendorDeviceId() { return vendorDeviceId; }
|
public void setVendorDeviceId(Integer value) { vendorDeviceId = value; }
|
public Instant getLastSeenAtUtc() { return lastSeenAtUtc; }
|
public void setLastSeenAtUtc(Instant value) { lastSeenAtUtc = value; }
|
public String getRegistrationStatus() { return registrationStatus; }
|
public void setRegistrationStatus(String value) { registrationStatus = value; }
|
|
public void setCabinetId(Long cabinetId)
|
{
|
this.cabinetId = cabinetId;
|
}
|
|
public String getCabinetCode()
|
{
|
return cabinetCode;
|
}
|
|
public void setCabinetCode(String cabinetCode)
|
{
|
this.cabinetCode = cabinetCode;
|
}
|
|
public String getCabinetName()
|
{
|
return cabinetName;
|
}
|
|
public void setCabinetName(String cabinetName)
|
{
|
this.cabinetName = cabinetName;
|
}
|
|
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 getManufacturer()
|
{
|
return manufacturer;
|
}
|
|
public void setManufacturer(String manufacturer)
|
{
|
this.manufacturer = manufacturer;
|
}
|
|
public String getModel()
|
{
|
return model;
|
}
|
|
public void setModel(String model)
|
{
|
this.model = model;
|
}
|
|
/**
|
* 获取检测柜规格/容量。
|
*
|
* @return 检测柜规格/容量
|
*/
|
public BigDecimal getCapacity()
|
{
|
return capacity;
|
}
|
|
/**
|
* 设置检测柜规格/容量。
|
*
|
* @param capacity 检测柜规格/容量,数据库最多保留两位小数
|
*/
|
public void setCapacity(BigDecimal capacity)
|
{
|
this.capacity = capacity;
|
}
|
|
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 getStatus()
|
{
|
return status;
|
}
|
|
public void setStatus(String status)
|
{
|
this.status = status;
|
}
|
|
public String getDelFlag()
|
{
|
return delFlag;
|
}
|
|
public void setDelFlag(String delFlag)
|
{
|
this.delFlag = delFlag;
|
}
|
|
public String getDevice()
|
{
|
return device;
|
}
|
|
public void setDevice(String device)
|
{
|
this.device = device;
|
}
|
|
public Date getBeginCreateTime()
|
{
|
return beginCreateTime;
|
}
|
|
public void setBeginCreateTime(Date beginCreateTime)
|
{
|
this.beginCreateTime = beginCreateTime;
|
}
|
|
public Date getEndCreateTime()
|
{
|
return endCreateTime;
|
}
|
|
public void setEndCreateTime(Date endCreateTime)
|
{
|
this.endCreateTime = endCreateTime;
|
}
|
|
@Override
|
public String toString()
|
{
|
return "TDetectionCabinet{" +
|
"cabinetId=" + cabinetId +
|
", cabinetCode='" + cabinetCode + '\'' +
|
", cabinetName='" + cabinetName + '\'' +
|
", ipAddress='" + ipAddress + '\'' +
|
", macAddress='" + macAddress + '\'' +
|
", manufacturer='" + manufacturer + '\'' +
|
", model='" + model + '\'' +
|
", capacity=" + capacity +
|
", channelCount=" + channelCount +
|
", onlineStatus='" + onlineStatus + '\'' +
|
", testStatus='" + testStatus + '\'' +
|
", relatedTests=" + relatedTests +
|
", status='" + status + '\'' +
|
", delFlag='" + delFlag + '\'' +
|
", device='" + device + '\'' +
|
", beginCreateTime=" + beginCreateTime +
|
", endCreateTime=" + endCreateTime +
|
'}';
|
}
|
}
|