@reldens/skills 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +488 -0
- package/README.md +322 -10
- package/lib/server.js +1 -24
- package/lib/skill.js +4 -4
- package/package.json +3 -4
- package/lib/server/data-server-validator.js +0 -29
- package/lib/server/storage/class-path-generator.js +0 -48
- package/lib/server/storage/conditions-generator.js +0 -29
- package/lib/server/storage/levels-generator.js +0 -41
- package/lib/server/storage/models/mikro-orm/class-path-level-labels-model.js +0 -86
- package/lib/server/storage/models/mikro-orm/class-path-level-skills-model.js +0 -98
- package/lib/server/storage/models/mikro-orm/class-path-model.js +0 -105
- package/lib/server/storage/models/mikro-orm/level-model.js +0 -88
- package/lib/server/storage/models/mikro-orm/level-modifiers-model.js +0 -119
- package/lib/server/storage/models/mikro-orm/levels-set-model.js +0 -79
- package/lib/server/storage/models/mikro-orm/owners-class-path-model.js +0 -79
- package/lib/server/storage/models/mikro-orm/registered-models-mikro-orm.js +0 -39
- package/lib/server/storage/models/mikro-orm/skill-attack-model.js +0 -156
- package/lib/server/storage/models/mikro-orm/skill-group-relation-model.js +0 -82
- package/lib/server/storage/models/mikro-orm/skill-model.js +0 -236
- package/lib/server/storage/models/mikro-orm/skill-owner-conditions-model.js +0 -83
- package/lib/server/storage/models/mikro-orm/skill-owner-effects-model.js +0 -119
- package/lib/server/storage/models/mikro-orm/skill-physical-data-model.js +0 -83
- package/lib/server/storage/models/mikro-orm/skill-target-effects-model.js +0 -125
- package/lib/server/storage/models/mikro-orm/skills-groups-model.js +0 -77
- package/lib/server/storage/models/objection-js/class-path-level-labels-model.js +0 -44
- package/lib/server/storage/models/objection-js/class-path-level-skills-model.js +0 -53
- package/lib/server/storage/models/objection-js/class-path-model.js +0 -85
- package/lib/server/storage/models/objection-js/level-model.js +0 -44
- package/lib/server/storage/models/objection-js/level-modifiers-model.js +0 -35
- package/lib/server/storage/models/objection-js/levels-set-model.js +0 -44
- package/lib/server/storage/models/objection-js/owners-class-path-model.js +0 -35
- package/lib/server/storage/models/objection-js/registered-models-objection-js.js +0 -39
- package/lib/server/storage/models/objection-js/skill-attack-model.js +0 -35
- package/lib/server/storage/models/objection-js/skill-group-relation-model.js +0 -44
- package/lib/server/storage/models/objection-js/skill-model.js +0 -89
- package/lib/server/storage/models/objection-js/skill-owner-conditions-model.js +0 -35
- package/lib/server/storage/models/objection-js/skill-owner-effects-model.js +0 -35
- package/lib/server/storage/models/objection-js/skill-physical-data-model.js +0 -35
- package/lib/server/storage/models/objection-js/skill-target-effects-model.js +0 -35
- package/lib/server/storage/models/objection-js/skills-groups-model.js +0 -35
- package/lib/server/storage/models-manager.js +0 -111
- package/lib/server/storage/modifiers-generator.js +0 -28
- package/lib/server/storage/skills-generator.js +0 -102
- package/lib/server/storage-observer.js +0 -89
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Reldens - Skills - ClassPathLevelSkillsModel
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const { MikroOrmCore } = require('@reldens/storage');
|
|
8
|
-
const { EntitySchema } = MikroOrmCore;
|
|
9
|
-
|
|
10
|
-
class ClassPathLevelSkillsModel
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
beforeDestroyCalled = 0;
|
|
14
|
-
afterDestroyCalled = 0;
|
|
15
|
-
|
|
16
|
-
constructor(class_path_id, level_id, skill_id)
|
|
17
|
-
{
|
|
18
|
-
this.class_path_id = class_path_id;
|
|
19
|
-
this.level_id = level_id;
|
|
20
|
-
this.skill_id = skill_id;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static createByProps(props)
|
|
24
|
-
{
|
|
25
|
-
const {class_path_id, level_id, skill_id} = props;
|
|
26
|
-
return new this(class_path_id, level_id, skill_id);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static relationMappings()
|
|
30
|
-
{
|
|
31
|
-
return {
|
|
32
|
-
class_path: {
|
|
33
|
-
type: 'ClassPathModel',
|
|
34
|
-
entityName: 'classPath',
|
|
35
|
-
reference: 'm:1',
|
|
36
|
-
join: {
|
|
37
|
-
from: 'class_path_id',
|
|
38
|
-
to: 'id'
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
class_path_level: {
|
|
42
|
-
type: 'LevelModel',
|
|
43
|
-
entityName: 'level',
|
|
44
|
-
reference: 'm:1',
|
|
45
|
-
join: {
|
|
46
|
-
from: 'level_id',
|
|
47
|
-
to: 'id'
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
class_path_level_skill: {
|
|
51
|
-
type: 'LevelModel',
|
|
52
|
-
entityName: 'level',
|
|
53
|
-
reference: 'm:1',
|
|
54
|
-
join: {
|
|
55
|
-
from: 'level_id',
|
|
56
|
-
to: 'id'
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const schema = new EntitySchema({
|
|
65
|
-
class: ClassPathLevelSkillsModel,
|
|
66
|
-
properties: {
|
|
67
|
-
_id: {
|
|
68
|
-
primary: true,
|
|
69
|
-
type: 'ObjectID'
|
|
70
|
-
},
|
|
71
|
-
id: {
|
|
72
|
-
type: 'string',
|
|
73
|
-
serializedPrimaryKey: true
|
|
74
|
-
},
|
|
75
|
-
class_path_id: {
|
|
76
|
-
type: 'ClassPathModel',
|
|
77
|
-
reference: 'm:1',
|
|
78
|
-
nullable: true
|
|
79
|
-
},
|
|
80
|
-
level_id: {
|
|
81
|
-
type: 'LevelModel',
|
|
82
|
-
reference: 'm:1',
|
|
83
|
-
nullable: true
|
|
84
|
-
},
|
|
85
|
-
skill_id: {
|
|
86
|
-
type: 'SkillModel',
|
|
87
|
-
reference: 'm:1',
|
|
88
|
-
nullable: true
|
|
89
|
-
},
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
module.exports = {
|
|
95
|
-
ClassPathLevelSkillsModel,
|
|
96
|
-
entity: ClassPathLevelSkillsModel,
|
|
97
|
-
schema
|
|
98
|
-
};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Reldens - Skills - ClassPathModel
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
const { MikroOrmCore } = require('@reldens/storage');
|
|
7
|
-
const { EntitySchema } = MikroOrmCore;
|
|
8
|
-
|
|
9
|
-
class ClassPathModel
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
beforeDestroyCalled = 0;
|
|
13
|
-
afterDestroyCalled = 0;
|
|
14
|
-
|
|
15
|
-
constructor(key, label, levels_set_id)
|
|
16
|
-
{
|
|
17
|
-
this.key = key;
|
|
18
|
-
this.label = label;
|
|
19
|
-
this.levels_set_id = levels_set_id;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
static createByProps(props)
|
|
23
|
-
{
|
|
24
|
-
const {key, label, levels_set_id} = props;
|
|
25
|
-
return new this(key, label, levels_set_id);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
static relationMappings()
|
|
29
|
-
{
|
|
30
|
-
return {
|
|
31
|
-
skills_levels_set: {
|
|
32
|
-
type: 'LevelsSetModel',
|
|
33
|
-
entityName: 'levelsSet',
|
|
34
|
-
reference: 'm:1',
|
|
35
|
-
join: {
|
|
36
|
-
from: 'levels_set_id',
|
|
37
|
-
to: 'id'
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
skills_class_path_level_labels: {
|
|
41
|
-
type: 'ClassPathLevelLabelsModel',
|
|
42
|
-
entityName: 'classPathLevelLabels',
|
|
43
|
-
reference: '1:m',
|
|
44
|
-
join: {
|
|
45
|
-
from: 'id',
|
|
46
|
-
to: 'class_path_id'
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
skills_class_path_level_skills: {
|
|
50
|
-
type: 'ClassPathLevelSkillsModel',
|
|
51
|
-
entityName: 'classPathLevelSkills',
|
|
52
|
-
reference: '1:m',
|
|
53
|
-
join: {
|
|
54
|
-
from: 'id',
|
|
55
|
-
to: 'class_path_id'
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
class_path_for_owner: {
|
|
59
|
-
type: 'OwnersClassPathModel',
|
|
60
|
-
entityName: 'ownersClassPath',
|
|
61
|
-
reference: '1:m',
|
|
62
|
-
join: {
|
|
63
|
-
from: 'id',
|
|
64
|
-
to: 'class_path_id'
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const schema = new EntitySchema({
|
|
73
|
-
class: ClassPathModel,
|
|
74
|
-
properties: {
|
|
75
|
-
_id: {
|
|
76
|
-
primary: true,
|
|
77
|
-
type: 'ObjectID'
|
|
78
|
-
},
|
|
79
|
-
id: {
|
|
80
|
-
type: 'string',
|
|
81
|
-
serializedPrimaryKey: true
|
|
82
|
-
},
|
|
83
|
-
key: {
|
|
84
|
-
type: 'string'
|
|
85
|
-
},
|
|
86
|
-
label: {
|
|
87
|
-
type: 'string'
|
|
88
|
-
},
|
|
89
|
-
levels_set_id: {
|
|
90
|
-
type: 'LevelsSetModel',
|
|
91
|
-
reference: 'm:1',
|
|
92
|
-
nullable: true
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
module.exports = {
|
|
98
|
-
ClassPathModel,
|
|
99
|
-
entity: ClassPathModel,
|
|
100
|
-
schema,
|
|
101
|
-
fullPathData: async (options = {}, driver) => {
|
|
102
|
-
// @TODO - BETA - Fix, this is un-tested, the fullPathData method will be removed.
|
|
103
|
-
return await driver.loadAllWithRelations();
|
|
104
|
-
}
|
|
105
|
-
};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Reldens - Skills - LevelModel
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const { MikroOrmCore } = require('@reldens/storage');
|
|
8
|
-
const { EntitySchema } = MikroOrmCore;
|
|
9
|
-
|
|
10
|
-
class LevelModel
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
beforeDestroyCalled = 0;
|
|
14
|
-
afterDestroyCalled = 0;
|
|
15
|
-
|
|
16
|
-
constructor(key, label, required_experience, levels_set_id)
|
|
17
|
-
{
|
|
18
|
-
this.key = key;
|
|
19
|
-
this.label = label;
|
|
20
|
-
this.required_experience = required_experience;
|
|
21
|
-
this.levels_set_id = levels_set_id;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
static createByProps(props)
|
|
25
|
-
{
|
|
26
|
-
const {key, label, required_experience, levels_set_id} = props;
|
|
27
|
-
return new this(key, label, required_experience, levels_set_id);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static relationMappings()
|
|
31
|
-
{
|
|
32
|
-
return {
|
|
33
|
-
level_set: {
|
|
34
|
-
type: 'LevelsSetModel',
|
|
35
|
-
entityName: 'levelsSet',
|
|
36
|
-
reference: 'm:1',
|
|
37
|
-
join: {
|
|
38
|
-
from: 'level_set_id',
|
|
39
|
-
to: 'id'
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
level_modifiers: {
|
|
43
|
-
type: 'LevelModifiersModel',
|
|
44
|
-
entityName: 'levelModifiers',
|
|
45
|
-
reference: '1:m',
|
|
46
|
-
join: {
|
|
47
|
-
from: 'id',
|
|
48
|
-
to: 'level_id'
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const schema = new EntitySchema({
|
|
57
|
-
class: LevelModel,
|
|
58
|
-
properties: {
|
|
59
|
-
_id: {
|
|
60
|
-
primary: true,
|
|
61
|
-
type: 'ObjectID'
|
|
62
|
-
},
|
|
63
|
-
id: {
|
|
64
|
-
type: 'string',
|
|
65
|
-
serializedPrimaryKey: true
|
|
66
|
-
},
|
|
67
|
-
key: {
|
|
68
|
-
type: 'string'
|
|
69
|
-
},
|
|
70
|
-
label: {
|
|
71
|
-
type: 'string'
|
|
72
|
-
},
|
|
73
|
-
required_experience: {
|
|
74
|
-
type: 'number'
|
|
75
|
-
},
|
|
76
|
-
levels_set_id: {
|
|
77
|
-
type: 'LevelsSetModel',
|
|
78
|
-
reference: 'm:1',
|
|
79
|
-
nullable: true
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
module.exports = {
|
|
85
|
-
LevelModel,
|
|
86
|
-
entity: LevelModel,
|
|
87
|
-
schema
|
|
88
|
-
};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Reldens - Skills - LevelModifiersModel
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const { MikroOrmCore } = require('@reldens/storage');
|
|
8
|
-
const { EntitySchema } = MikroOrmCore;
|
|
9
|
-
|
|
10
|
-
class LevelModifiersModel
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
beforeDestroyCalled = 0;
|
|
14
|
-
afterDestroyCalled = 0;
|
|
15
|
-
|
|
16
|
-
constructor(level_id, key, property_key, operation, value, minValue, maxValue, minProperty, maxProperty)
|
|
17
|
-
{
|
|
18
|
-
this.level_id = level_id;
|
|
19
|
-
this.key = key;
|
|
20
|
-
this.property_key = property_key;
|
|
21
|
-
this.operation = operation;
|
|
22
|
-
this.value = value;
|
|
23
|
-
this.minValue = minValue;
|
|
24
|
-
this.maxValue = maxValue;
|
|
25
|
-
this.minProperty = minProperty;
|
|
26
|
-
this.maxProperty = maxProperty;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static createByProps(props)
|
|
30
|
-
{
|
|
31
|
-
const {
|
|
32
|
-
level_id,
|
|
33
|
-
key,
|
|
34
|
-
property_key,
|
|
35
|
-
operation,
|
|
36
|
-
value,
|
|
37
|
-
minValue,
|
|
38
|
-
maxValue,
|
|
39
|
-
minProperty,
|
|
40
|
-
maxProperty
|
|
41
|
-
} = props;
|
|
42
|
-
return new LevelModifiersModel(
|
|
43
|
-
level_id,
|
|
44
|
-
key,
|
|
45
|
-
property_key,
|
|
46
|
-
operation,
|
|
47
|
-
value,
|
|
48
|
-
minValue,
|
|
49
|
-
maxValue,
|
|
50
|
-
minProperty,
|
|
51
|
-
maxProperty
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
static relationMappings()
|
|
56
|
-
{
|
|
57
|
-
return {
|
|
58
|
-
level_owner: {
|
|
59
|
-
type: 'LevelModel',
|
|
60
|
-
entityName: 'level',
|
|
61
|
-
reference: 'm:1',
|
|
62
|
-
join: {
|
|
63
|
-
from: 'level_id',
|
|
64
|
-
to: 'id'
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const schema = new EntitySchema({
|
|
73
|
-
class: LevelModifiersModel,
|
|
74
|
-
properties: {
|
|
75
|
-
_id: {
|
|
76
|
-
primary: true,
|
|
77
|
-
type: 'ObjectID'
|
|
78
|
-
},
|
|
79
|
-
id: {
|
|
80
|
-
type: 'string',
|
|
81
|
-
serializedPrimaryKey: true
|
|
82
|
-
},
|
|
83
|
-
level_id: {
|
|
84
|
-
reference: 'm:1',
|
|
85
|
-
type: 'LevelModel',
|
|
86
|
-
nullable: true
|
|
87
|
-
},
|
|
88
|
-
key: {
|
|
89
|
-
type: 'string'
|
|
90
|
-
},
|
|
91
|
-
property_key: {
|
|
92
|
-
type: 'string'
|
|
93
|
-
},
|
|
94
|
-
operation: {
|
|
95
|
-
type: 'number'
|
|
96
|
-
},
|
|
97
|
-
value: {
|
|
98
|
-
type: 'string'
|
|
99
|
-
},
|
|
100
|
-
minValue: {
|
|
101
|
-
type: 'string'
|
|
102
|
-
},
|
|
103
|
-
maxValue: {
|
|
104
|
-
type: 'string'
|
|
105
|
-
},
|
|
106
|
-
minProperty: {
|
|
107
|
-
type: 'string'
|
|
108
|
-
},
|
|
109
|
-
maxProperty: {
|
|
110
|
-
type: 'string'
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
module.exports = {
|
|
116
|
-
LevelModifiersModel,
|
|
117
|
-
entity: LevelModifiersModel,
|
|
118
|
-
schema
|
|
119
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Reldens - Skills - LevelsSetModel
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const { MikroOrmCore } = require('@reldens/storage');
|
|
8
|
-
const { EntitySchema } = MikroOrmCore;
|
|
9
|
-
|
|
10
|
-
class LevelsSetModel
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
beforeDestroyCalled = 0;
|
|
14
|
-
afterDestroyCalled = 0;
|
|
15
|
-
|
|
16
|
-
constructor(autoFillRanges, autoFillExperienceMultiplier)
|
|
17
|
-
{
|
|
18
|
-
this.autoFillRanges = autoFillRanges;
|
|
19
|
-
this.autoFillExperienceMultiplier = autoFillExperienceMultiplier;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
static createByProps(props)
|
|
23
|
-
{
|
|
24
|
-
const {autoFillRanges, autoFillExperienceMultiplier} = props;
|
|
25
|
-
return new this(autoFillRanges, autoFillExperienceMultiplier);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
static relationMappings()
|
|
29
|
-
{
|
|
30
|
-
return {
|
|
31
|
-
class_path_id: {
|
|
32
|
-
type: 'ClassPathModel',
|
|
33
|
-
entityName: 'classPath',
|
|
34
|
-
reference: 'm:1',
|
|
35
|
-
join: {
|
|
36
|
-
from: 'id',
|
|
37
|
-
to: 'levels_set_id'
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
skills_levels_set_levels: {
|
|
41
|
-
type: 'LevelModel',
|
|
42
|
-
entityName: 'level',
|
|
43
|
-
reference: '1:m',
|
|
44
|
-
join: {
|
|
45
|
-
from: 'id',
|
|
46
|
-
to: 'level_set_id'
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const schema = new EntitySchema({
|
|
55
|
-
class: LevelsSetModel,
|
|
56
|
-
properties: {
|
|
57
|
-
_id: {
|
|
58
|
-
primary: true,
|
|
59
|
-
type: 'ObjectID'
|
|
60
|
-
},
|
|
61
|
-
id: {
|
|
62
|
-
type: 'string',
|
|
63
|
-
serializedPrimaryKey: true
|
|
64
|
-
},
|
|
65
|
-
autoFillRanges: {
|
|
66
|
-
type: 'boolean',
|
|
67
|
-
isRequired: true
|
|
68
|
-
},
|
|
69
|
-
autoFillExperienceMultiplier: {
|
|
70
|
-
type: 'number'
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
module.exports = {
|
|
76
|
-
LevelsSetModel,
|
|
77
|
-
entity: LevelsSetModel,
|
|
78
|
-
schema
|
|
79
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Reldens - Skills - OwnersClassPathModel
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const { MikroOrmCore } = require('@reldens/storage');
|
|
8
|
-
const { EntitySchema } = MikroOrmCore;
|
|
9
|
-
|
|
10
|
-
class OwnersClassPathModel
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
beforeDestroyCalled = 0;
|
|
14
|
-
afterDestroyCalled = 0;
|
|
15
|
-
|
|
16
|
-
constructor(class_path_id, owner_id, currentLevel, currentExp)
|
|
17
|
-
{
|
|
18
|
-
this.class_path_id = class_path_id;
|
|
19
|
-
this.owner_id = owner_id;
|
|
20
|
-
this.currentLevel = currentLevel;
|
|
21
|
-
this.currentExp = currentExp;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
static createByProps(props)
|
|
25
|
-
{
|
|
26
|
-
const {class_path_id, owner_id, currentLevel, currentExp} = props;
|
|
27
|
-
return new this(class_path_id, owner_id, currentLevel, currentExp);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static relationMappings()
|
|
31
|
-
{
|
|
32
|
-
return {
|
|
33
|
-
owner_full_class_path: {
|
|
34
|
-
type: 'ClassPathModel',
|
|
35
|
-
entityName: 'classPath',
|
|
36
|
-
reference: 'm:1',
|
|
37
|
-
join: {
|
|
38
|
-
from: 'class_path_id',
|
|
39
|
-
to: 'id'
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const schema = new EntitySchema({
|
|
48
|
-
class: OwnersClassPathModel,
|
|
49
|
-
properties: {
|
|
50
|
-
_id: {
|
|
51
|
-
primary: true,
|
|
52
|
-
type: 'ObjectID'
|
|
53
|
-
},
|
|
54
|
-
id: {
|
|
55
|
-
type: 'string',
|
|
56
|
-
serializedPrimaryKey: true
|
|
57
|
-
},
|
|
58
|
-
class_path_id: {
|
|
59
|
-
type: 'ClassPathModel',
|
|
60
|
-
reference: 'm:1',
|
|
61
|
-
nullable: true
|
|
62
|
-
},
|
|
63
|
-
owner_id: {
|
|
64
|
-
type: 'number'
|
|
65
|
-
},
|
|
66
|
-
currentLevel: {
|
|
67
|
-
type: 'number'
|
|
68
|
-
},
|
|
69
|
-
currentExp: {
|
|
70
|
-
type: 'number'
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
module.exports = {
|
|
76
|
-
OwnersClassPathModel,
|
|
77
|
-
entity: OwnersClassPathModel,
|
|
78
|
-
schema
|
|
79
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Reldens - Skills - Registered Entities
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const ClassPathModel = require('./class-path-model');
|
|
8
|
-
const ClassPathLevelLabelsModel = require('./class-path-level-labels-model');
|
|
9
|
-
const ClassPathLevelSkillsModel = require('./class-path-level-skills-model');
|
|
10
|
-
const LevelModel = require('./level-model');
|
|
11
|
-
const LevelModifiersModel = require('./level-modifiers-model');
|
|
12
|
-
const LevelsSetModel = require('./levels-set-model');
|
|
13
|
-
const OwnersClassPathModel = require('./owners-class-path-model');
|
|
14
|
-
const SkillModel = require('./skill-model');
|
|
15
|
-
const SkillAttackModel = require('./skill-attack-model');
|
|
16
|
-
const SkillTargetEffectsModel = require('./skill-target-effects-model');
|
|
17
|
-
const SkillPhysicalDataModel = require('./skill-physical-data-model');
|
|
18
|
-
const SkillGroupRelationModel = require('./skill-group-relation-model');
|
|
19
|
-
const SkillOwnerConditionsModel = require('./skill-owner-conditions-model');
|
|
20
|
-
const SkillOwnerEffectsModel = require('./skill-owner-effects-model');
|
|
21
|
-
const SkillsGroupsModel = require('./skills-groups-model');
|
|
22
|
-
|
|
23
|
-
module.exports.rawRegisteredEntities = {
|
|
24
|
-
classPath: ClassPathModel,
|
|
25
|
-
classPathLevelLabels: ClassPathLevelLabelsModel,
|
|
26
|
-
classPathLevelSkills: ClassPathLevelSkillsModel,
|
|
27
|
-
level: LevelModel,
|
|
28
|
-
levelModifiers: LevelModifiersModel,
|
|
29
|
-
levelsSet: LevelsSetModel,
|
|
30
|
-
ownersClassPath: OwnersClassPathModel,
|
|
31
|
-
skill: SkillModel,
|
|
32
|
-
skillAttack: SkillAttackModel,
|
|
33
|
-
skillTargetEffects: SkillTargetEffectsModel,
|
|
34
|
-
skillPhysicalData: SkillPhysicalDataModel,
|
|
35
|
-
skillGroupRelation: SkillGroupRelationModel,
|
|
36
|
-
skillOwnerConditions: SkillOwnerConditionsModel,
|
|
37
|
-
skillOwnerEffects: SkillOwnerEffectsModel,
|
|
38
|
-
skillGroups: SkillsGroupsModel
|
|
39
|
-
};
|