<?php

declare(strict_types=1);

namespace ApiModel\Domain\Repository;

interface ChartAccountRepositoryInterface
{
    public function findById(string $id): ?array;

    public function findByCode(string $companyId, string $code): ?array;

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

    public function insert(
        string $id,
        string $companyId,
        ?string $parentId,
        string $code,
        string $name,
        string $accountType,
        bool $isHeader
    ): void;

    public function update(
        string $id,
        ?string $parentId,
        string $code,
        string $name,
        string $accountType,
        bool $isHeader,
        bool $isActive
    ): void;

    public function hasChildren(string $id): bool;
}
