1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

implement audit log view in webfront

This commit is contained in:
RaidMax
2020-04-28 16:48:06 -05:00
parent 9a245c4db2
commit cc8756107f
11 changed files with 372 additions and 21 deletions

View File

@ -0,0 +1,57 @@
using System;
namespace SharedLibraryCore.Dtos
{
/// <summary>
/// data transfer class for audit information
/// </summary>
public class AuditInfo
{
/// <summary>
/// name of the origin entity
/// </summary>
public string OriginName { get; set; }
/// <summary>
/// id of the origin entity
/// </summary>
public int OriginId { get; set; }
/// <summary>
/// name of the target entity
/// </summary>
public string TargetName { get; set; }
/// <summary>
/// id of the target entity
/// </summary>
public int? TargetId { get; set; }
/// <summary>
/// when the audit event occured
/// </summary>
public DateTime When { get; set; }
/// <summary>
/// what audit action occured
/// </summary>
public string Action { get; set; }
/// <summary>
/// additional comment data about the audit event
/// </summary>
public string Data { get; set; }
private string oldValue;
/// <summary>
/// previous value
/// </summary>
public string OldValue { get => oldValue ?? "--"; set => oldValue = value; }
private string newValue;
/// <summary>
/// new value
/// </summary>
public string NewValue { get => newValue ?? "--"; set => newValue = value; }
}
}

View File

@ -0,0 +1,34 @@
namespace SharedLibraryCore.Dtos
{
/// <summary>
/// pagination information holder class
/// </summary>
public class PaginationInfo
{
/// <summary>
/// how many items to skip
/// </summary>
public int Offset { get; set; }
/// <summary>
/// how many itesm to take
/// </summary>
public int Count { get; set; }
/// <summary>
/// filter query
/// </summary>
public string Filter { get; set; }
/// <summary>
/// direction of ordering
/// </summary>
public SortDirection Direction { get; set; } = SortDirection.Descending;
}
public enum SortDirection
{
Ascending,
Descending
}
}