bookshelf-plugin-mode
bookshelf-plugin-mode is inspired by visibility plugin, providing functionality to specify different modes with corresponding visible/hidden fields of model.
install
npm install --save bookshelf-plugin-mode
usage
add plugin
var mode = ;bookshelf;
define model modes
const User = bookshelfModel;
mode(...)
in query
use ;// {name: "username", tel: "user_tel", email: "user_email};// {name: "username, tel: "user_tel"}
mode
in related
use ;