bookshelf-base-model
Base model for bookshelf.
Install
npm install bookshelf-base-model --save
Usage
const knex = ...const bookshelf = knexconst BaseModel = bookshelf const User = BaseModel
Features
Permitted fields
Allow only attributes from fields
hash to go into database.
let user = Useruser
Validation
Add validation to your fields using awesome Checkit module. It supports both sync and async validation. List of all available validators can be found here.
let user = Useruser
Test
npm test
Licence
MIT