| 19 | module.exports = (Campaign = (function () { |
| 20 | Campaign = class Campaign extends CocoModel { |
| 21 | static initClass () { |
| 22 | this.className = 'Campaign' |
| 23 | this.schema = schema |
| 24 | this.prototype.urlRoot = '/db/campaign' |
| 25 | this.denormalizedLevelProperties = _.keys(_.omit(schema.properties.levels.additionalProperties.properties, ['position', 'rewards', 'first', 'nextLevels', 'campaignPage', 'releasePhase', 'moduleNum'])) |
| 26 | // Properties we denormalize from child campaigns (used by CampaignIDNode, etc.). |
| 27 | this.denormalizedCampaignProperties = ['name', 'fullName', 'i18n', 'slug', 'description'] |
| 28 | this.nextLevelProperties = ['original', 'name', 'slug', 'type', 'permissions'] |
| 29 | } |
| 30 | |
| 31 | initialize (options) { |
| 32 | if (options == null) { options = {} } |