Files
2026-09-20 16:21:15 +07:00

42 lines
1.2 KiB
C#

namespace mws.backend.dotnet.application.Audit;
public record ActionLogFilter(
DateTimeOffset? From,
DateTimeOffset? To,
string? Actor,
string? Action,
string? EntityType,
Guid? EntityId);
public record LoginLogFilter(
DateTimeOffset? From,
DateTimeOffset? To,
string? Username,
bool? Success);
public class ActionLogDto
{
public Guid Id { get; set; }
public Guid ActorUserId { get; set; }
public string ActorUsername { get; set; } = string.Empty;
public string Action { get; set; } = string.Empty;
public string EntityType { get; set; } = string.Empty;
public Guid? EntityId { get; set; }
public string? EntityName { get; set; }
public string? IpAddress { get; set; }
public string? UserAgent { get; set; }
public DateTimeOffset CreatedAt { get; set; }
}
public class LoginLogDto
{
public Guid Id { get; set; }
public string Username { get; set; } = string.Empty;
public Guid? UserId { get; set; }
public bool Success { get; set; }
public string? FailureReason { get; set; }
public string? IpAddress { get; set; }
public string? UserAgent { get; set; }
public DateTimeOffset CreatedAt { get; set; }
}