2015-06-05 09:48:09 -04:00
|
|
|
c = require './../schemas'
|
|
|
|
|
|
|
|
TrialRequestSchema = c.object {
|
|
|
|
title: 'Trial request',
|
|
|
|
required: ['type']
|
|
|
|
}
|
|
|
|
|
|
|
|
_.extend TrialRequestSchema.properties,
|
|
|
|
applicant: c.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}])
|
2015-11-19 18:20:39 -05:00
|
|
|
created: c.date({readOnly: true})
|
2015-06-05 09:48:09 -04:00
|
|
|
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
|