I've created entities and bundles through Entity Construction Kit UI, and now I'm trying to re-create everything with code, in a module. I managed to generate entity with Drupal console, added fields, and everything works well.
The problem is when I try to create bundles for an entity, with different fields. In ECK, I can create an entity, then bundles, and add different fields to each bundle. However, I can't understand how to do it in the code, and after reading tons of documentation, it feels like bundles are only configuration entities and can't have fields.
So my questions are :
- Is there something I don't understand ?
- How can I mimic ECK "bundles with fields" in code ? My goal is to create profiles, like the profile module can do for users, but referenced from an other entity, and with specific behavior, so I'd prefer create my own entities.