codecombat/app/schemas/models/classroom.schema.coffee
2015-11-02 17:07:23 -08:00

14 lines
438 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")
c.extendBasicProperties ClassroomSchema, 'Classroom'
module.exports = ClassroomSchema