2025-07-21 14:35:17 +08:00
|
|
|
using SqlSugar;
|
|
|
|
|
|
|
|
|
|
namespace DMS.Infrastructure.Entities;
|
|
|
|
|
|
2025-07-24 15:07:03 +08:00
|
|
|
/// <summary>
|
|
|
|
|
/// MQTT服务器配置实体
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
public class DbMqttServer
|
|
|
|
|
{
|
2025-07-24 15:07:03 +08:00
|
|
|
/// <summary>
|
|
|
|
|
/// 唯一标识符
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
|
|
|
|
public int Id { get; set; }
|
2025-07-24 15:07:03 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 服务器名称
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
public string ServerName { get; set; }
|
2025-07-24 15:07:03 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
2025-09-06 12:03:39 +08:00
|
|
|
/// MQTT服务器URL
|
2025-07-24 15:07:03 +08:00
|
|
|
/// </summary>
|
2025-09-06 12:03:39 +08:00
|
|
|
public string ServerUrl { get; set; }
|
2025-07-24 15:07:03 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 端口号
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
public int Port { get; set; }
|
2025-07-24 15:07:03 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 用户名
|
|
|
|
|
/// </summary>
|
2025-09-09 16:46:33 +08:00
|
|
|
[SugarColumn(IsNullable = true)]
|
2025-07-21 14:35:17 +08:00
|
|
|
public string Username { get; set; }
|
2025-07-24 15:07:03 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 密码
|
|
|
|
|
/// </summary>
|
2025-09-09 16:46:33 +08:00
|
|
|
[SugarColumn(IsNullable = true)]
|
2025-07-21 14:35:17 +08:00
|
|
|
public string Password { get; set; }
|
2025-07-24 15:07:03 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 是否激活
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
public bool IsActive { get; set; }
|
2025-07-24 15:07:03 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 订阅的主题
|
|
|
|
|
/// </summary>
|
2025-09-09 16:46:33 +08:00
|
|
|
[SugarColumn(IsNullable = true)]
|
2025-07-21 14:35:17 +08:00
|
|
|
public string SubscribeTopic { get; set; }
|
2025-07-24 15:07:03 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发布的主题
|
|
|
|
|
/// </summary>
|
2025-09-09 16:46:33 +08:00
|
|
|
[SugarColumn(IsNullable = true)]
|
2025-07-21 14:35:17 +08:00
|
|
|
public string PublishTopic { get; set; }
|
2025-07-24 15:07:03 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 客户端ID
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
public string ClientId { get; set; }
|
2025-07-24 15:07:03 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 创建时间
|
|
|
|
|
/// </summary>
|
2025-07-21 14:35:17 +08:00
|
|
|
public DateTime CreatedAt { get; set; }
|
2025-07-24 15:07:03 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 连接时间
|
|
|
|
|
/// </summary>
|
2025-09-06 12:03:39 +08:00
|
|
|
[SugarColumn(IsNullable = true)]
|
2025-07-21 14:35:17 +08:00
|
|
|
public DateTime? ConnectedAt { get; set; }
|
2025-07-24 15:07:03 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 连接持续时间(秒)
|
|
|
|
|
/// </summary>
|
2025-09-06 12:03:39 +08:00
|
|
|
[SugarColumn(IsNullable = true)]
|
2025-07-21 14:35:17 +08:00
|
|
|
public long ConnectionDuration { get; set; }
|
2025-07-24 15:07:03 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 消息格式
|
|
|
|
|
/// </summary>
|
2025-09-06 12:03:39 +08:00
|
|
|
[SugarColumn(IsNullable = true)]
|
2025-07-21 14:35:17 +08:00
|
|
|
public string MessageFormat { get; set; }
|
2025-09-10 18:15:31 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 消息头格式
|
|
|
|
|
/// </summary>
|
|
|
|
|
[SugarColumn(IsNullable = true)]
|
|
|
|
|
public string MessageHeader { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 消息内容格式
|
|
|
|
|
/// </summary>
|
|
|
|
|
[SugarColumn(IsNullable = true)]
|
|
|
|
|
public string MessageContent { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 消息尾格式
|
|
|
|
|
/// </summary>
|
|
|
|
|
[SugarColumn(IsNullable = true)]
|
|
|
|
|
public string MessageFooter { get; set; }
|
2025-07-21 14:35:17 +08:00
|
|
|
}
|