public function getAttributes()
    {
        $interfaces = $this->interfaces();

        $attributes = array_merge(
            $this->attributes(),
            [
                'fields' => function () {
                    return $this->getFields();
                },
            ]
        );

        if (!empty($interfaces)) {
            $attributes['interfaces'] = $interfaces;
        }

        return $attributes;
    }