梳理了所有的Db,DTO,ItemViewModel的属性

This commit is contained in:
2025-07-27 21:08:58 +08:00
parent e509b7de0b
commit 4a56405629
38 changed files with 417 additions and 479 deletions

View File

@@ -45,13 +45,13 @@ public class DbDevice
/// 设备机架号 (针对PLC等设备)。
/// </summary>
[SugarColumn(IsNullable = true)]
public int Rack { get; set; }
public short Rack { get; set; }
/// <summary>
/// 设备槽号 (针对PLC等设备)。
/// </summary>
[SugarColumn(IsNullable = true)]
public int Slot { get; set; }
public short Slot { get; set; }
/// <summary>
///
@@ -76,6 +76,9 @@ public class DbDevice
public bool IsActive { get; set; }
[SugarColumn(IsIgnore = true)]
public bool IsRunning { get; set; }
/// <summary>
/// 此设备包含的变量表集合。
/// </summary>

View File

@@ -11,10 +11,14 @@ public class DbVariable
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public int DataType { get; set; } // 对应 SignalType 枚举
public int PollLevel { get; set; } // 对应 PollLevelType 枚举
[SugarColumn(ColumnDataType="varchar(20)",SqlParameterDbType=typeof(EnumToStringConvert))]
public SignalType SignalType { get; set; } // 对应 SignalType 枚举
[SugarColumn(ColumnDataType="varchar(20)",SqlParameterDbType=typeof(EnumToStringConvert))]
public PollLevelType PollLevel { get; set; } // 对应 PollLevelType 枚举
public bool IsActive { get; set; }
public int VariableTableId { get; set; }
public string DataValue { get; set; }
public string DisplayValue { get; set; }
public string S7Address { get; set; }
public string OpcUaNodeId { get; set; }
public bool IsHistoryEnabled { get; set; }
@@ -32,4 +36,6 @@ public class DbVariable
public DateTime UpdatedAt { get; set; }
public string UpdatedBy { get; set; }
public bool IsModified { get; set; }
[SugarColumn(ColumnDataType="varchar(20)",SqlParameterDbType=typeof(EnumToStringConvert))]
public OpcUaUpdateType OpcUaUpdateType { get; set; }
}