added timestamp to make AccountDeletedEvent not empty
This commit is contained in:
@@ -7,6 +7,7 @@ import net.chrisrichardson.eventstore.javaexamples.banking.backend.common.accoun
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class Account extends ReflectiveMutableCommandProcessingAggregate<Account, AccountCommand> {
|
||||
@@ -19,7 +20,7 @@ public class Account extends ReflectiveMutableCommandProcessingAggregate<Account
|
||||
}
|
||||
|
||||
public List<Event> process(DeleteAccountCommand cmd) {
|
||||
return EventUtil.events(new AccountDeletedEvent());
|
||||
return EventUtil.events(new AccountDeletedEvent(new Date()));
|
||||
}
|
||||
|
||||
public List<Event> process(DebitAccountCommand cmd) {
|
||||
|
||||
@@ -2,8 +2,24 @@ package net.chrisrichardson.eventstore.javaexamples.banking.backend.common.accou
|
||||
|
||||
import io.eventuate.Event;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class AccountDeletedEvent implements Event {
|
||||
|
||||
private Date timestamp;
|
||||
|
||||
public AccountDeletedEvent() {
|
||||
}
|
||||
|
||||
public AccountDeletedEvent(Date timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
public Date getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
public void setTimestamp(Date timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user