package dev.banking.model;

public final class TransferTransaction extends Transaction {
    private final long sourceAccountId;
    private final long targetAccountId;

    public TransferTransaction(long source, long target, long amount) {
        super(amount);
        if (source == target) throw new IllegalArgumentException("Accounts must be different.");
        this.sourceAccountId = source;
        this.targetAccountId = target;
    }
    public long getSourceAccountId() { return sourceAccountId; }
    public long getTargetAccountId() { return targetAccountId; }
}