MCPcopy Create free account
hub / github.com/codecombat/codecombat / initClass

Method initClass

app/models/Achievement.js:16–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14module.exports = (Achievement = (function () {
15 Achievement = class Achievement extends CocoModel {
16 static initClass () {
17 this.className = 'Achievement'
18 this.schema = require('schemas/models/achievement')
19 this.prototype.urlRoot = '/db/achievement'
20 this.prototype.editableByArtisans = true
21
22 this.styleMapping = {
23 1: 'achievement-wood',
24 2: 'achievement-stone',
25 3: 'achievement-silver',
26 4: 'achievement-gold',
27 5: 'achievement-diamond'
28 }
29
30 this.defaultImageURL = '/images/achievements/default.png'
31 }
32
33 isRepeatable () {
34 return (this.get('proportionalTo') != null)

Callers 1

Achievement.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected