codecombat/app/schemas/models/clan.schema.coffee

20 lines
529 B
CoffeeScript
Raw Normal View History

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