2014-08-14 14:55:43 -04:00
|
|
|
mongoose = require 'mongoose'
|
|
|
|
plugins = require '../plugins/plugins'
|
2015-03-21 21:49:32 -04:00
|
|
|
config = require '../../server_config'
|
2014-08-14 14:55:43 -04:00
|
|
|
|
|
|
|
UserCodeProblemSchema = new mongoose.Schema({
|
|
|
|
created:
|
|
|
|
type: Date
|
|
|
|
'default': Date.now
|
2015-03-21 21:49:32 -04:00
|
|
|
}, {strict: false,read:config.mongo.readpref})
|
2014-08-14 14:55:43 -04:00
|
|
|
|
2015-11-14 19:34:35 -05:00
|
|
|
UserCodeProblemSchema.index {levelID: 1, _id: 1}, {name: 'user code problems by level and date index'}
|
|
|
|
|
2014-08-14 14:55:43 -04:00
|
|
|
module.exports = UserCodeProblem = mongoose.model('user.code.problem', UserCodeProblemSchema)
|