mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 10:06:08 -05:00
13 lines
345 B
CoffeeScript
13 lines
345 B
CoffeeScript
|
mongoose = require('mongoose')
|
||
|
plugins = require('./plugins')
|
||
|
|
||
|
ArticleSchema = new mongoose.Schema(
|
||
|
body: String,
|
||
|
)
|
||
|
|
||
|
ArticleSchema.plugin(plugins.NamedPlugin)
|
||
|
ArticleSchema.plugin(plugins.VersionedPlugin)
|
||
|
ArticleSchema.plugin(plugins.SearchablePlugin, {searchable: ['body', 'name']})
|
||
|
|
||
|
module.exports = mongoose.model('article', ArticleSchema)
|