using SqlSugar; namespace WmsLite.Api.Models; /// /// HTTP 访问日志(仅落库请求/响应文本,不包含 SQL)。 /// [SugarTable("http_access_log")] public class HttpAccessLog { [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = false)] public long Id { get; set; } [SugarColumn(ColumnName = "trace_id", Length = 64, IsNullable = false)] public string TraceId { get; set; } = string.Empty; [SugarColumn(ColumnName = "http_method", Length = 16, IsNullable = false)] public string HttpMethod { get; set; } = string.Empty; [SugarColumn(ColumnName = "path", Length = 512, IsNullable = false)] public string Path { get; set; } = string.Empty; [SugarColumn(ColumnName = "query_string", ColumnDataType = "text", IsNullable = true)] public string? QueryString { get; set; } [SugarColumn(ColumnName = "status_code", IsNullable = false)] public int StatusCode { get; set; } [SugarColumn(ColumnName = "request_body", ColumnDataType = "text", IsNullable = true)] public string? RequestBody { get; set; } [SugarColumn(ColumnName = "response_body", ColumnDataType = "text", IsNullable = true)] public string? ResponseBody { get; set; } [SugarColumn(ColumnName = "duration_ms", IsNullable = true)] public int? DurationMs { get; set; } [SugarColumn(ColumnName = "client_ip", Length = 64, IsNullable = true)] public string? ClientIp { get; set; } [SugarColumn(ColumnName = "user_id", Length = 128, IsNullable = true)] public string? UserId { get; set; } [SugarColumn(ColumnName = "create_time", IsNullable = true)] public DateTime? CreateTime { get; set; } }