codecombat/server/achievements/EarnedAchievement.coffee
2014-06-02 20:29:12 +02:00

19 lines
No EOL
504 B
CoffeeScript

mongoose = require 'mongoose'
jsonschema = require '../../app/schemas/models/earned_achievement'
EarnedAchievementSchema = new mongoose.Schema({
created:
type: Date
default: Date.now
notified:
type: Boolean
default: false
user:
type: mongoose.Schema.Types.ObjectId
ref: 'User'
achievement:
type: mongoose.Schema.Types.ObjectId
ref: 'Achievement'
}, {strict:false})
module.exports = EarnedAchievement = mongoose.model('EarnedAchievement', EarnedAchievementSchema)