mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-29 18:45:48 -05:00
f80a73ae9b
Adding dashboardType field, private clans automatically set this to ‘premium’.
21 lines
671 B
CoffeeScript
21 lines
671 B
CoffeeScript
c = require './../schemas'
|
|
|
|
# TODO: Require name to be non-empty
|
|
|
|
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'], description: 'Controls clan general visibility.'}
|
|
dashboardType: {type: 'string', 'enum': ['basic', 'premium']}
|
|
|
|
c.extendBasicProperties ClanSchema, 'Clan'
|
|
|
|
# Do we need these?
|
|
# c.extendSearchableProperties ClanSchema
|
|
# c.extendPermissionsProperties ClanSchema
|
|
|
|
module.exports = ClanSchema
|