namespace Model.Dto.Config
{
///
/// 网关 DTO
///
public class GatewayDto
{
public string Id { get; set; }
public string Code { get; set; }
public string Name { get; set; }
public int ProtocolType { get; set; }
// TCP
public string? Host { get; set; }
public int? Port { get; set; }
// 串口
public string? ComPort { get; set; }
public int? BaudRate { get; set; }
public byte? DataBits { get; set; }
public byte? StopBits { get; set; }
public byte? Parity { get; set; }
// S7
public string? CpuType { get; set; }
public byte? Rack { get; set; }
public byte? Slot { get; set; }
// 状态
public bool IsEnabled { get; set; }
public byte OnlineStatus { get; set; }
public DateTime? LastConnectedTime { get; set; }
public string? LastError { get; set; }
public string? Remark { get; set; }
public DateTime? CreateTime { get; set; }
}
///
/// 网关下拉选项 DTO(设备表单选用)
///
public class GatewayOptionDto
{
public string Id { get; set; }
public string Code { get; set; }
public string Name { get; set; }
}
///
/// 测试连接结果 DTO
///
public class GatewayTestResultDto
{
public bool Success { get; set; }
public string Message { get; set; }
}
}