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,11 @@
using Prefab.Domain.Common;
namespace Prefab.Domain.Events;
/// <summary>
/// Event raised when a generic attribute is added or updated on an entity.
/// </summary>
/// <param name="Entity">The entity that owns the attribute.</param>
/// <param name="Key">The attribute key.</param>
/// <param name="Value">The new attribute value.</param>
public record GenericAttributeAddedOrUpdatedEvent(object Entity, string Key, object Value) : Event;

View File

@@ -0,0 +1,25 @@
using Prefab.Domain.Common;
namespace Prefab.Domain.Events;
/// <summary>
/// Event raised whenever a generic attribute is added, updated, or removed from an entity.
/// </summary>
/// <param name="Entity">The entity that owns the attribute.</param>
/// <param name="Key">The attribute key.</param>
/// <param name="Value">The attribute value involved in the change.</param>
/// <param name="ChangeType">Indicates the type of mutation performed.</param>
public record GenericAttributeChangedEvent(object Entity, string Key, object? Value, GenericAttributeChangeType ChangeType) : Event;
/// <summary>
/// Represents the types of mutations that can occur for a generic attribute.
/// </summary>
public enum GenericAttributeChangeType
{
/// <summary>Attribute was added for the first time.</summary>
Add,
/// <summary>Attribute was updated with a new value.</summary>
Update,
/// <summary>Attribute was removed.</summary>
Remove
}

View File

@@ -0,0 +1,10 @@
using Prefab.Domain.Common;
namespace Prefab.Domain.Events;
/// <summary>
/// Event raised when a generic attribute is removed from an entity.
/// </summary>
/// <param name="Entity">The entity that owned the attribute.</param>
/// <param name="Key">The key that was removed.</param>
public record GenericAttributeRemovedEvent(object Entity, string Key) : Event;