mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-23 11:27:21 -04:00
21 lines
626 B
CoffeeScript
21 lines
626 B
CoffeeScript
mongoose = require 'mongoose'
|
|
log = require 'winston'
|
|
config = require '../../server_config'
|
|
plugins = require '../plugins/plugins'
|
|
jsonSchema = require '../../app/schemas/models/clan.schema'
|
|
|
|
ClanSchema = new mongoose.Schema {}, {strict: false, minimize: false, read:config.mongo.readpref}
|
|
|
|
ClanSchema.statics.privateProperties = []
|
|
ClanSchema.statics.editableProperties = [
|
|
'type'
|
|
'name'
|
|
'members'
|
|
]
|
|
|
|
ClanSchema.plugin plugins.NamedPlugin
|
|
ClanSchema.plugin plugins.SearchablePlugin, {searchable: ['name']}
|
|
|
|
ClanSchema.statics.jsonSchema = jsonSchema
|
|
|
|
module.exports = Clan = mongoose.model 'clan', ClanSchema, 'clans'
|