2014-02-25 00:28:18 +04:00
|
|
|
var ghostBookshelf = require('./base'),
|
|
|
|
AppField,
|
|
|
|
AppFields;
|
|
|
|
|
|
|
|
AppField = ghostBookshelf.Model.extend({
|
|
|
|
tableName: 'app_fields',
|
|
|
|
|
|
|
|
post: function () {
|
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-02-25 00:28:18 +04:00
|
|
|
};
|