2014-12-11 14:26:28 -05:00
|
|
|
mongoose = require 'mongoose'
|
|
|
|
plugins = require '../plugins/plugins'
|
|
|
|
|
2015-01-09 21:30:05 -05:00
|
|
|
CampaignSchema = new mongoose.Schema(body: String, {strict: false})
|
2014-12-11 14:26:28 -05:00
|
|
|
|
2015-01-27 13:02:47 -05:00
|
|
|
CampaignSchema.index({i18nCoverage: 1}, {name: 'translation coverage index', sparse: true})
|
|
|
|
CampaignSchema.index({slug: 1}, {name: 'slug index', sparse: true, unique: true})
|
|
|
|
|
2014-12-11 14:26:28 -05:00
|
|
|
CampaignSchema.plugin(plugins.NamedPlugin)
|
|
|
|
CampaignSchema.plugin(plugins.TranslationCoveragePlugin)
|
2015-02-05 15:01:19 -05:00
|
|
|
CampaignSchema.plugin plugins.PatchablePlugin
|
2014-12-11 14:26:28 -05:00
|
|
|
|
|
|
|
module.exports = mongoose.model('campaign', CampaignSchema)
|