How to add a new entity in CiviCRM extension
You need to install civicrm using buildkit to ensure you have all the dependencies / tools / files.
Then have a look here: https://docs.civicrm.org/dev/en/master/extensions/civix/

Examples of extensions that have done it (see ./bin/setup.sh for a scripted method of DAO creation): https://github.com/civicrm/org.civicrm.volunteer
And https://github.com/3sd/civicrm-sms-conversations/