mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 16:17:57 -05:00
12 lines
345 B
CoffeeScript
12 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)
|