2014-12-11 14:26:28 -05:00
|
|
|
CocoModel = require './CocoModel'
|
2014-12-16 20:46:24 -05:00
|
|
|
schema = require 'schemas/models/campaign.schema'
|
2014-12-11 14:26:28 -05:00
|
|
|
|
|
|
|
module.exports = class Campaign extends CocoModel
|
|
|
|
@className: 'Campaign'
|
2014-12-16 20:46:24 -05:00
|
|
|
@schema: schema
|
2014-12-11 14:26:28 -05:00
|
|
|
urlRoot: '/db/campaign'
|
|
|
|
saveBackups: true
|
2014-12-22 16:21:57 -05:00
|
|
|
@denormalizedLevelProperties: _.keys(_.omit(schema.properties.levels.additionalProperties.properties, ['unlocks', 'position', 'rewards']))
|
2014-12-19 16:46:01 -05:00
|
|
|
@denormalizedCampaignProperties: ['name', 'i18n', 'description', 'slug']
|