Implemented Transaction View.
Started Impumenting a Transaction system to create a transaction.
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
package me.zacharias.bank.transaction;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.UUID;
|
||||
|
||||
public class Transaction {
|
||||
double amount;
|
||||
String description;
|
||||
UUID originator;
|
||||
UUID destination;
|
||||
TransactionType type;
|
||||
private double amount;
|
||||
private String description;
|
||||
private UUID originator;
|
||||
private UUID destination;
|
||||
private TransactionType type;
|
||||
private String date;
|
||||
|
||||
public Transaction(double amount, String description, UUID destination, UUID originator, TransactionType type) {
|
||||
this.amount = amount;
|
||||
@@ -15,6 +19,7 @@ public class Transaction {
|
||||
this.originator = originator;
|
||||
this.destination = destination;
|
||||
this.type = type;
|
||||
date = LocalDateTime.now().format(DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm"));
|
||||
}
|
||||
|
||||
public double getAmount() {
|
||||
@@ -36,4 +41,8 @@ public class Transaction {
|
||||
public TransactionType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getDate() {
|
||||
return date;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user