mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
11 lines
410 B
CoffeeScript
11 lines
410 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)
|