codecombat/app/schemas/models/course.schema.coffee
Matt Lott 9131d8668f Course enroll page
Will add a prepaid purchase once the prepaid-v2 branch is merged into
master.
2015-09-03 11:04:52 -07:00

15 lines
552 B
CoffeeScript

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'}
pricePerSeat: {type: 'number', description: 'Price per seat in USD cents.'}
screenshot: c.url {title: 'URL', description: 'Link to course screenshot.'}
c.extendBasicProperties CourseSchema, 'Course'
module.exports = CourseSchema