codecombat/server/achievements/EarnedAchievement.coffee

19 lines
504 B
CoffeeScript
Raw Normal View History

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
2014-05-18 10:04:50 -04:00
user:
type: mongoose.Schema.Types.ObjectId
ref: 'User'
achievement:
type: mongoose.Schema.Types.ObjectId
ref: 'Achievement'
}, {strict:false})
2014-05-18 10:04:50 -04:00
module.exports = EarnedAchievement = mongoose.model('EarnedAchievement', EarnedAchievementSchema)