codecombat/app/schemas/models/codelog.schema.coffee
Josh Callebaut c4652d82e2 Implements the SPADE logger into the SpellView
* Updates spade.js vendor file, adds a sublime-project for developers to use
* Moves server logic away from handlers
* Moves session update logic to middleware, sets up server schema to autorender IDs as ObjectIDs
* Modernizes the supermodel loading scheme and switches from constructor to initalize
2016-04-26 09:56:30 -07:00

20 lines
498 B
CoffeeScript

c = require './../schemas'
LevelVersionSchema = c.object {required: ['original', 'majorVersion'], links: [{rel: 'db', href: '/db/level/{(original)}/version/{(majorVersion)}'}]},
original: c.objectId()
majorVersion:
type: 'integer'
minimum: 0
CodeLogSchema =
type: 'object'
properties:
sessionID: c.objectId()
level: LevelVersionSchema
levelSlug: {type:'string'}
userID: c.objectId()
log: {type:'string'}
created: c.date()
module.exports = CodeLogSchema