Drupal 8 custom module: How to extend user entity

I’m building a small custom module and I should somehow extend default user entity by adding about 20 more fields to it. I’ve read this (https://www.drupal.org/node/2629550) but it doesn’t really explain how to “inherit” from some class.

I located User class definitions from Drupal folder (drupal-8.1.8coremodulesusersrcEntityUser.php). There I can see field definitions but that’s not right place to do modification for sure 🙂

Also, I suppose I should add User module as a dependency to my custom module, even though user module is part of the core?

I should also be able to create few more user roles in addition to Admin and Authenticated user that comes out of the box. I think I saw some article about that in Drupal.org and it’s not in the scope of this question anyway but if you have some good resources feel free to share.

Thank you for you patience.

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed