National Public Mania

    egg-ibookshelf

    1.0.1 • Public • Published

    Usage Examples

     
    // [Project]/config/plugin.js
    exports.model = {
      enable: true,
      package: 'egg-ibookshelf',
    };
     
    // [Project]/app/model/user.js  // example
    module.exports = app => {
      return app.bookshelf.Model.extend({
        tableName: 'users',
        ...
      })
    };
     
    // useage
    let User = app.model.User;
    new User({
      ...
    });
     
    User.where({id: 1}).fetch();

    Install

    npm i egg-ibookshelf

    DownloadsWeekly Downloads

    3

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    3.33 kB

    Total Files

    6

    Last publish

    Collaborators

    • callme-zl