package inn.ocsf.bee.freigeld.core.model;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Collection;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Stream;

public interface Bank extends PrivatePerson {

    boolean hasAccount(@NotNull UUID account);

    boolean hasPerson(@NotNull UUID person);

    @NotNull
    BankAccount addAccount(@NotNull UUID person);

    @NotNull
    Collection<BankAccount> getAccounts(@NotNull UUID person);

    @NotNull
    CompletableFuture<IExchangeTicket> exchange(@NotNull BankAccount to, @NotNull BankAccount from, @NotNull Long amount, @Nullable BankExchangeDetails details);

    @NotNull
    Stream<BankAccount> getAccounts();

    BankAccount getAccount(@NotNull UUID accountId);
}
