Fixed the bank account aggregate class
This commit is contained in:
parent
652355f486
commit
559633e58a
@ -16,14 +16,14 @@ import java.math.BigDecimal
|
|||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
|
|
||||||
@Aggregate
|
@Aggregate
|
||||||
class BankAccountAggregate(
|
class BankAccountAggregate() {
|
||||||
@AggregateIdentifier
|
@AggregateIdentifier
|
||||||
private var id: UUID? = null,
|
private var id: UUID? = null
|
||||||
private var balance: BigDecimal? = null,
|
private var balance: BigDecimal? = null
|
||||||
private var owner: String? = null
|
private var owner: String? = null
|
||||||
) {
|
|
||||||
@CommandHandler
|
@CommandHandler
|
||||||
constructor(command: CreateAccountCommand) {
|
constructor(command: CreateAccountCommand) : this() {
|
||||||
AggregateLifecycle.apply(
|
AggregateLifecycle.apply(
|
||||||
AccountCreatedEvent(
|
AccountCreatedEvent(
|
||||||
command.accountId,
|
command.accountId,
|
||||||
|
Loading…
Reference in New Issue
Block a user