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:
57
SharedLibraryCore/Dtos/AuditInfo.cs
Normal file
57
SharedLibraryCore/Dtos/AuditInfo.cs
Normal 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; }
|
||||
}
|
||||
}
|
34
SharedLibraryCore/Dtos/PaginationInfo.cs
Normal file
34
SharedLibraryCore/Dtos/PaginationInfo.cs
Normal 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
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user