Ghost/core/server/models/app-field.js

21 lines
444 B
JavaScript
Raw Normal View History

var ghostBookshelf = require('./base'),
AppField,
AppFields;
AppField = ghostBookshelf.Model.extend({
tableName: 'app_fields',
post: function () {
return this.morphOne('Post', 'relatable');
}
});
AppFields = ghostBookshelf.Collection.extend({
model: AppField
});
module.exports = {
AppField: ghostBookshelf.model('AppField', AppField),
AppFields: ghostBookshelf.collection('AppFields', AppFields)
};