Closed ivybridge-3c33 closed 6 years ago
'use strict'
const BaseModel = use('MongooseModel')
/**
* @class Foo
*/
class Foo extends BaseModel {
static boot ({ schema }) {
// Try to install them here
Game.plugin(lastMod, { index: true });
}
/**
* Foo's schema
*/
static get schema () {
return {
}
}
}
module.exports = Foo.buildModel('Foo')
how can i attach plugin to model? https://mongoosejs.com/docs/plugins.html