2025-07-26 10:05:43 +08:00
|
|
|
|
using DMS.Core.Enums;
|
|
|
|
|
|
using SqlSugar;
|
2025-07-24 21:41:00 +08:00
|
|
|
|
using SqlSugar.DbConvert;
|
2025-07-26 10:05:43 +08:00
|
|
|
|
using CSharpDataType = SqlSugar.CSharpDataType;
|
2025-06-20 18:53:29 +08:00
|
|
|
|
|
2025-07-18 22:21:16 +08:00
|
|
|
|
namespace DMS.Infrastructure.Entities;
|
2025-06-23 17:01:06 +08:00
|
|
|
|
|
2025-07-17 20:13:21 +08:00
|
|
|
|
public class DbVariable
|
2025-06-20 18:53:29 +08:00
|
|
|
|
{
|
2025-07-21 14:35:17 +08:00
|
|
|
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
2025-07-04 13:40:14 +08:00
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
public string Name { get; set; }
|
2025-07-24 21:41:00 +08:00
|
|
|
|
public string Description { get; set; }
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public int DataType { get; set; } // 对应 SignalType 枚举
|
|
|
|
|
|
public int PollLevel { get; set; } // 对应 PollLevelType 枚举
|
2025-07-03 13:17:25 +08:00
|
|
|
|
public bool IsActive { get; set; }
|
2025-07-04 13:40:14 +08:00
|
|
|
|
public int VariableTableId { get; set; }
|
2025-07-21 22:02:42 +08:00
|
|
|
|
public string S7Address { get; set; }
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public string OpcUaNodeId { get; set; }
|
|
|
|
|
|
public bool IsHistoryEnabled { get; set; }
|
|
|
|
|
|
public double HistoryDeadband { get; set; }
|
|
|
|
|
|
public bool IsAlarmEnabled { get; set; }
|
|
|
|
|
|
public double AlarmMinValue { get; set; }
|
|
|
|
|
|
public double AlarmMaxValue { get; set; }
|
|
|
|
|
|
public double AlarmDeadband { get; set; }
|
2025-07-24 21:41:00 +08:00
|
|
|
|
[SugarColumn(ColumnDataType="varchar(20)",SqlParameterDbType=typeof(EnumToStringConvert))]
|
|
|
|
|
|
public ProtocolType Protocol { get; set; } // 对应 ProtocolType 枚举
|
|
|
|
|
|
[SugarColumn(ColumnDataType="varchar(20)",SqlParameterDbType=typeof(EnumToStringConvert))]
|
|
|
|
|
|
public CSharpDataType CSharpDataType { get; set; } // 对应 CSharpDataType 枚举
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public string ConversionFormula { get; set; }
|
|
|
|
|
|
public DateTime CreatedAt { get; set; }
|
|
|
|
|
|
public DateTime UpdatedAt { get; set; }
|
|
|
|
|
|
public string UpdatedBy { get; set; }
|
|
|
|
|
|
public bool IsModified { get; set; }
|
2025-06-20 18:53:29 +08:00
|
|
|
|
}
|