Init
This commit is contained in:
39
Prefab/Data/Entities/AuditLog.cs
Normal file
39
Prefab/Data/Entities/AuditLog.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Prefab.Domain.Common;
|
||||
|
||||
namespace Prefab.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an audit log entry that captures an entity state transition.
|
||||
/// </summary>
|
||||
public class AuditLog : Entity<int>, ICreated
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the correlation identifier tying related audit events together.
|
||||
/// </summary>
|
||||
public Guid CorrelationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the fully qualified entity name that generated the audit record.
|
||||
/// </summary>
|
||||
public string Entity { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the serialized state of the entity when the audit was captured.
|
||||
/// </summary>
|
||||
public string State { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the collection of field-level changes associated with the audit.
|
||||
/// </summary>
|
||||
public virtual ICollection<AuditLogItem> Items { get; set; } = new List<AuditLogItem>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier of the user who triggered the change.
|
||||
/// </summary>
|
||||
public Guid CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp when the change occurred.
|
||||
/// </summary>
|
||||
public DateTimeOffset CreatedOn { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user