adobnikar / bookshelf-eloquent

Bookshelf extension that adds functionality of eloquent.
MIT License
30 stars 8 forks source link

How to create a model? #5

Closed jeffersonest closed 6 years ago

jeffersonest commented 6 years ago

How to create a models?

adobnikar commented 6 years ago

Thanks for your question. I have put together an example. I hope it helps. I have also published this example in the readme of this repository.

The example contains migrations, models and a config .env file. The main.js file contains code that creates a user and a group and then fetches the data from the database and prints it out.

Steps:

For more examples you can check out the test files in this repository.