using Microsoft.Extensions.Logging;
namespace YD_Event.Core.Entities;
///
/// 操作日志
///
public class SysOperationLog : Entity, ICreatedTime
{
///
/// 操作用户ID
///
public long? UserId { get; set; }
///
/// 日志级别
///
public LogLevel LogLevel { get; set; }
///
/// 接口描述
///
[SugarColumn(Length = 256)]
public string? Description { get; set; }
///
/// 控制器名称
///
[SugarColumn(Length = 128)]
public string ControllerName { get; set; }
///
/// 路由名称
///
[SugarColumn(Length = 128)]
public string ActionName { get; set; }
///
/// 请求方式
///
[SugarColumn(Length = 16)]
public string HttpMethod { get; set; }
///
/// 请求跟踪唯一ID (同一次请求ID相同)
///
[SugarColumn(Length = 64)]
public string TraceId { get; set; }
///
/// 线程ID
///
public int ThreadId { get; set; }
///
/// 浏览器
///
[SugarColumn(Length = 256)]
public string UserAgent { get; set; }
///
/// 请求地址
///
[SugarColumn(Length = 256)]
public string RequestUrl { get; set; }
///
/// ip地址
///
[SugarColumn(Length = 64)]
public string RemoteIp { get; set; }
///
/// 用户系统信息
///
[SugarColumn(Length = 256)]
public string? OsDescription { get; set; }
///
/// 耗时(毫秒)
///
public int Elapsed { get; set; }
///
/// Ip归属地
///
[SugarColumn(Length = 128)]
public string Location { get; set; }
///
/// http状态码
///
public int HttpStatusCode { get; set; }
///
/// 请求参数
///
[SugarColumn(ColumnDataType = "text")]
public string? Parameter { get; set; }
///
/// 响应结果
///
[SugarColumn(ColumnDataType = "text")]
public string? Response { get; set; }
///
/// 详细信息
///
[SugarColumn(ColumnDataType = "text")]
public string Message { get; set; }
///
/// 异常信息
///
[SugarColumn(ColumnDataType = "text")]
public string? Exception { get; set; }
///
/// 创建时间
///
public DateTime CreatedTime { get; set; }
}