feat: add Logs
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user