How use Doctrine?

Before, I used Model class for working with a database.
class MyClass extends Model { }

Now, C5 5.7 have Doctrine, how use it?
Can you show examples?
Read the official Doctrine documentation did not help me((

I need similar like this

View Replies:
Mainio replied on at Permalink Reply
We've created an example implementation here:

It currently uses this to handle all the database installations / migrations / etc.

But we're currently in the process of trying to get that into the core: