2025-06-20 18:53:29 +08:00
|
|
|
|
using PMSWPF.Enums;
|
|
|
|
|
|
using SqlSugar;
|
|
|
|
|
|
using SqlSugar.DbConvert;
|
|
|
|
|
|
|
|
|
|
|
|
namespace PMSWPF.Data.Entities;
|
2025-06-23 17:01:06 +08:00
|
|
|
|
|
2025-07-02 22:07:16 +08:00
|
|
|
|
[SugarTable("VariableData")]
|
|
|
|
|
|
public class DbVariableData
|
2025-06-20 18:53:29 +08:00
|
|
|
|
{
|
2025-06-23 17:01:06 +08:00
|
|
|
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)] //数据库是自增才配自增
|
|
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[SugarColumn(IsNullable = true)] public int? VariableTableId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Navigate(NavigateType.ManyToOne, nameof(VariableTableId))]
|
2025-06-20 18:53:29 +08:00
|
|
|
|
public DbVariableTable? VariableTable { get; set; }
|
2025-06-23 17:01:06 +08:00
|
|
|
|
|
2025-06-20 18:53:29 +08:00
|
|
|
|
public string Name { get; set; }
|
2025-06-23 17:01:06 +08:00
|
|
|
|
|
|
|
|
|
|
[SugarColumn(IsNullable = true)] public string? Description { get; set; }
|
|
|
|
|
|
|
2025-06-20 18:53:29 +08:00
|
|
|
|
public string NodeId { get; set; }
|
2025-06-23 17:01:06 +08:00
|
|
|
|
|
|
|
|
|
|
[SugarColumn(ColumnDataType = "varchar(20)", SqlParameterDbType = typeof(EnumToStringConvert))]
|
2025-06-20 18:53:29 +08:00
|
|
|
|
public ProtocolType ProtocolType { get; set; }
|
2025-06-23 17:01:06 +08:00
|
|
|
|
|
2025-06-20 18:53:29 +08:00
|
|
|
|
public string DataType { get; set; }
|
2025-06-23 17:01:06 +08:00
|
|
|
|
|
|
|
|
|
|
[SugarColumn(IsNullable = true)] public List<DbMqtt>? Mqtts { get; set; }
|
|
|
|
|
|
|
2025-07-02 22:07:16 +08:00
|
|
|
|
public string DataValue { get; set; } = String.Empty;
|
|
|
|
|
|
public string DisplayValue { get; set; } = String.Empty;
|
2025-06-20 18:53:29 +08:00
|
|
|
|
public DateTime UpdateTime { get; set; }
|
2025-06-23 17:01:06 +08:00
|
|
|
|
|
|
|
|
|
|
[SugarColumn(IsNullable = true)] public DbUser? UpdateUser { get; set; }
|
|
|
|
|
|
|
2025-07-02 22:07:16 +08:00
|
|
|
|
public string Converstion { get; set; } = String.Empty;
|
2025-06-20 18:53:29 +08:00
|
|
|
|
public bool IsDeleted { get; set; }
|
2025-06-23 17:01:06 +08:00
|
|
|
|
public bool IsActive { get; set; }
|
2025-06-20 18:53:29 +08:00
|
|
|
|
public bool IsSave { get; set; }
|
2025-06-23 17:01:06 +08:00
|
|
|
|
public double SaveRange { get; set; }
|
2025-06-20 18:53:29 +08:00
|
|
|
|
public bool IsAlarm { get; set; }
|
2025-06-23 17:01:06 +08:00
|
|
|
|
public double AlarmMin { get; set; }
|
|
|
|
|
|
public double AlarmMax { get; set; }
|
|
|
|
|
|
|
2025-07-02 22:07:16 +08:00
|
|
|
|
[SugarColumn(ColumnDataType = "varchar(20)", IsNullable = true, SqlParameterDbType = typeof(EnumToStringConvert))]
|
2025-06-20 18:53:29 +08:00
|
|
|
|
public SignalType SignalType { get; set; }
|
|
|
|
|
|
}
|