<?php

declare(strict_types=1);

namespace ApiModel\Domain\Repository;

interface ExchangeRateRepositoryInterface
{
    public function findRate(string $companyId, string $date, string $fromCurrency, string $toCurrency): ?array;

    public function upsert(string $companyId, string $date, string $fromCurrency, string $toCurrency, string $rate): void;

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

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

    public function delete(string $id): void;
}
