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

24 lines
697 B
CoffeeScript
Raw Normal View History

2015-08-29 10:15:35 -04:00
c = require './../schemas'
CourseInstanceSchema = c.object {
title: 'Course Instance'
required: [
'courseID', 'classroomID', 'members', 'ownerID', 'aceConfig'
]
}
2015-08-29 10:15:35 -04:00
_.extend CourseInstanceSchema.properties,
courseID: c.objectId()
classroomID: c.objectId()
description: {type: 'string'} # deprecated in favor of classrooms?
2015-08-29 10:15:35 -04:00
members: c.array {title: 'Members'}, c.objectId()
name: {type: 'string'} # deprecated in favor of classrooms?
2015-08-29 10:15:35 -04:00
ownerID: c.objectId()
prepaidID: c.objectId() # deprecated
aceConfig:
language: {type: 'string', 'enum': ['python', 'javascript']}
2015-08-29 10:15:35 -04:00
c.extendBasicProperties CourseInstanceSchema, 'CourseInstance'
module.exports = CourseInstanceSchema