2025-06-12 18:41:46 +08:00
|
|
|
|
using SqlSugar;
|
2025-07-21 14:35:17 +08:00
|
|
|
|
|
|
|
|
|
|
namespace DMS.Infrastructure.Entities;
|
2025-06-10 22:13:06 +08:00
|
|
|
|
|
2025-07-03 13:17:25 +08:00
|
|
|
|
/// <summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
/// 设备实体类,对应数据库中的 Devices 表。
|
2025-07-03 13:17:25 +08:00
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
[SugarTable("Devices")]
|
2025-06-10 22:13:06 +08:00
|
|
|
|
public class DbDevice
|
|
|
|
|
|
{
|
2025-07-03 13:17:25 +08:00
|
|
|
|
/// <summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
/// 设备ID,主键且自增。
|
2025-07-03 13:17:25 +08:00
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
2025-07-03 13:17:25 +08:00
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
/// 设备名称。
|
2025-07-03 13:17:25 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
2025-07-04 14:42:28 +08:00
|
|
|
|
/// <summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
/// 设备通信协议类型,对应 ProtocolType 枚举。
|
2025-07-04 14:42:28 +08:00
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public ProtocolType Protocol { get; set; }
|
2025-07-04 14:42:28 +08:00
|
|
|
|
|
2025-07-05 01:31:44 +08:00
|
|
|
|
/// <summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
/// 设备IP地址。
|
2025-07-05 01:31:44 +08:00
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public string IpAddress { get; set; }
|
2025-07-05 01:31:44 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
/// 设备端口号。
|
2025-07-05 01:31:44 +08:00
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public int Port { get; set; }
|
2025-07-05 01:31:44 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
/// 设备机架号 (针对PLC等设备)。
|
2025-07-05 01:31:44 +08:00
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public int Rack { get; set; }
|
2025-07-05 01:31:44 +08:00
|
|
|
|
|
2025-07-03 13:17:25 +08:00
|
|
|
|
/// <summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
/// 设备槽号 (针对PLC等设备)。
|
2025-07-03 13:17:25 +08:00
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public int Slot { get; set; }
|
2025-06-23 17:01:06 +08:00
|
|
|
|
|
2025-07-08 20:19:06 +08:00
|
|
|
|
/// <summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
/// OPC UA服务器的URL地址。
|
2025-07-08 20:19:06 +08:00
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public string OpcUaServerUrl { get; set; }
|
2025-07-08 20:19:06 +08:00
|
|
|
|
|
2025-07-03 13:17:25 +08:00
|
|
|
|
/// <summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
/// 设备是否激活/启用。
|
2025-07-03 13:17:25 +08:00
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public bool IsActive { get; set; }
|
2025-06-10 22:13:06 +08:00
|
|
|
|
}
|