添加设备类、设备日志类、设备服务类、设备控制器
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
using SqlSugar;
|
||||
|
||||
namespace Model.Entity.Config
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备日志(每台设备独享的日志记录)
|
||||
/// 记录设备的通讯、连接、数据采集等运行日志,按设备查询
|
||||
/// </summary>
|
||||
public class DeviceLogEntity : BaseEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备Id(关联 IotDeviceEntity.Id)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "设备Id")]
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备编号(冗余便于查询展示)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "设备编号", Length = 64)]
|
||||
public string? DeviceCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 日志级别(Info/Warn/Error)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "日志级别", Length = 16)]
|
||||
public string? Level { get; set; } = "Info";
|
||||
|
||||
/// <summary>
|
||||
/// 日志类型(连接/通讯/采集/指令/系统)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "日志类型", Length = 32)]
|
||||
public string? LogType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 日志内容
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "日志内容", ColumnDataType = "text")]
|
||||
public string? Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 记录时间(日志产生时间,用于时间线展示)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "记录时间")]
|
||||
public DateTime LogTime { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user