2014-02-25 00:28:18 +04:00
|
|
|
var ghostBookshelf = require('./base'),
|
|
|
|
AppField,
|
|
|
|
AppFields;
|
|
|
|
|
|
|
|
AppField = ghostBookshelf.Model.extend({
|
|
|
|
tableName: 'app_fields',
|
|
|
|
|
2015-06-14 18:58:49 +03:00
|
|
|
post: function post() {
|
2014-07-13 15:17:18 +04:00
|
|
|
return this.morphOne('Post', 'relatable');
|
2014-02-25 00:28:18 +04:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
AppFields = ghostBookshelf.Collection.extend({
|
|
|
|
model: AppField
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = {
|
2014-07-13 15:17:18 +04:00
|
|
|
AppField: ghostBookshelf.model('AppField', AppField),
|
|
|
|
AppFields: ghostBookshelf.collection('AppFields', AppFields)
|
2014-09-10 08:06:24 +04:00
|
|
|
};
|