volleyballsimtypes 0.0.73 → 0.0.74
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/dist/cjs/src/data/init-models.js +2 -2
- package/dist/cjs/src/data/models/player.d.ts +22 -22
- package/dist/cjs/src/data/models/team.d.ts +0 -1
- package/dist/cjs/src/data/transformers/team.js +2 -2
- package/dist/esm/src/data/init-models.js +2 -2
- package/dist/esm/src/data/models/player.d.ts +22 -22
- package/dist/esm/src/data/models/team.d.ts +0 -1
- package/dist/esm/src/data/transformers/team.js +2 -2
- package/package.json +1 -1
|
@@ -105,8 +105,8 @@ function initModels(sequelize) {
|
|
|
105
105
|
Player.hasMany(Serve, { as: 'Serves', foreignKey: 'player_id' });
|
|
106
106
|
Player.hasMany(Set, { as: 'Sets', foreignKey: 'player_id' });
|
|
107
107
|
Player.hasMany(Spike, { as: 'Spikes', foreignKey: 'player_id' });
|
|
108
|
-
Player.hasMany(Substitution, { as: '
|
|
109
|
-
Player.hasMany(Substitution, { as: '
|
|
108
|
+
Player.hasMany(Substitution, { as: 'OutSubstitutions', foreignKey: 'player_out' });
|
|
109
|
+
Player.hasMany(Substitution, { as: 'InSubstitutions', foreignKey: 'player_id' });
|
|
110
110
|
Player.hasOne(PerformanceStats, { as: 'PerformanceStat', foreignKey: 'player_id' });
|
|
111
111
|
Player.hasOne(DraftPick, { as: 'DraftPick', foreignKey: 'player_id' });
|
|
112
112
|
Player.hasOne(PlayerTeam, { as: 'PlayerTeam', foreignKey: 'player_id' });
|
|
@@ -238,27 +238,27 @@ export declare class PlayerModel extends Model<PlayerAttributes, PlayerCreationA
|
|
|
238
238
|
hasSpike: Sequelize.HasManyHasAssociationMixin<SpikeModel, SpikeId>;
|
|
239
239
|
hasSpikes: Sequelize.HasManyHasAssociationsMixin<SpikeModel, SpikeId>;
|
|
240
240
|
countSpikes: Sequelize.HasManyCountAssociationsMixin;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
241
|
+
outSubstitutions: SubstitutionModel[];
|
|
242
|
+
getOutSubstitutions: Sequelize.HasManyGetAssociationsMixin<SubstitutionModel>;
|
|
243
|
+
setOutSubstitutions: Sequelize.HasManySetAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
244
|
+
addOutSubstitution: Sequelize.HasManyAddAssociationMixin<SubstitutionModel, SubstitutionId>;
|
|
245
|
+
addOutSubstitutions: Sequelize.HasManyAddAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
246
|
+
createOutSubstitution: Sequelize.HasManyCreateAssociationMixin<SubstitutionModel>;
|
|
247
|
+
removeOutSubstitution: Sequelize.HasManyRemoveAssociationMixin<SubstitutionModel, SubstitutionId>;
|
|
248
|
+
removeOutSubstitutions: Sequelize.HasManyRemoveAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
249
|
+
hasOutSubstitution: Sequelize.HasManyHasAssociationMixin<SubstitutionModel, SubstitutionId>;
|
|
250
|
+
hasOutSubstitutions: Sequelize.HasManyHasAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
251
|
+
countOutSubstitutions: Sequelize.HasManyCountAssociationsMixin;
|
|
252
|
+
InSubstitutions: SubstitutionModel[];
|
|
253
|
+
getInSubstitutions: Sequelize.HasManyGetAssociationsMixin<SubstitutionModel>;
|
|
254
|
+
setInSubstitutions: Sequelize.HasManySetAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
255
|
+
addInSubstitution: Sequelize.HasManyAddAssociationMixin<SubstitutionModel, SubstitutionId>;
|
|
256
|
+
addInSubstitutions: Sequelize.HasManyAddAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
257
|
+
createInSubstitution: Sequelize.HasManyCreateAssociationMixin<SubstitutionModel>;
|
|
258
|
+
removeInSubstitution: Sequelize.HasManyRemoveAssociationMixin<SubstitutionModel, SubstitutionId>;
|
|
259
|
+
removeInSubstitutions: Sequelize.HasManyRemoveAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
260
|
+
hasInSubstitution: Sequelize.HasManyHasAssociationMixin<SubstitutionModel, SubstitutionId>;
|
|
261
|
+
hasInSubstitutions: Sequelize.HasManyHasAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
262
|
+
countInSubstitutions: Sequelize.HasManyCountAssociationsMixin;
|
|
263
263
|
static initModel(sequelize: Sequelize.Sequelize): typeof PlayerModel;
|
|
264
264
|
}
|
|
@@ -26,7 +26,6 @@ export declare class TeamModel extends Model<TeamAttributes, TeamCreationAttribu
|
|
|
26
26
|
league_id: string;
|
|
27
27
|
country_id: string;
|
|
28
28
|
coach: CoachModel;
|
|
29
|
-
Players: PlayerModel[];
|
|
30
29
|
getCoach: Sequelize.BelongsToGetAssociationMixin<CoachModel>;
|
|
31
30
|
setCoach: Sequelize.BelongsToSetAssociationMixin<CoachModel, CoachId>;
|
|
32
31
|
createCoach: Sequelize.BelongsToCreateAssociationMixin<CoachModel>;
|
|
@@ -23,7 +23,7 @@ function transformToObject(team) {
|
|
|
23
23
|
shortName: team.short_name,
|
|
24
24
|
country: team.country != null ? (0, _1.transformToCountry)(team.country) : undefined,
|
|
25
25
|
coach: team.coach != null ? (0, _1.transformToCoach)(team.coach) : undefined,
|
|
26
|
-
roster: team.
|
|
26
|
+
roster: team.PlayerTeams != null ? team.PlayerTeams.map(pt => (0, _1.transformToPlayer)(pt.player)) : [],
|
|
27
27
|
rating: team.rating
|
|
28
28
|
});
|
|
29
29
|
}
|
|
@@ -35,7 +35,7 @@ function transformToAPIObject(team) {
|
|
|
35
35
|
shortName: team.short_name,
|
|
36
36
|
country: team.country != null ? (0, _1.transformToCountry)(team.country) : undefined,
|
|
37
37
|
coach: team.coach != null ? (0, _1.transformToAPICoach)(team.coach) : undefined,
|
|
38
|
-
roster: team.
|
|
38
|
+
roster: team.PlayerTeams != null ? team.PlayerTeams.map(pt => (0, _1.transformToAPIPlayer)(pt.player)) : []
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
exports.transformToAPITeam = transformToAPIObject;
|
|
@@ -102,8 +102,8 @@ export function initModels(sequelize) {
|
|
|
102
102
|
Player.hasMany(Serve, { as: 'Serves', foreignKey: 'player_id' });
|
|
103
103
|
Player.hasMany(Set, { as: 'Sets', foreignKey: 'player_id' });
|
|
104
104
|
Player.hasMany(Spike, { as: 'Spikes', foreignKey: 'player_id' });
|
|
105
|
-
Player.hasMany(Substitution, { as: '
|
|
106
|
-
Player.hasMany(Substitution, { as: '
|
|
105
|
+
Player.hasMany(Substitution, { as: 'OutSubstitutions', foreignKey: 'player_out' });
|
|
106
|
+
Player.hasMany(Substitution, { as: 'InSubstitutions', foreignKey: 'player_id' });
|
|
107
107
|
Player.hasOne(PerformanceStats, { as: 'PerformanceStat', foreignKey: 'player_id' });
|
|
108
108
|
Player.hasOne(DraftPick, { as: 'DraftPick', foreignKey: 'player_id' });
|
|
109
109
|
Player.hasOne(PlayerTeam, { as: 'PlayerTeam', foreignKey: 'player_id' });
|
|
@@ -238,27 +238,27 @@ export declare class PlayerModel extends Model<PlayerAttributes, PlayerCreationA
|
|
|
238
238
|
hasSpike: Sequelize.HasManyHasAssociationMixin<SpikeModel, SpikeId>;
|
|
239
239
|
hasSpikes: Sequelize.HasManyHasAssociationsMixin<SpikeModel, SpikeId>;
|
|
240
240
|
countSpikes: Sequelize.HasManyCountAssociationsMixin;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
241
|
+
outSubstitutions: SubstitutionModel[];
|
|
242
|
+
getOutSubstitutions: Sequelize.HasManyGetAssociationsMixin<SubstitutionModel>;
|
|
243
|
+
setOutSubstitutions: Sequelize.HasManySetAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
244
|
+
addOutSubstitution: Sequelize.HasManyAddAssociationMixin<SubstitutionModel, SubstitutionId>;
|
|
245
|
+
addOutSubstitutions: Sequelize.HasManyAddAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
246
|
+
createOutSubstitution: Sequelize.HasManyCreateAssociationMixin<SubstitutionModel>;
|
|
247
|
+
removeOutSubstitution: Sequelize.HasManyRemoveAssociationMixin<SubstitutionModel, SubstitutionId>;
|
|
248
|
+
removeOutSubstitutions: Sequelize.HasManyRemoveAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
249
|
+
hasOutSubstitution: Sequelize.HasManyHasAssociationMixin<SubstitutionModel, SubstitutionId>;
|
|
250
|
+
hasOutSubstitutions: Sequelize.HasManyHasAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
251
|
+
countOutSubstitutions: Sequelize.HasManyCountAssociationsMixin;
|
|
252
|
+
InSubstitutions: SubstitutionModel[];
|
|
253
|
+
getInSubstitutions: Sequelize.HasManyGetAssociationsMixin<SubstitutionModel>;
|
|
254
|
+
setInSubstitutions: Sequelize.HasManySetAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
255
|
+
addInSubstitution: Sequelize.HasManyAddAssociationMixin<SubstitutionModel, SubstitutionId>;
|
|
256
|
+
addInSubstitutions: Sequelize.HasManyAddAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
257
|
+
createInSubstitution: Sequelize.HasManyCreateAssociationMixin<SubstitutionModel>;
|
|
258
|
+
removeInSubstitution: Sequelize.HasManyRemoveAssociationMixin<SubstitutionModel, SubstitutionId>;
|
|
259
|
+
removeInSubstitutions: Sequelize.HasManyRemoveAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
260
|
+
hasInSubstitution: Sequelize.HasManyHasAssociationMixin<SubstitutionModel, SubstitutionId>;
|
|
261
|
+
hasInSubstitutions: Sequelize.HasManyHasAssociationsMixin<SubstitutionModel, SubstitutionId>;
|
|
262
|
+
countInSubstitutions: Sequelize.HasManyCountAssociationsMixin;
|
|
263
263
|
static initModel(sequelize: Sequelize.Sequelize): typeof PlayerModel;
|
|
264
264
|
}
|
|
@@ -26,7 +26,6 @@ export declare class TeamModel extends Model<TeamAttributes, TeamCreationAttribu
|
|
|
26
26
|
league_id: string;
|
|
27
27
|
country_id: string;
|
|
28
28
|
coach: CoachModel;
|
|
29
|
-
Players: PlayerModel[];
|
|
30
29
|
getCoach: Sequelize.BelongsToGetAssociationMixin<CoachModel>;
|
|
31
30
|
setCoach: Sequelize.BelongsToSetAssociationMixin<CoachModel, CoachId>;
|
|
32
31
|
createCoach: Sequelize.BelongsToCreateAssociationMixin<CoachModel>;
|
|
@@ -19,7 +19,7 @@ function transformToObject(team) {
|
|
|
19
19
|
shortName: team.short_name,
|
|
20
20
|
country: team.country != null ? transformToCountry(team.country) : undefined,
|
|
21
21
|
coach: team.coach != null ? transformToCoach(team.coach) : undefined,
|
|
22
|
-
roster: team.
|
|
22
|
+
roster: team.PlayerTeams != null ? team.PlayerTeams.map(pt => transformToPlayer(pt.player)) : [],
|
|
23
23
|
rating: team.rating
|
|
24
24
|
});
|
|
25
25
|
}
|
|
@@ -30,7 +30,7 @@ function transformToAPIObject(team) {
|
|
|
30
30
|
shortName: team.short_name,
|
|
31
31
|
country: team.country != null ? transformToCountry(team.country) : undefined,
|
|
32
32
|
coach: team.coach != null ? transformToAPICoach(team.coach) : undefined,
|
|
33
|
-
roster: team.
|
|
33
|
+
roster: team.PlayerTeams != null ? team.PlayerTeams.map(pt => transformToAPIPlayer(pt.player)) : []
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
export { transformToObject as transformToTeam, transformToAPIObject as transformToAPITeam, transformToAttributes as transformFromTeam };
|