toDomainEvent

fun <T : Any> T.toDomainEvent(aggregateId: AggregateId, commandId: String, id: String = generateGlobalId(), version: Int = Version.INITIAL_VERSION, sequence: Int = DEFAULT_EVENT_SEQUENCE, isLast: Boolean = true, header: Header = DefaultHeader.empty(), createTime: Long = System.currentTimeMillis()): DomainEvent<T>
fun <T : Any> T.toDomainEvent(aggregateId: String, tenantId: String, commandId: String, id: String = generateGlobalId(), version: Int = Version.INITIAL_VERSION, sequence: Int = DEFAULT_EVENT_SEQUENCE, isLast: Boolean = true, header: Header = DefaultHeader.empty(), createTime: Long = System.currentTimeMillis()): DomainEvent<T>