mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 02:55:43 -05:00
e79cadc761
_id field already has created data: http://docs.mongodb.org/manual/reference/object-id/ Also some misc analytics cleanup.
13 lines
661 B
CoffeeScript
13 lines
661 B
CoffeeScript
mongoose = require 'mongoose'
|
|
|
|
AnalyticsPerDaySchema = new mongoose.Schema({
|
|
d: {type: String} # yyyymmdd day, e.g. '20150123'
|
|
e: {type: Number} # event (analytics string ID from analytics.strings)
|
|
l: {type: Number} # level (analytics string ID from analytics.strings)
|
|
f: {type: Number} # filter (analytics string ID from analytics.strings)
|
|
fv: {type: Number} # filter value (analytics string ID from analytics.strings)
|
|
c: {type: Number} # count
|
|
}, {strict: false})
|
|
|
|
# TODO: Why can't we query against a collection with caps, like 'analytics.perDay'?
|
|
module.exports = AnalyticsPerDay = mongoose.model('analytics.perday', AnalyticsPerDaySchema)
|