proton-model
Advanced tools
Comparing version 1.0.4 to 1.0.5
15
index.js
@@ -9,3 +9,4 @@ 'use strict' | ||
this.options = {} | ||
this._bindToApp() | ||
this.store = this.store() | ||
this._bindToApp() | ||
this.expose() | ||
@@ -19,6 +20,2 @@ } | ||
get name() { | ||
return this.constructor.name | ||
} | ||
schema() { | ||
@@ -33,6 +30,10 @@ return new Error('You must implement the method schema') | ||
_bindToApp() { | ||
this.proton.app.models[this.name] = this | ||
get name() { | ||
return this.constructor.name | ||
} | ||
store() { | ||
return this.app.config.database.store | ||
} | ||
_generateModel() { | ||
@@ -39,0 +40,0 @@ return this.mongoose.model(this.name, this._buildSchema()) |
{ | ||
"name": "proton-model", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
3389
86