Skip to content

Commit

Permalink
Merge pull request eventuate-tram#26 from dartartem/master
Browse files Browse the repository at this point in the history
 Added @Version to customer and order entities.
  • Loading branch information
cer authored Mar 25, 2020
2 parents 17836fb + 45387c5 commit 4b18c64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public class Customer {

private Long creationTime;

@Version
private Long version;

Money availableCredit() {
return creditLimit.subtract(creditReservations.values().stream().reduce(Money.ZERO, Money::add));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public class Order {
@Embedded
private OrderDetails orderDetails;

@Version
private Long version;

public Order() {
}

Expand Down

0 comments on commit 4b18c64

Please sign in to comment.