IW4M-Admin/SharedLibraryCore/Dtos/AuditInfo.cs

67 lines
1.6 KiB
C#
Raw Normal View History

2020-04-28 17:48:06 -04:00
using System;
namespace SharedLibraryCore.Dtos
{
/// <summary>
2022-01-26 11:32:16 -05:00
/// data transfer class for audit information
2020-04-28 17:48:06 -04:00
/// </summary>
public class AuditInfo
{
2022-01-26 11:32:16 -05:00
private string newValue;
private string oldValue;
2020-04-28 17:48:06 -04:00
/// <summary>
2022-01-26 11:32:16 -05:00
/// name of the origin entity
2020-04-28 17:48:06 -04:00
/// </summary>
public string OriginName { get; set; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// id of the origin entity
2020-04-28 17:48:06 -04:00
/// </summary>
public int OriginId { get; set; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// name of the target entity
2020-04-28 17:48:06 -04:00
/// </summary>
public string TargetName { get; set; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// id of the target entity
2020-04-28 17:48:06 -04:00
/// </summary>
public int? TargetId { get; set; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// when the audit event occured
2020-04-28 17:48:06 -04:00
/// </summary>
public DateTime When { get; set; }
2022-01-26 11:32:16 -05:00
2020-04-28 17:48:06 -04:00
/// <summary>
2022-01-26 11:32:16 -05:00
/// what audit action occured
2020-04-28 17:48:06 -04:00
/// </summary>
public string Action { get; set; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// additional comment data about the audit event
2020-04-28 17:48:06 -04:00
/// </summary>
public string Data { get; set; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// previous value
2020-04-28 17:48:06 -04:00
/// </summary>
2022-01-26 11:32:16 -05:00
public string OldValue
{
get => oldValue ?? "--";
set => oldValue = value;
}
2020-04-28 17:48:06 -04:00
/// <summary>
2022-01-26 11:32:16 -05:00
/// new value
2020-04-28 17:48:06 -04:00
/// </summary>
2022-01-26 11:32:16 -05:00
public string NewValue
{
get => newValue ?? "--";
set => newValue = value;
}
2020-04-28 17:48:06 -04:00
}
2022-01-26 11:32:16 -05:00
}