UNPKG

wejsv2old-plugin-rating

Version:
32 lines (30 loc) 523 B
/** * RatingManager * * @module :: RatingManager * @description :: Manage where rating is allowed * */ module.exports = { schema: true, types: { isModel: function(model){ if (!model) return false; return Object.keys(sails.models).indexOf(model) > -1; } }, attributes: { modelName: { type: 'string', isModel: true }, vocabulary: { model: 'vocabulary', required: true }, active: { type: 'boolean', defaultsTo: true } } };