codecombat/app/schemas/models/trial_request.schema.coffee
Matt Lott d7cddcb136 Teacher trial subscription form
Add a teacher survey form for applying for a free trial subscription
for evaluation purposes.
Add an admin trial requests review page, where admins can approve/deny
requests.
2015-06-05 06:48:19 -07:00

18 lines
659 B
CoffeeScript

c = require './../schemas'
TrialRequestSchema = c.object {
title: 'Trial request',
required: ['type']
}
_.extend TrialRequestSchema.properties,
applicant: c.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}])
prepaidCode: c.objectId()
reviewDate: c.date({readOnly: true})
reviewer: c.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}])
properties: {type: 'object', description: 'Data specific to this request.'}
status: {type: 'string', 'enum': ['submitted', 'approved', 'denied']}
type: {type: 'string', 'enum': ['subscription']}
c.extendBasicProperties TrialRequestSchema, 'TrialRequest'
module.exports = TrialRequestSchema