2015-08-29 10:15:35 -04:00
|
|
|
c = require './../schemas'
|
|
|
|
|
|
|
|
CourseSchema = c.object {title: 'Course', required: ['name']}
|
|
|
|
c.extendNamedProperties CourseSchema # name first
|
|
|
|
|
|
|
|
_.extend CourseSchema.properties,
|
|
|
|
campaignID: c.objectId()
|
|
|
|
concepts: c.array {title: 'Programming Concepts', uniqueItems: true}, c.concept
|
|
|
|
description: {type: 'string'}
|
2015-09-03 14:04:40 -04:00
|
|
|
pricePerSeat: {type: 'number', description: 'Price per seat in USD cents.'}
|
2015-08-29 10:15:35 -04:00
|
|
|
screenshot: c.url {title: 'URL', description: 'Link to course screenshot.'}
|
|
|
|
|
|
|
|
c.extendBasicProperties CourseSchema, 'Course'
|
|
|
|
|
|
|
|
module.exports = CourseSchema
|