This explains how to create a node-like entity in Drupal 8. That means that we'll create one configuration entity(FooType) which will serve as type or bundle for our second entity(Foo) which is a content entity and will represent the node itself. The content entity will also support revisions and translations(not yet tested).
2015-04-29 WARNING: This page is more than "needs updating" : most of its content is obsolete, since entity definitions are now provided using annotations-based plugins, the schema is no longer created manually using
hook_schema(), permissions are now defined in
<module>.permissions.yml, some global scope functions in the examples have been removed, and the
<module>.routing.yml format has changed a bit too.