<?php

namespace apexl\Io\modules\tabulator\Traits;

trait HasSubEntities
{
    public function getSubEntityFieldsByKey(string $key): array
    {
        $fields = $this->subEntityFields();

        return $fields[$key] ?? [];
    }

    abstract public function subEntityFields(): array;

}
