Best way to define entity and additional custom logic (CRUD) in module
Given that you want to change the formatting of a file field, then I would create a FieldFormatter plugin, which could probably extend FileFormatterBase (or one of its sub classes). This would allow the formatter to be a configurable option for file fields in the Manage Display interface (or as part of a content type configuration YAML that your module provides).

By implementing FormatterInterface::viewElements, you can add to the render array that is returned.

To summarize:


Create a field formatter plugin for file fields in a custom module: drupal generate:plugin:fieldformatter --field-type=file
Create a content type: drupal generate:entity:bundle --bundle-name=company --bundle-title=Company
Add a multiple-value file field to the content type.
Configure the file field to be displayed with your custom field formatter plugin (in Manage Display).


Edit: Added drupal console commands as far as I know them