Event class abstract
Base class for all events in the event sourcing system Events represent immutable facts that have occurred and are stored permanently
Constructors
Properties
- correlationId → String
-
The correlation ID of the message.
no setter
- eventId → String
-
Unique identifier for this event
Used for deduplication and correlation
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
-
metadata
→ Map<
String, dynamic> -
Additional metadata for the event
Can include correlation IDs, causation IDs, user context, etc.
no setter
-
persistableMetadata
→ Map<
String, dynamic> -
metadata as it is persisted: transient
ActorRefentries removed.no setter - replyTo → ActorRef?
-
The actor to reply to, if a live
ActorRefwas placed inmetadata['replyTo'].no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timestamp → DateTime
-
Timestamp when the event occurred
no setter
- typeName → String
-
Stable identity of this event type in storage.
no setter
- version → int
-
Version/sequence number of this event within its aggregate
Used for ordering and optimistic concurrency control
no setter
Methods
-
getValidationErrors(
) → List< String> - Get validation errors Override in subclasses to provide specific error messages
-
isValid(
) → bool - Validate the event Override in subclasses for custom validation
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toCbor(
) → List< int> - Serialize event to CBOR bytes
-
toMap(
) → Map< String, dynamic> - Convert event to a map for serialization.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override