"""Logic layer for account_payee operations.""" from payee.models.account_payee import AccountPayee def get_account_payees_by_ids(account_payee_ids: list[int]) -> dict[int, AccountPayee]: """ Get account_payee entries by IDs in bulk. This function retrieves multiple account_payee records in a single query and returns them as a dictionary for efficient lookup. This design supports future dataloader API integration. Args: account_payee_ids: List of account_payee_id values to retrieve Returns: Dictionary mapping account_payee_id to AccountPayee objects """ if not account_payee_ids: return {} account_payees = AccountPayee.get_payees_by_ids(account_payee_ids) return {payee.account_payee_id: payee for payee in account_payees}