How do I create a base content type and subtypes ("bundles")?
Creating entity is quite complicated, but it will be easier if you generate a base code with Drupal console command first.

drupal generate:entity:content [options]



  Options
  
  
  --module  The Module name.
  --entity-class    The content entity class
  --entity-name The content entity name
  --base-path   The base-path for the content entity routes
  --label   The label
  --has-bundles Entity has bundles
  --is-translatable Content entity translatable
  




I post some useful tutorial / documentation here:


https://www.acquia.com/resources/webinars/creating-custom-entities-drupal-8
https://www.drupal.org/developing/api/entity