清理引用,将NavigatorServices更改为使用Message来实现导航的切换
This commit is contained in:
@@ -3,38 +3,46 @@ using SqlSugar;
|
||||
using SqlSugar.DbConvert;
|
||||
|
||||
namespace PMSWPF.Data.Entities;
|
||||
|
||||
[SugarTable("DataVariable")]
|
||||
public class DbDataVariable
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]//数据库是自增才配自增
|
||||
public int Id { get; set; }
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public int ?VariableTableId { get; set; }
|
||||
[Navigate(NavigateType.ManyToOne, nameof(DbDataVariable.VariableTableId))]
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)] //数据库是自增才配自增
|
||||
public int Id { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)] public int? VariableTableId { get; set; }
|
||||
|
||||
[Navigate(NavigateType.ManyToOne, nameof(VariableTableId))]
|
||||
public DbVariableTable? VariableTable { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public string? Description { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)] public string? Description { get; set; }
|
||||
|
||||
public string NodeId { get; set; }
|
||||
[SugarColumn(ColumnDataType="varchar(20)",SqlParameterDbType=typeof(EnumToStringConvert))]
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(20)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public ProtocolType ProtocolType { get; set; }
|
||||
|
||||
public string DataType { get; set; }
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public List<DbMqtt>? Mqtts { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)] public List<DbMqtt>? Mqtts { get; set; }
|
||||
|
||||
public string DataValue { get; set; }
|
||||
public string DisplayValue { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public DbUser? UpdateUser { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)] public DbUser? UpdateUser { get; set; }
|
||||
|
||||
public string Converstion { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public bool IsSave { get; set; }
|
||||
public Double SaveRange { get; set; }
|
||||
public double SaveRange { get; set; }
|
||||
public bool IsAlarm { get; set; }
|
||||
public Double AlarmMin { get; set; }
|
||||
public Double AlarmMax { get; set; }
|
||||
[SugarColumn(ColumnDataType="varchar(20)",SqlParameterDbType=typeof(EnumToStringConvert))]
|
||||
public double AlarmMin { get; set; }
|
||||
public double AlarmMax { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(20)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public SignalType SignalType { get; set; }
|
||||
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Net.Sockets;
|
||||
using PMSWPF.Enums;
|
||||
using SqlSugar;
|
||||
using SqlSugar.DbConvert;
|
||||
@@ -10,22 +8,24 @@ namespace PMSWPF.Data.Entities;
|
||||
[SugarTable("Device")]
|
||||
public class DbDevice
|
||||
{
|
||||
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]//数据库是自增才配自增
|
||||
public int Id { get; set; }
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)] //数据库是自增才配自增
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public string? Description { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)] public string? Description { get; set; }
|
||||
|
||||
public string Ip { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public bool IsRuning { get; set; }
|
||||
[SugarColumn(ColumnDataType="varchar(20)",SqlParameterDbType=typeof(EnumToStringConvert))]
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(20)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public DeviceType DeviceType { get; set; }
|
||||
|
||||
[Navigate(NavigateType.OneToMany, nameof(DbVariableTable.DeviceId))]
|
||||
|
||||
[Navigate(NavigateType.OneToMany, nameof(DbVariableTable.DeviceId))]
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public List<DbVariableTable>? VariableTables { get; set; }
|
||||
[SugarColumn(ColumnDataType="varchar(20)",SqlParameterDbType=typeof(EnumToStringConvert))]
|
||||
public List<DbVariableTable>? VariableTables { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(20)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public ProtocolType ProtocolType { get; set; }
|
||||
|
||||
}
|
||||
@@ -2,10 +2,8 @@
|
||||
|
||||
namespace PMSWPF.Data.Entities;
|
||||
|
||||
|
||||
public class DbMqtt
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]//数据库是自增才配自增
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)] //数据库是自增才配自增
|
||||
public int Id { get; set; }
|
||||
|
||||
}
|
||||
@@ -12,21 +12,20 @@ public class DbNlog
|
||||
// @Application, @Logged, @Level,@ThreadID, @Message,
|
||||
// @Logger, @Callsite, @Exception, @Url, @Action, @User
|
||||
// )
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]//数据库是自增才配自增
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)] //数据库是自增才配自增
|
||||
public int Id { get; set; }
|
||||
|
||||
public DateTime LogTime { get; set; }
|
||||
public string Level { get; set; }
|
||||
public int ThreadID { get; set; }
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public string ThreadName { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)] public string ThreadName { get; set; }
|
||||
|
||||
public string Logger { get; set; }
|
||||
public string Callsite { get; set; }
|
||||
public int CallsiteLineNumber { get; set; }
|
||||
public string Message { get; set; }
|
||||
[SugarColumn(IsNullable = true,ColumnDataType = "text")]
|
||||
public string Exception { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
[SugarColumn(IsNullable = true, ColumnDataType = "text")]
|
||||
public string Exception { get; set; }
|
||||
}
|
||||
@@ -3,8 +3,6 @@
|
||||
namespace PMSWPF.Data.Entities;
|
||||
|
||||
[SugarTable("S7DataVariable")]
|
||||
public class DbS7DataVariable:DbDataVariable
|
||||
public class DbS7DataVariable : DbDataVariable
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
@@ -5,7 +5,6 @@ namespace PMSWPF.Data.Entities;
|
||||
[SugarTable("User")]
|
||||
public class DbUser
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]//数据库是自增才配自增
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)] //数据库是自增才配自增
|
||||
public int Id { get; set; }
|
||||
|
||||
}
|
||||
@@ -8,18 +8,21 @@ namespace PMSWPF.Data.Entities;
|
||||
[SugarTable("VariableTable")]
|
||||
public class DbVariableTable
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]//数据库是自增才配自增
|
||||
public int Id { get; set; }
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)] //数据库是自增才配自增
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public string? Description { get; set; }
|
||||
[SugarColumn(ColumnDataType="varchar(20)",SqlParameterDbType=typeof(EnumToStringConvert))]
|
||||
|
||||
[SugarColumn(IsNullable = true)] public string? Description { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = "varchar(20)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
||||
public ProtocolType ProtocolType { get; set; }
|
||||
|
||||
|
||||
[Navigate(NavigateType.OneToMany, nameof(DbDataVariable.VariableTableId))]
|
||||
public List<DbDataVariable>? DataVariables { get; set; }
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public int? DeviceId { get; set; }
|
||||
[Navigate(NavigateType.ManyToOne, nameof(DbVariableTable.DeviceId))]
|
||||
public Device? Device { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)] public int? DeviceId { get; set; }
|
||||
|
||||
[Navigate(NavigateType.ManyToOne, nameof(DeviceId))]
|
||||
public Device? Device { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user