/* © SRSoftware 2025 */
package de.srsoftware.umbrella.accounting;

import de.srsoftware.umbrella.core.model.Account;
import de.srsoftware.umbrella.core.model.Transaction;
import de.srsoftware.umbrella.core.model.UmbrellaUser;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.Set;

public interface AccountDb {
	Transaction dropTransaction(Transaction transaction);

	void dropTransactionTag(long transactionId, String tag);

	Collection<UmbrellaUser> getMembers(long accountId);

	Optional<Transaction> lastTransaction(long accountId, String source, String destination, Double amount);

	Collection<Account> listAccounts(long userId);

	Collection<String> listTags(long accountId, String source, String destination);

	Account loadAccount(long accountId);

	Transaction loadTransaction(long transactionId);

	List<Transaction> loadTransactions(Account account);

	Account save(Account account);

	Transaction save(Transaction transaction);

	Set<String> searchField(long userId, String field, String key);

	Set<String> searchTagsContaining(String key, long accountId);
}
