codecombat/server/articles/Article.coffee
Ruben Vereecken fce9f0031b All edits are now tracked
intermediate

intermediate
2014-07-04 19:27:38 +02:00

11 lines
411 B
CoffeeScript

mongoose = require('mongoose')
plugins = require('../plugins/plugins')
ArticleSchema = new mongoose.Schema(body: String, {strict:false})
ArticleSchema.plugin(plugins.NamedPlugin)
ArticleSchema.plugin(plugins.VersionedPlugin)
ArticleSchema.plugin(plugins.SearchablePlugin, {searchable: ['body', 'name']})
ArticleSchema.plugin(plugins.PatchablePlugin)
module.exports = mongoose.model('article', ArticleSchema)