将所有的VariableData改为Variable,将DataVariables改为Variables,修复了变量添加MQTT服务器后,服务器列表不更新的问题
This commit is contained in:
@@ -8,7 +8,7 @@ namespace PMSWPF.Data.Entities;
|
||||
/// 表示数据库中的变量数据实体。
|
||||
/// </summary>
|
||||
[SugarTable("VarData")]
|
||||
public class DbVariableData
|
||||
public class DbVariable
|
||||
{
|
||||
/// <summary>
|
||||
/// 变量唯一标识符。
|
||||
@@ -161,12 +161,12 @@ public class DbVariableData
|
||||
/// <summary>
|
||||
/// 关联的MQTT配置列表。
|
||||
/// </summary>
|
||||
[Navigate(NavigateType.OneToMany, nameof(DbVariableMqtt.VariableDataId))]
|
||||
[Navigate(NavigateType.OneToMany, nameof(DbVariableMqtt.VariableId))]
|
||||
public List<DbVariableMqtt>? VariableMqtts { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的历史记录列表。
|
||||
/// </summary>
|
||||
[Navigate(NavigateType.OneToMany, nameof(DbVariableDataHistory.VariableDataId))]
|
||||
public List<DbVariableDataHistory>? HistoryRecords { get; set; }
|
||||
[Navigate(NavigateType.OneToMany, nameof(DbVariableHistory.VariableId))]
|
||||
public List<DbVariableHistory>? HistoryRecords { get; set; }
|
||||
}
|
||||
@@ -7,7 +7,7 @@ namespace PMSWPF.Data.Entities;
|
||||
/// 表示数据库中的变量数据历史实体。
|
||||
/// </summary>
|
||||
[SugarTable("VarDataHistory")]
|
||||
public class DbVariableDataHistory
|
||||
public class DbVariableHistory
|
||||
{
|
||||
/// <summary>
|
||||
/// 历史记录唯一标识符。
|
||||
@@ -34,13 +34,13 @@ public class DbVariableDataHistory
|
||||
/// <summary>
|
||||
/// 关联的DbVariableData的ID。
|
||||
/// </summary>
|
||||
public int VariableDataId { get; set; }
|
||||
public int VariableId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的DbVariableData实体。
|
||||
/// </summary>
|
||||
[Navigate(NavigateType.ManyToOne, nameof(VariableDataId))]
|
||||
public DbVariableData? VariableData { get; set; }
|
||||
[Navigate(NavigateType.ManyToOne, nameof(VariableId))]
|
||||
public DbVariable? Variable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 历史记录的时间戳。
|
||||
@@ -18,7 +18,7 @@ public class DbVariableMqtt
|
||||
/// <summary>
|
||||
/// 关联的变量数据ID。
|
||||
/// </summary>
|
||||
public int VariableDataId { get; set; }
|
||||
public int VariableId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的MQTT服务器ID。
|
||||
@@ -43,8 +43,8 @@ public class DbVariableMqtt
|
||||
/// <summary>
|
||||
/// 导航属性:关联的变量数据。
|
||||
/// </summary>
|
||||
[Navigate(NavigateType.ManyToOne, nameof(VariableDataId))]
|
||||
public DbVariableData? VariableData { get; set; }
|
||||
[Navigate(NavigateType.ManyToOne, nameof(VariableId))]
|
||||
public DbVariable? Variable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航属性:关联的MQTT服务器。
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
using SqlSugar;
|
||||
|
||||
namespace PMSWPF.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// 表示数据库中的S7变量数据实体,继承自DbVariableData。
|
||||
/// </summary>
|
||||
[SugarTable("S7DataVariable")]
|
||||
public class DbVariableS7Data : DbVariableData
|
||||
{
|
||||
}
|
||||
@@ -13,8 +13,8 @@ public class DbVariableTable
|
||||
/// <summary>
|
||||
/// 变量表中包含的数据变量列表。
|
||||
/// </summary>
|
||||
[Navigate(NavigateType.OneToMany, nameof(DbVariableData.VariableTableId))]
|
||||
public List<DbVariableData>? DataVariables { get; set; }
|
||||
[Navigate(NavigateType.OneToMany, nameof(DbVariable.VariableTableId))]
|
||||
public List<DbVariable>? Variables { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 变量表关联的设备。
|
||||
|
||||
Reference in New Issue
Block a user