2025-07-22 22:01:44 +08:00
|
|
|
|
using DMS.Core.Enums;
|
|
|
|
|
|
using SqlSugar;
|
|
|
|
|
|
using SqlSugar.DbConvert;
|
2025-06-20 18:53:29 +08:00
|
|
|
|
|
2025-07-18 22:21:16 +08:00
|
|
|
|
namespace DMS.Infrastructure.Entities;
|
2025-06-20 18:53:29 +08:00
|
|
|
|
|
2025-07-22 22:01:44 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 变量表
|
|
|
|
|
|
/// </summary>
|
2025-06-20 18:53:29 +08:00
|
|
|
|
public class DbVariableTable
|
|
|
|
|
|
{
|
2025-07-22 22:01:44 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 主键ID
|
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
2025-06-23 17:01:06 +08:00
|
|
|
|
public int Id { get; set; }
|
2025-07-22 22:01:44 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 变量表名称
|
|
|
|
|
|
/// </summary>
|
2025-07-03 13:17:25 +08:00
|
|
|
|
public string Name { get; set; }
|
2025-07-22 22:01:44 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 描述
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[SugarColumn(IsNullable = true)]
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public string Description { get; set; }
|
2025-07-22 22:01:44 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否激活
|
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public bool IsActive { get; set; }
|
2025-07-22 22:01:44 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备ID
|
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
|
public int DeviceId { get; set; }
|
2025-07-22 22:01:44 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 关联的设备
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[SugarColumn(IsIgnore = true)]
|
2025-07-24 15:07:03 +08:00
|
|
|
|
public DbDevice DbDevice { get; set; }
|
2025-07-22 22:01:44 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 协议类型
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[SugarColumn(ColumnDataType="varchar(20)",SqlParameterDbType=typeof(EnumToStringConvert))]
|
|
|
|
|
|
public ProtocolType Protocol { get; set; } // 对应 ProtocolType 枚举
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 此设备包含的变量表集合。
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[SugarColumn(IsIgnore = true)]
|
|
|
|
|
|
public List<DbVariable> Variables { get; set; } = new();
|
2025-06-20 18:53:29 +08:00
|
|
|
|
}
|