codecombat/app/schemas/models/clan.schema.coffee
Matt Lott 6d892359c7 Private clans UI
Add private checkbox for clan creation.
Add info popover for private clans.
Subscribe prompt for create/join if necessary.
Don’t list private clans in public list.
2015-04-10 14:33:16 -07:00

18 lines
519 B
CoffeeScript

c = require './../schemas'
ClanSchema = c.object {title: 'Clan', required: ['name', 'type']}
c.extendNamedProperties ClanSchema # name first
_.extend ClanSchema.properties,
description: {type: 'string'}
members: c.array {title: 'Members'}, c.objectId()
ownerID: c.objectId()
type: {type: 'string', 'enum': ['public', 'private']}
c.extendBasicProperties ClanSchema, 'Clan'
# Do we need these?
# c.extendSearchableProperties ClanSchema
# c.extendPermissionsProperties ClanSchema
module.exports = ClanSchema