import java.io.Serializable;
import java.util.*;

enum TransactionType {

  withdraw, deposit
}

public class Transaction implements Serializable {

  private static long idCounter = 0;
  private Date date;
  private long accountNumber;
  private Employee employee;
  private TransactionType type;
  private double amount;
  private long transactionID;

  public Transaction(BankAccount bankAccount, Employee employee, TransactionType type, double amount) {
    date = new Date();
    this.accountNumber = accountNumber;
    this.employee = employee;
    this.type = type;
    this.amount = amount;
    this.transactionID = idCounter;
    idCounter++;
  }
  public String toString(){
    return "Transaction id: "+transactionID+" amount: "+amount+"type: "+ type.name()+" employeeID: "+employee+ " Date: "+date;
  }
}