This commit is contained in:
2025-10-27 17:39:18 -04:00
commit 31f723bea4
1579 changed files with 642409 additions and 0 deletions

View 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; }
}