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

17 lines
605 B
CoffeeScript

c = require './../schemas'
ClassroomSchema = c.object {title: 'Classroom', required: ['name']}
c.extendNamedProperties ClassroomSchema # name first
_.extend ClassroomSchema.properties,
members: c.array {title: 'Members'}, c.objectId()
ownerID: c.objectId()
description: {type: 'string'}
code: c.shortString(title: "Unique code to redeem")
codeCamel: c.shortString(title: "UpperCamelCase version of code for display purposes")
aceConfig:
language: {type: 'string', 'enum': ['python', 'javascript']}
c.extendBasicProperties ClassroomSchema, 'Classroom'
module.exports = ClassroomSchema