<?php

declare(strict_types=1);

namespace ApiModel\Domain\Repository;

interface ExpenseRepositoryInterface
{
    /** @return list<array<string, mixed>> */
    public function listByCompany(string $companyId, ?string $branchId = null): array;

    /** @return array<string, mixed>|null */
    public function findById(string $id): ?array;

    /** @return list<array<string, mixed>> */
    public function findLinesByExpenseId(string $expenseId): array;

    /** @param array<string, mixed> $expense */
    public function insert(array $expense): void;

    /** @param array<string, mixed> $expense */
    public function update(string $id, array $expense): void;

    /** @param list<array<string, mixed>> $lines */
    public function insertLines(string $expenseId, array $lines): void;

    public function deleteLines(string $expenseId): void;

    public function delete(string $id): void;

    public function nextExpenseNumber(string $companyId): string;
}
