SimpleDomainEvent
data class SimpleDomainEvent<T : Any>(val id: String = generateGlobalId(), val header: Header = DefaultHeader.empty(), val body: T, val aggregateId: AggregateId, val ownerId: String = OwnerId.DEFAULT_OWNER_ID, val spaceId: SpaceId = SpaceIdCapable.DEFAULT_SPACE_ID, val version: Int, val sequence: Int = DEFAULT_EVENT_SEQUENCE, val revision: String = DEFAULT_REVISION, val commandId: String, val name: String = body.javaClass.toName(), val isLast: Boolean = true, val createTime: Long = System.currentTimeMillis()) : DomainEvent<T> , NamedAggregate
Simple implementation of DomainEvent.
This data class provides a concrete implementation of the DomainEvent interface, representing a domain event with all required metadata and payload information.
Type Parameters
T
The type of the event body
See also
Constructors
Link copied to clipboard
constructor(id: String = generateGlobalId(), header: Header = DefaultHeader.empty(), body: T, aggregateId: AggregateId, ownerId: String = OwnerId.DEFAULT_OWNER_ID, spaceId: SpaceId = SpaceIdCapable.DEFAULT_SPACE_ID, version: Int, sequence: Int = DEFAULT_EVENT_SEQUENCE, revision: String = DEFAULT_REVISION, commandId: String, name: String = body.javaClass.toName(), isLast: Boolean = true, createTime: Long = System.currentTimeMillis())
Creates a new SimpleDomainEvent with the specified properties