mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-19 20:12:43 -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)
|