2014-12-15 14:45:12 -05:00
|
|
|
mongoose = require 'mongoose'
|
|
|
|
plugins = require '../plugins/plugins'
|
|
|
|
|
2015-01-14 20:51:04 -05:00
|
|
|
AnalyticsLogEventSchema = new mongoose.Schema({
|
|
|
|
u: mongoose.Schema.Types.ObjectId
|
|
|
|
e: Number # event analytics.string ID
|
|
|
|
p: mongoose.Schema.Types.Mixed
|
|
|
|
|
|
|
|
# TODO: Remove these legacy properties after we stop querying for them (probably 30 days, ~2/16/15)
|
|
|
|
user: mongoose.Schema.Types.ObjectId
|
|
|
|
event: String
|
|
|
|
properties: mongoose.Schema.Types.Mixed
|
|
|
|
}, {strict: false})
|
2015-01-27 13:02:47 -05:00
|
|
|
|
2015-01-14 16:03:02 -05:00
|
|
|
AnalyticsLogEventSchema.index({event: 1, _id: 1})
|
2014-12-15 14:45:12 -05:00
|
|
|
|
|
|
|
module.exports = AnalyticsLogEvent = mongoose.model('analytics.log.event', AnalyticsLogEventSchema)
|