using SqlSugar; namespace DMS.Infrastructure.Entities; /// /// 设备实体类,对应数据库中的 Devices 表。 /// [SugarTable("Devices")] public class DbDevice { /// /// 设备ID,主键且自增。 /// [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } /// /// 设备名称。 /// public string Name { get; set; } /// /// 设备通信协议类型,对应 ProtocolType 枚举。 /// public ProtocolType Protocol { get; set; } /// /// 设备IP地址。 /// public string IpAddress { get; set; } /// /// 设备端口号。 /// public int Port { get; set; } /// /// 设备机架号 (针对PLC等设备)。 /// public int Rack { get; set; } /// /// 设备槽号 (针对PLC等设备)。 /// public int Slot { get; set; } /// /// OPC UA服务器的URL地址。 /// public string OpcUaServerUrl { get; set; } /// /// 设备是否激活/启用。 /// public bool IsActive { get; set; } }