Fixed the bank account aggregate class

This commit is contained in:
Sambo Chea 2020-08-21 11:37:27 +07:00
parent 652355f486
commit 559633e58a

View File

@ -16,14 +16,14 @@ import java.math.BigDecimal
import java.util.UUID
@Aggregate
class BankAccountAggregate(
class BankAccountAggregate() {
@AggregateIdentifier
private var id: UUID? = null,
private var balance: BigDecimal? = null,
private var id: UUID? = null
private var balance: BigDecimal? = null
private var owner: String? = null
) {
@CommandHandler
constructor(command: CreateAccountCommand) {
constructor(command: CreateAccountCommand) : this() {
AggregateLifecycle.apply(
AccountCreatedEvent(
command.accountId,