fix 优化apilog和设备上传log

This commit is contained in:
2024-02-26 16:17:59 +08:00
parent d341f43009
commit 3bf049a51e
13 changed files with 207 additions and 200 deletions

View File

@@ -1,61 +1,55 @@
using Kurisu.Core.DataAccess.Entity;
using Kurisu.SqlSugar;
using Microsoft.Extensions.Logging;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar.DbConvert;
namespace Dlhis.Entity.Basic.Entity
namespace Dlhis.Entity.Basic.Entity;
/// <summary>
/// api日志表
/// </summary>
[SugarTable(TableName = "Logs", TableDescription = "api日志表")]
public class ApiLogEntity
{
/// <summary>
/// api日志表
/// 时间
/// </summary>
[SugarTable(TableName = "Logs", TableDescription = "api日志表")]
public class ApiLogEntity
{
/// <summary>
/// 时间
/// </summary>
[SugarColumn(ColumnDescription = "时间")]
public string Timestamp { get; set; }
[SugarColumn(ColumnDescription = "时间")]
public string Timestamp { get; set; }
/// <summary>
/// 级别
/// </summary>
[SugarColumn(ColumnDescription = "级别")]
public string Level { get; set; }
/// <summary>
/// 级别
/// </summary>
[SugarColumn(ColumnDescription = "级别", SqlParameterDbType = typeof(EnumToStringConvert))]
public LogLevel Level { get; set; }
/// <summary>
/// 模板
/// </summary>
[SugarColumn(ColumnDescription = "模板")]
public string Template { get; set; }
/// <summary>
/// 模板
/// </summary>
[SugarColumn(ColumnDescription = "模板")]
public string Template { get; set; }
/// <summary>
/// 消息内容
/// </summary>
[SugarColumn(ColumnDescription = "消息内容")]
public string Message { get; set; }
/// <summary>
/// 消息内容
/// </summary>
[SugarColumn(ColumnDescription = "消息内容")]
public string Message { get; set; }
/// <summary>
/// 异常内容
/// </summary>
[SugarColumn(ColumnDescription = "异常内容")]
public string Exception { get; set; }
/// <summary>
/// 异常内容
/// </summary>
[SugarColumn(ColumnDescription = "异常内容")]
public string Exception { get; set; }
/// <summary>
/// 属性
/// </summary>
[SugarColumn(ColumnDescription = "属性")]
public string Properties { get; set; }
/// <summary>
/// 属性
/// </summary>
[SugarColumn(ColumnDescription = "属性")]
public string Properties { get; set; }
/// <summary>
/// 时间
/// </summary>
[SugarColumn(ColumnDescription = "时间")]
public DateTime _ts { get; set; }
/// <summary>
/// 时间
/// </summary>
[SugarColumn(ColumnDescription = "时间")]
public DateTime _ts { get; set; }
}
}

View File

@@ -22,6 +22,6 @@ public class GainfoFaceEntity : SugarBaseEntity
/// <summary>
/// 人脸
/// </summary>
[SugarColumn(ColumnDataType = "text", IsNullable = false)]
[SugarColumn(ColumnDataType = "longtext", IsNullable = false)]
public string Face { get; set; }
}

View File

@@ -1,24 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Dlhis.Entity.Basic.Enums
{
/// <summary>
/// api日志状态
/// </summary>
[Description("api日志状态")]
public enum ApiLogEnumType
{
Information = 1,
Warning = 2,
Error = 3,
Fatal = 4,
}
}