volleyballsimtypes 0.0.37 → 0.0.38
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 +1 -1
- package/dist/cjs/src/data/models/tournament.d.ts +4 -4
- package/dist/cjs/src/data/transformers/tournament.js +1 -1
- package/dist/esm/src/data/init-models.js +1 -1
- package/dist/esm/src/data/models/tournament.d.ts +4 -4
- package/dist/esm/src/data/transformers/tournament.js +1 -1
- package/package.json +1 -1
|
@@ -178,7 +178,7 @@ function initModels(sequelize) {
|
|
|
178
178
|
Tournament.belongsTo(Team, { as: 'Champion', foreignKey: 'champion' });
|
|
179
179
|
Tournament.hasMany(TournamentMatch, { as: 'TournamentMatches', foreignKey: 'tournament_id' });
|
|
180
180
|
TournamentMatch.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
|
|
181
|
-
TournamentMatch.belongsTo(Tournament, { as: '
|
|
181
|
+
TournamentMatch.belongsTo(Tournament, { as: 'tournamentMatch', foreignKey: 'tournament_id' });
|
|
182
182
|
return {
|
|
183
183
|
Block,
|
|
184
184
|
Coach,
|
|
@@ -14,9 +14,9 @@ export type TournamentCreationAttributes = TournamentAttributes;
|
|
|
14
14
|
export declare class TournamentModel extends Model<TournamentAttributes, TournamentCreationAttributes> implements TournamentAttributes {
|
|
15
15
|
tournament_id: string;
|
|
16
16
|
iteration: number;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
TournamentMatches: TournamentMatchModel[];
|
|
18
|
+
getTournamentMatches: Sequelize.HasManyGetAssociationsMixin<TournamentMatchModel>;
|
|
19
|
+
setTournamentMatches: Sequelize.HasManySetAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
|
|
20
20
|
addTournamentMatch: Sequelize.HasManyAddAssociationMixin<TournamentMatchModel, TournamentMatchId>;
|
|
21
21
|
addTournamentMatches: Sequelize.HasManyAddAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
|
|
22
22
|
createTournamentMatch: Sequelize.HasManyCreateAssociationMixin<TournamentMatchModel>;
|
|
@@ -24,7 +24,7 @@ export declare class TournamentModel extends Model<TournamentAttributes, Tournam
|
|
|
24
24
|
removeTournamentMatches: Sequelize.HasManyRemoveAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
|
|
25
25
|
hasTournamentMatch: Sequelize.HasManyHasAssociationMixin<TournamentMatchModel, TournamentMatchId>;
|
|
26
26
|
hasTournamentMatches: Sequelize.HasManyHasAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
|
|
27
|
-
|
|
27
|
+
countTournamentMatches: Sequelize.HasManyCountAssociationsMixin;
|
|
28
28
|
Champion: TeamModel;
|
|
29
29
|
getChampion: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
|
|
30
30
|
setChampion: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
|
|
@@ -19,7 +19,7 @@ function transformToObject(model) {
|
|
|
19
19
|
return new service_1.Tournament({
|
|
20
20
|
id: model.tournament_id,
|
|
21
21
|
iteration: model.iteration,
|
|
22
|
-
matches: model.
|
|
22
|
+
matches: model.TournamentMatches.map(tournament_match_1.transformToTournamentMatch),
|
|
23
23
|
champion: model.Champion != null ? (0, team_1.transformToTeam)(model.Champion) : undefined
|
|
24
24
|
});
|
|
25
25
|
}
|
|
@@ -175,7 +175,7 @@ export function initModels(sequelize) {
|
|
|
175
175
|
Tournament.belongsTo(Team, { as: 'Champion', foreignKey: 'champion' });
|
|
176
176
|
Tournament.hasMany(TournamentMatch, { as: 'TournamentMatches', foreignKey: 'tournament_id' });
|
|
177
177
|
TournamentMatch.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
|
|
178
|
-
TournamentMatch.belongsTo(Tournament, { as: '
|
|
178
|
+
TournamentMatch.belongsTo(Tournament, { as: 'tournamentMatch', foreignKey: 'tournament_id' });
|
|
179
179
|
return {
|
|
180
180
|
Block,
|
|
181
181
|
Coach,
|
|
@@ -14,9 +14,9 @@ export type TournamentCreationAttributes = TournamentAttributes;
|
|
|
14
14
|
export declare class TournamentModel extends Model<TournamentAttributes, TournamentCreationAttributes> implements TournamentAttributes {
|
|
15
15
|
tournament_id: string;
|
|
16
16
|
iteration: number;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
TournamentMatches: TournamentMatchModel[];
|
|
18
|
+
getTournamentMatches: Sequelize.HasManyGetAssociationsMixin<TournamentMatchModel>;
|
|
19
|
+
setTournamentMatches: Sequelize.HasManySetAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
|
|
20
20
|
addTournamentMatch: Sequelize.HasManyAddAssociationMixin<TournamentMatchModel, TournamentMatchId>;
|
|
21
21
|
addTournamentMatches: Sequelize.HasManyAddAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
|
|
22
22
|
createTournamentMatch: Sequelize.HasManyCreateAssociationMixin<TournamentMatchModel>;
|
|
@@ -24,7 +24,7 @@ export declare class TournamentModel extends Model<TournamentAttributes, Tournam
|
|
|
24
24
|
removeTournamentMatches: Sequelize.HasManyRemoveAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
|
|
25
25
|
hasTournamentMatch: Sequelize.HasManyHasAssociationMixin<TournamentMatchModel, TournamentMatchId>;
|
|
26
26
|
hasTournamentMatches: Sequelize.HasManyHasAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
|
|
27
|
-
|
|
27
|
+
countTournamentMatches: Sequelize.HasManyCountAssociationsMixin;
|
|
28
28
|
Champion: TeamModel;
|
|
29
29
|
getChampion: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
|
|
30
30
|
setChampion: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
|
|
@@ -15,7 +15,7 @@ function transformToObject(model) {
|
|
|
15
15
|
return new Tournament({
|
|
16
16
|
id: model.tournament_id,
|
|
17
17
|
iteration: model.iteration,
|
|
18
|
-
matches: model.
|
|
18
|
+
matches: model.TournamentMatches.map(transformToTournamentMatch),
|
|
19
19
|
champion: model.Champion != null ? transformToTeam(model.Champion) : undefined
|
|
20
20
|
});
|
|
21
21
|
}
|