package anthos.samples.financedemo.ledgerwriter;

import java.io.Serializable;

/**
 * Defines a banking transaction.
 */
public class Transaction implements Serializable {

    private static final long serialVersionUID = 1L;

    private final String fromAccountNum;
    private final String fromRoutingNum;
    private final int amount;
    private final long timestamp;

    public Transaction(String fromAccountNum, String fromRoutingNum, int amount) {
        this.fromAccountNum = fromAccountNum;
        this.fromRoutingNum = fromRoutingNum;
        this.amount = amount;
        this.timestamp = System.currentTimeMillis();
    }

    public String getFromAccountNum () {
        return this.fromAccountNum;
    }

    public String getFromRountingNum () {
        return this.fromRoutingNum;
    }

    public int getAmount() {
        return this.amount;
    }

    public long getTimestamp() {
        return this.timestamp;
    }
}

@@ -115,12 +115,55 @@
 on.%0A
+ *%0A * Timestamped at object creation time.%0A
  */%0A
-
 publ
@@ -408,16 +408,22 @@
 imestamp
+Millis
 ;%0A%0A    p
@@ -644,16 +644,22 @@
 imestamp
+Millis
  = Syste
@@ -949,16 +949,22 @@
 imestamp
+Millis
 () %7B%0A   
@@ -989,16 +989,22 @@
 imestamp
+Millis
 ;%0A    %7D%0A

Update ledgerwriter/Transaction timestamp to specify Millis