package dev.banking.model;

public abstract class Transaction {

    private final int amount;

    protected Transaction(int amount) {

        if (amount <= 0) {
            throw new IllegalArgumentException(
                    "Transaction amount must be positive."
            );
        }

        this.amount = amount;
    }

    public int getAmount() {
        return amount;
    }
}