feat: add advanced multithreading banking system skeleton
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package dev.banking.model;
|
||||
|
||||
public class Transaction {
|
||||
|
||||
private final TransactionType type;
|
||||
|
||||
private final int sourceAccountId;
|
||||
private final int targetAccountId;
|
||||
|
||||
private final int amount;
|
||||
|
||||
public Transaction(
|
||||
TransactionType type,
|
||||
int sourceAccountId,
|
||||
int targetAccountId,
|
||||
int amount
|
||||
) {
|
||||
this.type = type;
|
||||
this.sourceAccountId = sourceAccountId;
|
||||
this.targetAccountId = targetAccountId;
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public TransactionType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public int getSourceAccountId() {
|
||||
return sourceAccountId;
|
||||
}
|
||||
|
||||
public int getTargetAccountId() {
|
||||
return targetAccountId;
|
||||
}
|
||||
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user