2015-04-01 14:56:48 -04:00
|
|
|
c = require './../schemas'
|
|
|
|
|
2015-04-15 14:09:43 -04:00
|
|
|
# TODO: Require name to be non-empty
|
|
|
|
|
2015-04-01 14:56:48 -04:00
|
|
|
ClanSchema = c.object {title: 'Clan', required: ['name', 'type']}
|
|
|
|
c.extendNamedProperties ClanSchema # name first
|
|
|
|
|
|
|
|
_.extend ClanSchema.properties,
|
2015-04-03 17:09:43 -04:00
|
|
|
description: {type: 'string'}
|
2015-04-02 20:00:28 -04:00
|
|
|
members: c.array {title: 'Members'}, c.objectId()
|
2015-04-03 17:09:43 -04:00
|
|
|
ownerID: c.objectId()
|
2015-04-10 17:33:16 -04:00
|
|
|
type: {type: 'string', 'enum': ['public', 'private']}
|
2015-04-01 14:56:48 -04:00
|
|
|
|
|
|
|
c.extendBasicProperties ClanSchema, 'Clan'
|
|
|
|
|
|
|
|
# Do we need these?
|
|
|
|
# c.extendSearchableProperties ClanSchema
|
|
|
|
# c.extendPermissionsProperties ClanSchema
|
|
|
|
|
|
|
|
module.exports = ClanSchema
|