<?php

namespace MintyPHP\Repository\CustomField;

interface TenantCustomFieldDefinitionRepositoryInterface
{
    /** @return array<int, array<string, mixed>> */
    public function listByTenantId(int $tenantId, bool $onlyActive = true): array;

    /**
     * @param int[] $tenantIds
     * @return array<int, array<string, mixed>>
     */
    public function listByTenantIds(array $tenantIds, bool $onlyActive = true): array;

    /**
     * @param int[] $tenantIds
     * @return array<int, array<string, mixed>>
     */
    public function listFilterableByTenantIds(array $tenantIds): array;

    public function findByUuid(string $uuid): ?array;

    public function findById(int $id): ?array;

    public function findByTenantIdAndKey(int $tenantId, string $fieldKey): ?array;

    public function create(array $data): int|false;

    public function update(int $id, array $data): bool;

    public function delete(int $id): bool;
}
