codecombat/app/schemas/models/analytics_log_event.coffee

21 lines
635 B
CoffeeScript
Raw Normal View History

2014-12-15 14:45:12 -05:00
c = require './../schemas'
AnalyticsLogEventSchema = c.object {
title: 'Analytics Log Event'
description: 'Analytics event logs.'
}
_.extend AnalyticsLogEventSchema.properties,
u: c.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}])
e: {type: 'integer'}
p: {type: 'object'}
# TODO: Remove these legacy properties after we stop querying for them (probably 30 days, ~2/16/15)
2014-12-15 14:45:12 -05:00
user: c.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}])
event: {type: 'string'}
properties: {type: 'object'}
c.extendBasicProperties AnalyticsLogEventSchema, 'analytics.log.event'
module.exports = AnalyticsLogEventSchema