mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 10:56:53 -05:00
Updated Add a Mongoose Model (markdown)
parent
8f990f9114
commit
33f29add20
1 changed files with 3 additions and 1 deletions
|
@ -29,7 +29,9 @@ SomeModelSchema = new mongoose.Schema({
|
|||
# 2. Install plugins. These add common schema properties, indexes and
|
||||
# functions to the schema.
|
||||
SomeModelSchema.plugin(plugins.NamedPlugin)
|
||||
SomeModelSchema.plugin(plugins.SearchablePlugin, {searchable: ['name', 'description']})
|
||||
SomeModelSchema.plugin(plugins.SearchablePlugin, {
|
||||
searchable: ['name', 'description']
|
||||
})
|
||||
|
||||
|
||||
# 3. Add common static properties.
|
||||
|
|
Loading…
Reference in a new issue