codecombat/app/schemas/models/earned_achievement.coffee

31 lines
722 B
CoffeeScript
Raw Normal View History

c = require './../schemas'
module.exports =
EarnedAchievementSchema =
type: 'object'
properties:
user: c.objectId
links:
[
{
rel: 'extra'
2014-06-30 22:16:26 -04:00
href: '/db/user/{($)}'
}
]
achievement: c.objectId
links:
[
{
rel: 'extra'
href: '/db/achievement/{($)}'
}
]
collection: type: 'string'
achievementName: type: 'string'
created: type: 'date'
changed: type: 'date'
achievedAmount: type: 'number'
2014-06-03 16:54:56 -04:00
earnedPoints: type: 'number'
previouslyAchievedAmount: {type: 'number', default: 0}
notified: type: 'boolean'