2014-08-14 14:55:43 -04:00
|
|
|
c = require './../schemas'
|
|
|
|
|
|
|
|
UserCodeProblemSchema = c.object {
|
|
|
|
title: 'User Code Problem'
|
|
|
|
description: 'Data for a problem in user code.'
|
|
|
|
}
|
|
|
|
|
|
|
|
_.extend UserCodeProblemSchema.properties,
|
|
|
|
creator: c.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}])
|
|
|
|
created: c.date({title: 'Created', readOnly: true})
|
|
|
|
|
2014-08-14 18:47:02 -04:00
|
|
|
code: {type: 'string'}
|
|
|
|
codeSnippet: {type: 'string'}
|
|
|
|
errHint: {type: 'string'}
|
|
|
|
errId: {type: 'string'}
|
|
|
|
errLevel: {type: 'string'}
|
|
|
|
errMessage: {type: 'string'}
|
2014-10-24 17:05:51 -04:00
|
|
|
errMessageNoLineInfo: {type: 'string'}
|
2014-08-14 18:47:02 -04:00
|
|
|
errRange: {type: 'array'}
|
|
|
|
errType: {type: 'string'}
|
|
|
|
language: {type: 'string'}
|
|
|
|
levelID: {type: 'string'}
|
2014-08-14 14:55:43 -04:00
|
|
|
|
|
|
|
c.extendBasicProperties UserCodeProblemSchema, 'user.code.problem'
|
|
|
|
|
|
|
|
module.exports = UserCodeProblemSchema
|