volleyballsimtypes 0.0.30 → 0.0.32

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.
Files changed (31) hide show
  1. package/dist/cjs/src/data/index.d.ts +2 -2
  2. package/dist/cjs/src/data/index.js +2 -2
  3. package/dist/cjs/src/data/init-models.d.ts +2 -2
  4. package/dist/cjs/src/data/init-models.js +116 -116
  5. package/dist/cjs/src/data/models/index.d.ts +2 -2
  6. package/dist/cjs/src/data/models/index.js +3 -3
  7. package/dist/cjs/src/data/models/season.d.ts +0 -1
  8. package/dist/cjs/src/data/models/team.d.ts +1 -0
  9. package/dist/cjs/src/data/models/{tournament-match.d.ts → tournament-matches.d.ts} +6 -6
  10. package/dist/cjs/src/data/models/{tournament-match.js → tournament-matches.js} +6 -6
  11. package/dist/cjs/src/data/models/tournament.d.ts +24 -14
  12. package/dist/cjs/src/data/transformers/tournament-match.d.ts +4 -4
  13. package/dist/cjs/src/data/transformers/tournament.js +5 -3
  14. package/dist/cjs/src/index.d.ts +2 -2
  15. package/dist/cjs/src/index.js +2 -2
  16. package/dist/esm/src/data/index.d.ts +2 -2
  17. package/dist/esm/src/data/index.js +2 -2
  18. package/dist/esm/src/data/init-models.d.ts +2 -2
  19. package/dist/esm/src/data/init-models.js +117 -117
  20. package/dist/esm/src/data/models/index.d.ts +2 -2
  21. package/dist/esm/src/data/models/index.js +2 -2
  22. package/dist/esm/src/data/models/season.d.ts +0 -1
  23. package/dist/esm/src/data/models/team.d.ts +1 -0
  24. package/dist/esm/src/data/models/{tournament-match.d.ts → tournament-matches.d.ts} +6 -6
  25. package/dist/esm/src/data/models/{tournament-match.js → tournament-matches.js} +4 -4
  26. package/dist/esm/src/data/models/tournament.d.ts +24 -14
  27. package/dist/esm/src/data/transformers/tournament-match.d.ts +4 -4
  28. package/dist/esm/src/data/transformers/tournament.js +6 -4
  29. package/dist/esm/src/index.d.ts +2 -2
  30. package/dist/esm/src/index.js +2 -2
  31. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, LeagueAttributes, LeagueCreationAttributes, LeagueId, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementModel, LiberoReplacementPk, MatchAttributes, MatchCreationAttributes, MatchId, MatchModel, MatchPk, MatchSetAttributes, MatchSetCreationAttributes, MatchSetId, MatchSetModel, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsModel, MatchSetStatsOptionalAttributes, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerAttributes, PlayerCreationAttributes, PlayerId, PlayerModel, PlayerPk, RallyAttributes, RallyCreationAttributes, RallyId, RallyModel, RallyPk, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPositionId, RallyPositionModel, RallyPositionPk, ReceptionAttributes, ReceptionCreationAttributes, ReceptionId, ReceptionModel, ReceptionPk, RoleType, ScoreAttributes, ScoreCreationAttributes, ScoreId, ScoreModel, ScorePk, SeasonAttributes, SeasonCreationAttributes, SeasonId, SeasonMatchesAttributes, SeasonMatchesCreationAttributes, SeasonMatchesId, SeasonMatchesModel, SeasonMatchesPk, SeasonModel, SeasonPk, SeasonTeamsAttributes, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonTeamsPk, ServeAttributes, ServeCreationAttributes, ServeId, ServeModel, ServePk, SetAttributes, SetCreationAttributes, SetId, SetModel, SetPk, SpikeAttributes, SpikeCreationAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionAttributes, SubstitutionCreationAttributes, SubstitutionId, SubstitutionModel, SubstitutionPk, TeamAttributes, TeamCreationAttributes, TeamId, TeamModel, TeamPk, TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentMatchAttributes, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchModel, TournamentMatchPk, TournamentModel, TournamentPk, TournamentStage, TraitType } from './models';
1
+ import { BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, LeagueAttributes, LeagueCreationAttributes, LeagueId, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementModel, LiberoReplacementPk, MatchAttributes, MatchCreationAttributes, MatchId, MatchModel, MatchPk, MatchSetAttributes, MatchSetCreationAttributes, MatchSetId, MatchSetModel, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsModel, MatchSetStatsOptionalAttributes, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerAttributes, PlayerCreationAttributes, PlayerId, PlayerModel, PlayerPk, RallyAttributes, RallyCreationAttributes, RallyId, RallyModel, RallyPk, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPositionId, RallyPositionModel, RallyPositionPk, ReceptionAttributes, ReceptionCreationAttributes, ReceptionId, ReceptionModel, ReceptionPk, RoleType, ScoreAttributes, ScoreCreationAttributes, ScoreId, ScoreModel, ScorePk, SeasonAttributes, SeasonCreationAttributes, SeasonId, SeasonMatchesAttributes, SeasonMatchesCreationAttributes, SeasonMatchesId, SeasonMatchesModel, SeasonMatchesPk, SeasonModel, SeasonPk, SeasonTeamsAttributes, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonTeamsPk, ServeAttributes, ServeCreationAttributes, ServeId, ServeModel, ServePk, SetAttributes, SetCreationAttributes, SetId, SetModel, SetPk, SpikeAttributes, SpikeCreationAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionAttributes, SubstitutionCreationAttributes, SubstitutionId, SubstitutionModel, SubstitutionPk, TeamAttributes, TeamCreationAttributes, TeamId, TeamModel, TeamPk, TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentMatchesAttributes, TournamentMatchesCreationAttributes, TournamentMatchesId, TournamentMatchesModel, TournamentMatchesPk, TournamentModel, TournamentPk, TournamentStage, TraitType } from './models';
2
2
  import { transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromStage, transformFromSubstitution, transformFromTeam, transformFromTournament, transformFromTournamentMatch, transformFromTrait, transformToAPIBlock, transformToAPICoach, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITournament, transformToAPITournamentMatch, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToStage, transformToSubstitution, transformToTeam, transformToTournament, transformToTournamentMatch, transformToTrait } from './transformers';
3
3
  import { initModels } from './init-models';
4
- export { initModels, transformToStage, transformFromStage, SeasonMatchesModel, SeasonMatchesAttributes, SeasonMatchesCreationAttributes, SeasonMatchesId, SeasonMatchesPk, TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk, TournamentMatchAttributes, TournamentMatchModel, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentStage, BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, LeagueAttributes, LeagueCreationAttributes, LeagueId, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementModel, LiberoReplacementPk, MatchAttributes, MatchCreationAttributes, MatchId, MatchModel, MatchPk, MatchSetAttributes, MatchSetCreationAttributes, MatchSetId, MatchSetModel, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsModel, MatchSetStatsOptionalAttributes, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerAttributes, PlayerCreationAttributes, PlayerId, PlayerModel, PlayerPk, RallyAttributes, RallyCreationAttributes, RallyId, RallyModel, RallyPk, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPositionId, RallyPositionModel, RallyPositionPk, ReceptionAttributes, ReceptionCreationAttributes, ReceptionId, ReceptionModel, ReceptionPk, RoleType, ScoreAttributes, ScoreCreationAttributes, ScoreId, ScoreModel, ScorePk, SeasonAttributes, SeasonCreationAttributes, SeasonId, SeasonModel, SeasonPk, SeasonTeamsAttributes, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonTeamsPk, ServeAttributes, ServeCreationAttributes, ServeId, ServeModel, ServePk, SetAttributes, SetCreationAttributes, SetId, SetModel, SetPk, SpikeAttributes, SpikeCreationAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionAttributes, SubstitutionCreationAttributes, SubstitutionId, SubstitutionModel, SubstitutionPk, TeamAttributes, TeamCreationAttributes, TeamId, TeamModel, TeamPk, TraitType, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromSubstitution, transformFromTeam, transformFromTrait, transformToAPIBlock, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToAPICoach, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch };
4
+ export { initModels, transformToStage, transformFromStage, SeasonMatchesModel, SeasonMatchesAttributes, SeasonMatchesCreationAttributes, SeasonMatchesId, SeasonMatchesPk, TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk, TournamentMatchesAttributes, TournamentMatchesModel, TournamentMatchesCreationAttributes, TournamentMatchesId, TournamentMatchesPk, TournamentStage, BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, LeagueAttributes, LeagueCreationAttributes, LeagueId, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementModel, LiberoReplacementPk, MatchAttributes, MatchCreationAttributes, MatchId, MatchModel, MatchPk, MatchSetAttributes, MatchSetCreationAttributes, MatchSetId, MatchSetModel, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsModel, MatchSetStatsOptionalAttributes, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerAttributes, PlayerCreationAttributes, PlayerId, PlayerModel, PlayerPk, RallyAttributes, RallyCreationAttributes, RallyId, RallyModel, RallyPk, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPositionId, RallyPositionModel, RallyPositionPk, ReceptionAttributes, ReceptionCreationAttributes, ReceptionId, ReceptionModel, ReceptionPk, RoleType, ScoreAttributes, ScoreCreationAttributes, ScoreId, ScoreModel, ScorePk, SeasonAttributes, SeasonCreationAttributes, SeasonId, SeasonModel, SeasonPk, SeasonTeamsAttributes, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonTeamsPk, ServeAttributes, ServeCreationAttributes, ServeId, ServeModel, ServePk, SetAttributes, SetCreationAttributes, SetId, SetModel, SetPk, SpikeAttributes, SpikeCreationAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionAttributes, SubstitutionCreationAttributes, SubstitutionId, SubstitutionModel, SubstitutionPk, TeamAttributes, TeamCreationAttributes, TeamId, TeamModel, TeamPk, TraitType, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromSubstitution, transformFromTeam, transformFromTrait, transformToAPIBlock, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPISubstitution, transformToAPITeam, transformToAPITrait, transformToBlock, transformToCoach, transformToCountry, transformToCourtPosition, transformToCourtTarget, transformToEventType, transformToFormation, transformToLeague, transformToLiberoReplacement, transformToAPICoach, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transformFromSet = exports.transformFromServe = exports.transformFromSeason = exports.transformFromScore = exports.transformFromRole = exports.transformFromReception = exports.transformFromRally = exports.transformFromPlayerPosition = exports.transformFromPlayer = exports.transformFromPerformanceStats = exports.transformFromMatchSetStats = exports.transformFromMatchSet = exports.transformFromMatch = exports.transformFromLiberoReplacement = exports.transformFromLeague = exports.transformFromFormation = exports.transformFromEventType = exports.transformFromCourtTarget = exports.transformFromCourtPosition = exports.transformFromCountry = exports.transformFromCoach = exports.transformFromBlock = exports.TeamModel = exports.SubstitutionModel = exports.SpikeModel = exports.SetModel = exports.ServeModel = exports.SeasonTeamsModel = exports.SeasonModel = exports.ScoreModel = exports.ReceptionModel = exports.RallyPositionModel = exports.RallyModel = exports.PlayerModel = exports.PerformanceStatsModel = exports.MatchSetStatsModel = exports.MatchSetModel = exports.MatchModel = exports.LiberoReplacementModel = exports.LeagueModel = exports.EventModel = exports.CountryModel = exports.CoachModel = exports.BlockModel = exports.TournamentMatchModel = exports.TournamentModel = exports.SeasonMatchesModel = exports.transformFromStage = exports.transformToStage = exports.initModels = void 0;
3
+ exports.transformFromSet = exports.transformFromServe = exports.transformFromSeason = exports.transformFromScore = exports.transformFromRole = exports.transformFromReception = exports.transformFromRally = exports.transformFromPlayerPosition = exports.transformFromPlayer = exports.transformFromPerformanceStats = exports.transformFromMatchSetStats = exports.transformFromMatchSet = exports.transformFromMatch = exports.transformFromLiberoReplacement = exports.transformFromLeague = exports.transformFromFormation = exports.transformFromEventType = exports.transformFromCourtTarget = exports.transformFromCourtPosition = exports.transformFromCountry = exports.transformFromCoach = exports.transformFromBlock = exports.TeamModel = exports.SubstitutionModel = exports.SpikeModel = exports.SetModel = exports.ServeModel = exports.SeasonTeamsModel = exports.SeasonModel = exports.ScoreModel = exports.ReceptionModel = exports.RallyPositionModel = exports.RallyModel = exports.PlayerModel = exports.PerformanceStatsModel = exports.MatchSetStatsModel = exports.MatchSetModel = exports.MatchModel = exports.LiberoReplacementModel = exports.LeagueModel = exports.EventModel = exports.CountryModel = exports.CoachModel = exports.BlockModel = exports.TournamentMatchesModel = exports.TournamentModel = exports.SeasonMatchesModel = exports.transformFromStage = exports.transformToStage = exports.initModels = void 0;
4
4
  exports.transformToTournament = exports.transformToAPITournament = exports.transformFromTournament = exports.transformToTrait = exports.transformToTeam = exports.transformToSubstitution = exports.transformToSpike = exports.transformToSet = exports.transformToServe = exports.transformToSeason = exports.transformToScore = exports.transformToRole = exports.transformToReception = exports.transformToRally = exports.transformToPlayerPosition = exports.transformToPlayer = exports.transformToPerformanceStats = exports.transformToMatchSetStats = exports.transformToMatchSet = exports.transformToMatch = exports.transformToAPICoach = exports.transformToLiberoReplacement = exports.transformToLeague = exports.transformToFormation = exports.transformToEventType = exports.transformToCourtTarget = exports.transformToCourtPosition = exports.transformToCountry = exports.transformToCoach = exports.transformToBlock = exports.transformToAPITrait = exports.transformToAPITeam = exports.transformToAPISubstitution = exports.transformToAPISpike = exports.transformToAPISet = exports.transformToAPIServe = exports.transformToAPISeason = exports.transformToAPIScore = exports.transformToAPIReception = exports.transformToAPIRally = exports.transformToAPIPlayer = exports.transformToAPIMatchSetStats = exports.transformToAPIMatchSet = exports.transformToAPIMatch = exports.transformToAPILiberoReplacement = exports.transformToAPIBlock = exports.transformFromTrait = exports.transformFromTeam = exports.transformFromSubstitution = exports.transformFromSpike = void 0;
5
5
  exports.transformToTournamentMatch = exports.transformToAPITournamentMatch = exports.transformFromTournamentMatch = void 0;
6
6
  const models_1 = require("./models");
@@ -27,7 +27,7 @@ Object.defineProperty(exports, "SetModel", { enumerable: true, get: function ()
27
27
  Object.defineProperty(exports, "SpikeModel", { enumerable: true, get: function () { return models_1.SpikeModel; } });
28
28
  Object.defineProperty(exports, "SubstitutionModel", { enumerable: true, get: function () { return models_1.SubstitutionModel; } });
29
29
  Object.defineProperty(exports, "TeamModel", { enumerable: true, get: function () { return models_1.TeamModel; } });
30
- Object.defineProperty(exports, "TournamentMatchModel", { enumerable: true, get: function () { return models_1.TournamentMatchModel; } });
30
+ Object.defineProperty(exports, "TournamentMatchesModel", { enumerable: true, get: function () { return models_1.TournamentMatchesModel; } });
31
31
  Object.defineProperty(exports, "TournamentModel", { enumerable: true, get: function () { return models_1.TournamentModel; } });
32
32
  const transformers_1 = require("./transformers");
33
33
  Object.defineProperty(exports, "transformFromBlock", { enumerable: true, get: function () { return transformers_1.transformFromBlock; } });
@@ -1,5 +1,5 @@
1
1
  import type { Sequelize } from 'sequelize';
2
- import { BlockModel, CoachModel, CountryModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonMatchesModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentMatchModel, TournamentModel } from './models';
2
+ import { BlockModel, CoachModel, CountryModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonMatchesModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentMatchesModel, TournamentModel } from './models';
3
3
  export declare function initModels(sequelize: Sequelize): {
4
4
  Block: typeof BlockModel;
5
5
  Coach: typeof CoachModel;
@@ -25,5 +25,5 @@ export declare function initModels(sequelize: Sequelize): {
25
25
  Substitution: typeof SubstitutionModel;
26
26
  Team: typeof TeamModel;
27
27
  Tournament: typeof TournamentModel;
28
- TournamentMatch: typeof TournamentMatchModel;
28
+ TournamentMatch: typeof TournamentMatchesModel;
29
29
  };
@@ -19,178 +19,178 @@ function initModels(sequelize) {
19
19
  const Reception = models_1.ReceptionModel.initModel(sequelize);
20
20
  const Score = models_1.ScoreModel.initModel(sequelize);
21
21
  const Season = models_1.SeasonModel.initModel(sequelize);
22
- const SeasonTeams = models_1.SeasonTeamsModel.initModel(sequelize);
23
22
  const SeasonMatches = models_1.SeasonMatchesModel.initModel(sequelize);
23
+ const SeasonTeams = models_1.SeasonTeamsModel.initModel(sequelize);
24
24
  const Serve = models_1.ServeModel.initModel(sequelize);
25
25
  const Set = models_1.SetModel.initModel(sequelize);
26
26
  const Spike = models_1.SpikeModel.initModel(sequelize);
27
27
  const Substitution = models_1.SubstitutionModel.initModel(sequelize);
28
28
  const Team = models_1.TeamModel.initModel(sequelize);
29
29
  const Tournament = models_1.TournamentModel.initModel(sequelize);
30
- const TournamentMatch = models_1.TournamentMatchModel.initModel(sequelize);
31
- MatchSet.belongsToMany(Player, {
32
- as: 'player_id_Players',
33
- through: MatchSetStats,
34
- foreignKey: 'match_set_id',
35
- otherKey: 'player_id'
36
- });
37
- Player.belongsToMany(MatchSet, {
38
- as: 'match_set_id_MatchSets',
39
- through: MatchSetStats,
40
- foreignKey: 'player_id',
41
- otherKey: 'match_set_id'
42
- });
43
- Player.belongsToMany(Rally, {
44
- as: 'rally_id_Rallies',
45
- through: RallyPosition,
46
- foreignKey: 'player_id',
47
- otherKey: 'rally_id'
48
- });
49
- Rally.belongsToMany(Player, {
50
- as: 'player_id_Player_RallyPositions',
51
- through: RallyPosition,
52
- foreignKey: 'rally_id',
53
- otherKey: 'player_id'
54
- });
55
- Season.belongsToMany(Team, {
56
- as: 'seasonTeams',
57
- through: SeasonTeams,
58
- foreignKey: 'season_id',
59
- otherKey: 'team_id'
60
- });
61
- Team.belongsToMany(Season, {
62
- as: 'season_id_Seasons',
63
- through: SeasonTeams,
64
- foreignKey: 'team_id',
65
- otherKey: 'season_id'
66
- });
67
- Season.belongsToMany(Match, {
68
- as: 'seasonMatches',
69
- through: SeasonMatches,
70
- foreignKey: 'season_id',
71
- otherKey: 'match_id'
72
- });
30
+ const TournamentMatches = models_1.TournamentMatchesModel.initModel(sequelize);
31
+ Block.belongsTo(Player, { as: 'blocker_1_Player', foreignKey: 'blocker_1' });
32
+ Block.belongsTo(Player, { as: 'blocker_2_Player', foreignKey: 'blocker_2' });
33
+ Block.belongsTo(Player, { as: 'blocker_3_Player', foreignKey: 'blocker_3' });
34
+ Block.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
35
+ Block.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
36
+ Coach.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
37
+ Coach.hasMany(Team, { as: 'Teams', foreignKey: 'coach_id' });
38
+ Country.hasMany(Coach, { as: 'Coaches', foreignKey: 'country_id' });
39
+ Country.hasMany(League, { as: 'Leagues', foreignKey: 'country_id' });
40
+ Country.hasMany(Player, { as: 'Players', foreignKey: 'country_id' });
41
+ Country.hasMany(Team, { as: 'Teams', foreignKey: 'country_id' });
42
+ Event.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
43
+ Event.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
44
+ League.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
45
+ League.hasMany(League, { as: 'Teams', foreignKey: 'league_id' });
46
+ League.hasMany(Season, { as: 'Seasons', foreignKey: 'league_id' });
47
+ LiberoReplacement.belongsTo(Player, { as: 'libero_Player', foreignKey: 'libero' });
48
+ LiberoReplacement.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
49
+ LiberoReplacement.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
50
+ Match.belongsTo(Team, { as: 'awayTeam', foreignKey: 'away_team' });
51
+ Match.belongsTo(Team, { as: 'homeTeam', foreignKey: 'home_team' });
52
+ Match.hasMany(MatchSet, { as: 'MatchSets', foreignKey: 'match_id' });
53
+ Match.hasMany(SeasonMatches, { as: 'SeasonMatches', foreignKey: 'match_id' });
54
+ Match.hasMany(TournamentMatches, { as: 'TournamentMatch', foreignKey: 'match_id' });
73
55
  Match.belongsToMany(Season, {
74
56
  as: 'season_id_Seasons',
75
57
  through: SeasonMatches,
76
58
  foreignKey: 'match_id',
77
59
  otherKey: 'season_id'
78
60
  });
79
- Tournament.belongsToMany(Match, {
80
- as: 'tournamentMatch',
81
- through: TournamentMatch,
82
- foreignKey: 'tournament_id',
83
- otherKey: 'match_id'
84
- });
85
61
  Match.belongsToMany(Tournament, {
86
62
  as: 'tournament_id_Tournaments',
87
- through: TournamentMatch,
63
+ through: TournamentMatches,
88
64
  foreignKey: 'match_id',
89
65
  otherKey: 'tournament_id'
90
66
  });
91
- Team.belongsTo(Coach, { as: 'coach', foreignKey: 'coach_id' });
92
- Coach.hasMany(Team, { as: 'Teams', foreignKey: 'coach_id' });
93
- Coach.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
94
- Country.hasMany(Coach, { as: 'Coaches', foreignKey: 'country_id' });
95
- League.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
96
- Country.hasMany(League, { as: 'Leagues', foreignKey: 'country_id' });
97
- Player.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
98
- Country.hasMany(Player, { as: 'Players', foreignKey: 'country_id' });
99
- Team.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
100
- Country.hasMany(Team, { as: 'Teams', foreignKey: 'country_id' });
101
- Season.belongsTo(League, { as: 'league', foreignKey: 'league_id' });
102
- League.hasMany(Season, { as: 'Seasons', foreignKey: 'league_id' });
103
67
  MatchSet.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
104
- Match.hasMany(MatchSet, { as: 'MatchSets', foreignKey: 'match_id' });
105
- MatchSetStats.belongsTo(MatchSet, { as: 'match_set', foreignKey: 'match_set_id' });
68
+ MatchSet.belongsTo(Player, { as: 'away_libero_Player', foreignKey: 'away_libero' });
69
+ MatchSet.belongsTo(Player, { as: 'home_libero_Player', foreignKey: 'home_libero' });
106
70
  MatchSet.hasMany(MatchSetStats, { as: 'MatchSetStats', foreignKey: 'match_set_id' });
107
- Rally.belongsTo(MatchSet, { as: 'match_set', foreignKey: 'match_set_id' });
108
71
  MatchSet.hasMany(Rally, { as: 'Rallies', foreignKey: 'match_set_id' });
109
- Block.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
72
+ MatchSet.belongsToMany(Player, {
73
+ as: 'player_id_Players',
74
+ through: MatchSetStats,
75
+ foreignKey: 'match_set_id',
76
+ otherKey: 'player_id'
77
+ });
78
+ MatchSetStats.belongsTo(MatchSet, { as: 'match_set', foreignKey: 'match_set_id' });
79
+ MatchSetStats.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
80
+ PerformanceStats.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
81
+ Player.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
82
+ Player.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
110
83
  Player.hasMany(Block, { as: 'Blocks', foreignKey: 'player_id' });
111
- Block.belongsTo(Player, { as: 'blocker_1_Player', foreignKey: 'blocker_1' });
112
84
  Player.hasMany(Block, { as: 'blocker_1_Blocks', foreignKey: 'blocker_1' });
113
- Block.belongsTo(Player, { as: 'blocker_2_Player', foreignKey: 'blocker_2' });
114
85
  Player.hasMany(Block, { as: 'blocker_2_Blocks', foreignKey: 'blocker_2' });
115
- Block.belongsTo(Player, { as: 'blocker_3_Player', foreignKey: 'blocker_3' });
116
86
  Player.hasMany(Block, { as: 'blocker_3_Blocks', foreignKey: 'blocker_3' });
117
- Event.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
118
87
  Player.hasMany(Event, { as: 'Events', foreignKey: 'player_id' });
119
- LiberoReplacement.belongsTo(Player, { as: 'libero_Player', foreignKey: 'libero' });
120
88
  Player.hasMany(LiberoReplacement, { as: 'LiberoReplacements', foreignKey: 'libero' });
121
- LiberoReplacement.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
122
89
  Player.hasMany(LiberoReplacement, { as: 'player_LiberoReplacements', foreignKey: 'player_id' });
123
- MatchSet.belongsTo(Player, { as: 'away_libero_Player', foreignKey: 'away_libero' });
124
90
  Player.hasMany(MatchSet, { as: 'MatchSets', foreignKey: 'away_libero' });
125
- MatchSet.belongsTo(Player, { as: 'home_libero_Player', foreignKey: 'home_libero' });
126
91
  Player.hasMany(MatchSet, { as: 'home_libero_MatchSets', foreignKey: 'home_libero' });
127
- MatchSetStats.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
128
92
  Player.hasMany(MatchSetStats, { as: 'MatchSetStats', foreignKey: 'player_id' });
129
- PerformanceStats.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
130
- Player.hasOne(PerformanceStats, { as: 'PerformanceStat', foreignKey: 'player_id' });
131
- RallyPosition.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
132
93
  Player.hasMany(RallyPosition, { as: 'RallyPositions', foreignKey: 'player_id' });
133
- Reception.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
134
94
  Player.hasMany(Reception, { as: 'Receptions', foreignKey: 'player_id' });
135
- Score.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
136
95
  Player.hasMany(Score, { as: 'Scores', foreignKey: 'player_id' });
137
- Serve.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
138
96
  Player.hasMany(Serve, { as: 'Serves', foreignKey: 'player_id' });
139
- Set.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
140
97
  Player.hasMany(Set, { as: 'Sets', foreignKey: 'player_id' });
141
- Spike.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
142
98
  Player.hasMany(Spike, { as: 'Spikes', foreignKey: 'player_id' });
143
- Substitution.belongsTo(Player, { as: 'player_out_Player', foreignKey: 'player_out' });
144
99
  Player.hasMany(Substitution, { as: 'Substitutions', foreignKey: 'player_out' });
145
- Substitution.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
146
100
  Player.hasMany(Substitution, { as: 'player_Substitutions', foreignKey: 'player_id' });
147
- Block.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
101
+ Player.hasOne(PerformanceStats, { as: 'PerformanceStat', foreignKey: 'player_id' });
102
+ Player.belongsToMany(MatchSet, {
103
+ as: 'match_set_id_MatchSets',
104
+ through: MatchSetStats,
105
+ foreignKey: 'player_id',
106
+ otherKey: 'match_set_id'
107
+ });
108
+ Player.belongsToMany(Rally, {
109
+ as: 'rally_id_Rallies',
110
+ through: RallyPosition,
111
+ foreignKey: 'player_id',
112
+ otherKey: 'rally_id'
113
+ });
114
+ Rally.belongsTo(MatchSet, { as: 'match_set', foreignKey: 'match_set_id' });
115
+ Rally.belongsTo(Team, { as: 'serving_team_Team', foreignKey: 'serving_team' });
148
116
  Rally.hasMany(Block, { as: 'Blocks', foreignKey: 'rally_id' });
149
- Event.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
150
117
  Rally.hasMany(Event, { as: 'Events', foreignKey: 'rally_id' });
151
- LiberoReplacement.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
152
118
  Rally.hasMany(LiberoReplacement, { as: 'LiberoReplacements', foreignKey: 'rally_id' });
153
- RallyPosition.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
154
119
  Rally.hasMany(RallyPosition, { as: 'RallyPositions', foreignKey: 'rally_id' });
155
- Reception.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
156
120
  Rally.hasMany(Reception, { as: 'Receptions', foreignKey: 'rally_id' });
157
- Score.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
158
121
  Rally.hasMany(Score, { as: 'Scores', foreignKey: 'rally_id' });
159
- Serve.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
160
122
  Rally.hasMany(Serve, { as: 'Serves', foreignKey: 'rally_id' });
161
- Set.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
162
123
  Rally.hasMany(Set, { as: 'Sets', foreignKey: 'rally_id' });
163
- Spike.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
164
124
  Rally.hasMany(Spike, { as: 'Spikes', foreignKey: 'rally_id' });
165
- Substitution.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
166
125
  Rally.hasMany(Substitution, { as: 'Substitutions', foreignKey: 'rally_id' });
167
- SeasonTeams.belongsTo(Season, { as: 'season', foreignKey: 'season_id' });
126
+ Rally.belongsToMany(Player, {
127
+ as: 'player_id_Player_RallyPositions',
128
+ through: RallyPosition,
129
+ foreignKey: 'rally_id',
130
+ otherKey: 'player_id'
131
+ });
132
+ RallyPosition.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
133
+ RallyPosition.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
134
+ Reception.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
135
+ Reception.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
136
+ Score.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
137
+ Score.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
138
+ Score.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
139
+ Season.belongsTo(League, { as: 'league', foreignKey: 'league_id' });
140
+ Season.belongsTo(Team, { as: 'Champion', foreignKey: 'champion' });
141
+ Season.hasMany(SeasonMatches, { as: 'SeasonMatches', foreignKey: 'season_id' });
168
142
  Season.hasMany(SeasonTeams, { as: 'SeasonTeams', foreignKey: 'season_id' });
169
- Match.belongsTo(Team, { as: 'homeTeam', foreignKey: 'home_team' });
143
+ Season.belongsToMany(Team, {
144
+ as: 'seasonTeams',
145
+ through: SeasonTeams,
146
+ foreignKey: 'season_id',
147
+ otherKey: 'team_id'
148
+ });
149
+ Season.belongsToMany(Match, {
150
+ as: 'seasonMatches',
151
+ through: SeasonMatches,
152
+ foreignKey: 'season_id',
153
+ otherKey: 'match_id'
154
+ });
155
+ SeasonMatches.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
156
+ SeasonMatches.belongsTo(Season, { as: 'season', foreignKey: 'season_id' });
157
+ SeasonTeams.belongsTo(Season, { as: 'season', foreignKey: 'season_id' });
158
+ SeasonTeams.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
159
+ Serve.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
160
+ Serve.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
161
+ Set.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
162
+ Set.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
163
+ Spike.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
164
+ Spike.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
165
+ Substitution.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
166
+ Substitution.belongsTo(Player, { as: 'player_out_Player', foreignKey: 'player_out' });
167
+ Substitution.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
168
+ Team.belongsTo(Coach, { as: 'coach', foreignKey: 'coach_id' });
169
+ Team.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
170
+ Team.belongsTo(League, { as: 'league', foreignKey: 'league_id' });
170
171
  Team.hasMany(Match, { as: 'Matches', foreignKey: 'home_team' });
171
- Match.belongsTo(Team, { as: 'awayTeam', foreignKey: 'away_team' });
172
172
  Team.hasMany(Match, { as: 'away_team_Matches', foreignKey: 'away_team' });
173
- Player.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
174
173
  Team.hasMany(Player, { as: 'Players', foreignKey: 'team_id' });
175
- Rally.belongsTo(Team, { as: 'serving_team_Team', foreignKey: 'serving_team' });
176
174
  Team.hasMany(Rally, { as: 'Rallies', foreignKey: 'serving_team' });
177
- Score.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
178
175
  Team.hasMany(Score, { as: 'Scores', foreignKey: 'team_id' });
179
- SeasonTeams.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
180
- Team.hasMany(SeasonTeams, { as: 'SeasonTeams', foreignKey: 'team_id' });
181
- Match.hasMany(SeasonMatches, { as: 'SeasonMatches', foreignKey: 'match_id' });
182
- Season.hasMany(SeasonMatches, { as: 'SeasonMatches', foreignKey: 'season_id' });
183
- SeasonMatches.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
184
- SeasonMatches.belongsTo(Season, { as: 'season', foreignKey: 'season_id' });
185
- Team.belongsTo(League, { as: 'league', foreignKey: 'league_id' });
186
- League.hasMany(League, { as: 'Teams', foreignKey: 'league_id' });
187
- Season.belongsTo(Team, { as: 'Champion', foreignKey: 'champion' });
188
176
  Team.hasMany(Season, { as: 'titles', foreignKey: 'champion' });
177
+ Team.hasMany(SeasonTeams, { as: 'SeasonTeams', foreignKey: 'team_id' });
178
+ Team.belongsToMany(Season, {
179
+ as: 'season_id_Seasons',
180
+ through: SeasonTeams,
181
+ foreignKey: 'team_id',
182
+ otherKey: 'season_id'
183
+ });
189
184
  Tournament.belongsTo(Team, { as: 'Champion', foreignKey: 'champion' });
190
- Tournament.hasMany(TournamentMatch, { as: 'Matches', foreignKey: 'tournament_id' });
191
- Match.hasMany(TournamentMatch, { as: 'TournamentMatch', foreignKey: 'match_id' });
192
- TournamentMatch.belongsTo(Tournament, { as: 'tournament', foreignKey: 'tournament_id' });
193
- TournamentMatch.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
185
+ Tournament.hasMany(TournamentMatches, { as: 'TournamentMatches', foreignKey: 'tournament_id' });
186
+ Tournament.belongsToMany(Match, {
187
+ as: 'tournamentMatch',
188
+ through: TournamentMatches,
189
+ foreignKey: 'tournament_id',
190
+ otherKey: 'match_id'
191
+ });
192
+ TournamentMatches.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
193
+ TournamentMatches.belongsTo(Tournament, { as: 'tournament', foreignKey: 'tournament_id' });
194
194
  return {
195
195
  Block,
196
196
  Coach,
@@ -216,7 +216,7 @@ function initModels(sequelize) {
216
216
  Substitution,
217
217
  Team,
218
218
  Tournament,
219
- TournamentMatch
219
+ TournamentMatch: TournamentMatches
220
220
  };
221
221
  }
222
222
  exports.initModels = initModels;
@@ -22,5 +22,5 @@ import { SpikeAttributes, SpikeCreationAttributes, SpikeId, SpikeModel, SpikePk
22
22
  import { SubstitutionAttributes, SubstitutionCreationAttributes, SubstitutionId, SubstitutionModel, SubstitutionPk } from './substitution';
23
23
  import { TeamAttributes, TeamCreationAttributes, TeamId, TeamModel, TeamPk } from './team';
24
24
  import { TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk } from './tournament';
25
- import { TournamentMatchAttributes, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchModel, TournamentMatchPk, TournamentStage } from './tournament-match';
26
- export { TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk, TournamentMatchAttributes, TournamentMatchModel, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentStage, BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, SeasonMatchesAttributes, SeasonMatchesCreationAttributes, SeasonMatchesId, SeasonMatchesModel, SeasonMatchesPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, LeagueAttributes, LeagueCreationAttributes, LeagueId, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementModel, LiberoReplacementPk, MatchAttributes, MatchCreationAttributes, MatchId, MatchModel, MatchPk, MatchSetAttributes, MatchSetCreationAttributes, MatchSetId, MatchSetModel, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsModel, MatchSetStatsOptionalAttributes, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerAttributes, PlayerCreationAttributes, PlayerId, PlayerModel, PlayerPk, RallyAttributes, RallyCreationAttributes, RallyId, RallyModel, RallyPk, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPositionId, RallyPositionModel, RallyPositionPk, ReceptionAttributes, ReceptionCreationAttributes, ReceptionId, ReceptionModel, ReceptionPk, RoleType, ScoreAttributes, ScoreCreationAttributes, ScoreId, ScoreModel, ScorePk, SeasonAttributes, SeasonCreationAttributes, SeasonId, SeasonModel, SeasonPk, SeasonTeamsAttributes, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonTeamsPk, ServeAttributes, ServeCreationAttributes, ServeId, ServeModel, ServePk, SetAttributes, SetCreationAttributes, SetId, SetModel, SetPk, SpikeAttributes, SpikeCreationAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionAttributes, SubstitutionCreationAttributes, SubstitutionId, SubstitutionModel, SubstitutionPk, TeamAttributes, TeamCreationAttributes, TeamId, TeamModel, TeamPk, TraitType, };
25
+ import { TournamentMatchesAttributes, TournamentMatchesCreationAttributes, TournamentMatchesId, TournamentMatchesModel, TournamentMatchesPk, TournamentStage } from './tournament-matches';
26
+ export { TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk, TournamentMatchesAttributes, TournamentMatchesCreationAttributes, TournamentMatchesId, TournamentMatchesModel, TournamentMatchesPk, TournamentStage, BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, SeasonMatchesAttributes, SeasonMatchesCreationAttributes, SeasonMatchesId, SeasonMatchesModel, SeasonMatchesPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, LeagueAttributes, LeagueCreationAttributes, LeagueId, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementModel, LiberoReplacementPk, MatchAttributes, MatchCreationAttributes, MatchId, MatchModel, MatchPk, MatchSetAttributes, MatchSetCreationAttributes, MatchSetId, MatchSetModel, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsModel, MatchSetStatsOptionalAttributes, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerAttributes, PlayerCreationAttributes, PlayerId, PlayerModel, PlayerPk, RallyAttributes, RallyCreationAttributes, RallyId, RallyModel, RallyPk, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPositionId, RallyPositionModel, RallyPositionPk, ReceptionAttributes, ReceptionCreationAttributes, ReceptionId, ReceptionModel, ReceptionPk, RoleType, ScoreAttributes, ScoreCreationAttributes, ScoreId, ScoreModel, ScorePk, SeasonAttributes, SeasonCreationAttributes, SeasonId, SeasonModel, SeasonPk, SeasonTeamsAttributes, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonTeamsPk, ServeAttributes, ServeCreationAttributes, ServeId, ServeModel, ServePk, SetAttributes, SetCreationAttributes, SetId, SetModel, SetPk, SpikeAttributes, SpikeCreationAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionAttributes, SubstitutionCreationAttributes, SubstitutionId, SubstitutionModel, SubstitutionPk, TeamAttributes, TeamCreationAttributes, TeamId, TeamModel, TeamPk, TraitType, };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TeamModel = exports.SubstitutionModel = exports.SpikeModel = exports.SetModel = exports.ServeModel = exports.SeasonTeamsModel = exports.SeasonModel = exports.ScoreModel = exports.ReceptionModel = exports.RallyPositionModel = exports.RallyModel = exports.PlayerModel = exports.PerformanceStatsModel = exports.MatchSetStatsModel = exports.MatchSetModel = exports.MatchModel = exports.LiberoReplacementModel = exports.LeagueModel = exports.EventModel = exports.SeasonMatchesModel = exports.CountryModel = exports.CoachModel = exports.BlockModel = exports.TournamentMatchModel = exports.TournamentModel = void 0;
3
+ exports.TeamModel = exports.SubstitutionModel = exports.SpikeModel = exports.SetModel = exports.ServeModel = exports.SeasonTeamsModel = exports.SeasonModel = exports.ScoreModel = exports.ReceptionModel = exports.RallyPositionModel = exports.RallyModel = exports.PlayerModel = exports.PerformanceStatsModel = exports.MatchSetStatsModel = exports.MatchSetModel = exports.MatchModel = exports.LiberoReplacementModel = exports.LeagueModel = exports.EventModel = exports.SeasonMatchesModel = exports.CountryModel = exports.CoachModel = exports.BlockModel = exports.TournamentMatchesModel = exports.TournamentModel = void 0;
4
4
  const block_1 = require("./block");
5
5
  Object.defineProperty(exports, "BlockModel", { enumerable: true, get: function () { return block_1.BlockModel; } });
6
6
  const coach_1 = require("./coach");
@@ -49,5 +49,5 @@ const team_1 = require("./team");
49
49
  Object.defineProperty(exports, "TeamModel", { enumerable: true, get: function () { return team_1.TeamModel; } });
50
50
  const tournament_1 = require("./tournament");
51
51
  Object.defineProperty(exports, "TournamentModel", { enumerable: true, get: function () { return tournament_1.TournamentModel; } });
52
- const tournament_match_1 = require("./tournament-match");
53
- Object.defineProperty(exports, "TournamentMatchModel", { enumerable: true, get: function () { return tournament_match_1.TournamentMatchModel; } });
52
+ const tournament_matches_1 = require("./tournament-matches");
53
+ Object.defineProperty(exports, "TournamentMatchesModel", { enumerable: true, get: function () { return tournament_matches_1.TournamentMatchesModel; } });
@@ -11,7 +11,6 @@ export interface SeasonAttributes {
11
11
  league_id: string;
12
12
  seasonTeams?: TeamAttributes[];
13
13
  seasonMatches?: MatchAttributes[];
14
- Matches?: MatchAttributes[];
15
14
  league?: LeagueAttributes;
16
15
  champion?: string;
17
16
  }
@@ -18,6 +18,7 @@ export interface TeamAttributes {
18
18
  country_id: string;
19
19
  coach?: CoachAttributes;
20
20
  league?: LeagueAttributes;
21
+ Players?: PlayerModel[];
21
22
  }
22
23
  export type TeamPk = 'team_id';
23
24
  export type TeamId = TeamModel[TeamPk];
@@ -2,17 +2,17 @@ import * as Sequelize from 'sequelize';
2
2
  import { Model } from 'sequelize';
3
3
  import type { TournamentId, TournamentModel } from './tournament';
4
4
  import type { MatchId, MatchModel } from './match';
5
- export interface TournamentMatchAttributes {
5
+ export interface TournamentMatchesAttributes {
6
6
  tournament_id: string;
7
7
  match_id: string;
8
8
  index: number;
9
9
  stage: TournamentStage;
10
10
  }
11
- export type TournamentMatchPk = 'tournament_id' | 'match_id';
12
- export type TournamentMatchId = TournamentMatchModel[TournamentMatchPk];
11
+ export type TournamentMatchesPk = 'tournament_id' | 'match_id';
12
+ export type TournamentMatchesId = TournamentMatchesModel[TournamentMatchesPk];
13
13
  export type TournamentStage = 'ROUND_OF_8' | 'QUARTERFINALS' | 'SEMIFINALS' | 'FINAL';
14
- export type TournamentMatchCreationAttributes = TournamentMatchAttributes;
15
- export declare class TournamentMatchModel extends Model<TournamentMatchAttributes, TournamentMatchCreationAttributes> implements TournamentMatchAttributes {
14
+ export type TournamentMatchesCreationAttributes = TournamentMatchesAttributes;
15
+ export declare class TournamentMatchesModel extends Model<TournamentMatchesAttributes, TournamentMatchesCreationAttributes> implements TournamentMatchesAttributes {
16
16
  tournament_id: string;
17
17
  match_id: string;
18
18
  index: number;
@@ -25,5 +25,5 @@ export declare class TournamentMatchModel extends Model<TournamentMatchAttribute
25
25
  getMatch: Sequelize.BelongsToGetAssociationMixin<MatchModel>;
26
26
  setMatch: Sequelize.BelongsToSetAssociationMixin<MatchModel, MatchId>;
27
27
  createMatch: Sequelize.BelongsToCreateAssociationMixin<MatchModel>;
28
- static initModel(sequelize: Sequelize.Sequelize): typeof TournamentMatchModel;
28
+ static initModel(sequelize: Sequelize.Sequelize): typeof TournamentMatchesModel;
29
29
  }
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TournamentMatchModel = void 0;
3
+ exports.TournamentMatchesModel = void 0;
4
4
  const sequelize_1 = require("sequelize");
5
- class TournamentMatchModel extends sequelize_1.Model {
5
+ class TournamentMatchesModel extends sequelize_1.Model {
6
6
  static initModel(sequelize) {
7
- return TournamentMatchModel.init({
7
+ return TournamentMatchesModel.init({
8
8
  tournament_id: {
9
9
  type: sequelize_1.DataTypes.UUID,
10
10
  allowNull: false,
@@ -28,12 +28,12 @@ class TournamentMatchModel extends sequelize_1.Model {
28
28
  },
29
29
  }, {
30
30
  sequelize,
31
- tableName: 'TournamentMatch',
31
+ tableName: 'TournamentMatches',
32
32
  schema: 'public',
33
33
  timestamps: false,
34
34
  indexes: [
35
35
  {
36
- name: 'TournamentMatch_pk',
36
+ name: 'TournamentMatches_pk',
37
37
  unique: true,
38
38
  fields: [
39
39
  { name: 'tournament_id' },
@@ -44,4 +44,4 @@ class TournamentMatchModel extends sequelize_1.Model {
44
44
  });
45
45
  }
46
46
  }
47
- exports.TournamentMatchModel = TournamentMatchModel;
47
+ exports.TournamentMatchesModel = TournamentMatchesModel;
@@ -1,12 +1,12 @@
1
1
  import * as Sequelize from 'sequelize';
2
2
  import { Model } from 'sequelize';
3
- import { TournamentMatch } from '../../service/tournament/tournament-match';
4
- import { TournamentMatchId, TournamentMatchModel } from './tournament-match';
3
+ import { TournamentMatchesAttributes, TournamentMatchesId, TournamentMatchesModel } from './tournament-matches';
5
4
  import { TeamId, TeamModel } from './team';
5
+ import { MatchId, MatchModel } from './match';
6
6
  export interface TournamentAttributes {
7
7
  tournament_id: string;
8
8
  iteration: number;
9
- matches?: TournamentMatch[];
9
+ tournamentMatches?: TournamentMatchesAttributes[];
10
10
  champion?: string;
11
11
  }
12
12
  export type TournamentPk = 'tournament_id';
@@ -15,17 +15,27 @@ export type TournamentCreationAttributes = TournamentAttributes;
15
15
  export declare class TournamentModel extends Model<TournamentAttributes, TournamentCreationAttributes> implements TournamentAttributes {
16
16
  tournament_id: string;
17
17
  iteration: number;
18
- Matches: TournamentMatchModel[];
19
- getMatches: Sequelize.HasManyGetAssociationsMixin<TournamentMatchModel>;
20
- setMatches: Sequelize.HasManySetAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
21
- addMatch: Sequelize.HasManyAddAssociationMixin<TournamentMatchModel, TournamentMatchId>;
22
- addMatches: Sequelize.HasManyAddAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
23
- createMatch: Sequelize.HasManyCreateAssociationMixin<TournamentMatchModel>;
24
- removeMatch: Sequelize.HasManyRemoveAssociationMixin<TournamentMatchModel, TournamentMatchId>;
25
- removeMatches: Sequelize.HasManyRemoveAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
26
- hasMatch: Sequelize.HasManyHasAssociationMixin<TournamentMatchModel, TournamentMatchId>;
27
- hasMatches: Sequelize.HasManyHasAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
28
- countMatches: Sequelize.HasManyCountAssociationsMixin;
18
+ TournamentMatches: TournamentMatchesModel[];
19
+ getTournamentMatches: Sequelize.HasManyGetAssociationsMixin<TournamentMatchesModel>;
20
+ setTournamentMatches: Sequelize.HasManySetAssociationsMixin<TournamentMatchesModel, TournamentMatchesId>;
21
+ addTournamentMatch: Sequelize.HasManyAddAssociationMixin<TournamentMatchesModel, TournamentMatchesId>;
22
+ addTournamentMatches: Sequelize.HasManyAddAssociationsMixin<TournamentMatchesModel, TournamentMatchesId>;
23
+ createTournamentMatch: Sequelize.HasManyCreateAssociationMixin<TournamentMatchesModel>;
24
+ removeTournamentMatch: Sequelize.HasManyRemoveAssociationMixin<TournamentMatchesModel, TournamentMatchesId>;
25
+ removeTournamentMatches: Sequelize.HasManyRemoveAssociationsMixin<TournamentMatchesModel, TournamentMatchesId>;
26
+ hasTournamentMatch: Sequelize.HasManyHasAssociationMixin<TournamentMatchesModel, TournamentMatchesId>;
27
+ hasTournamentMatches: Sequelize.HasManyHasAssociationsMixin<TournamentMatchesModel, TournamentMatchesId>;
28
+ countTournamentMatches: Sequelize.HasManyCountAssociationsMixin;
29
+ getseasonMatches: Sequelize.BelongsToManyGetAssociationsMixin<MatchModel>;
30
+ setseasonMatches: Sequelize.BelongsToManySetAssociationsMixin<MatchModel, MatchId>;
31
+ addMatch_id_Match: Sequelize.BelongsToManyAddAssociationMixin<MatchModel, MatchId>;
32
+ addseasonMatches: Sequelize.BelongsToManyAddAssociationsMixin<MatchModel, MatchId>;
33
+ createMatch_id_Match: Sequelize.BelongsToManyCreateAssociationMixin<MatchModel>;
34
+ removeMatch_id_Match: Sequelize.BelongsToManyRemoveAssociationMixin<MatchModel, MatchId>;
35
+ removeseasonMatches: Sequelize.BelongsToManyRemoveAssociationsMixin<MatchModel, MatchId>;
36
+ hasMatch_id_Match: Sequelize.BelongsToManyHasAssociationMixin<MatchModel, MatchId>;
37
+ hasseasonMatches: Sequelize.BelongsToManyHasAssociationsMixin<MatchModel, MatchId>;
38
+ countseasonMatches: Sequelize.BelongsToManyCountAssociationsMixin;
29
39
  Champion: TeamModel;
30
40
  getChampion: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
31
41
  setChampion: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
@@ -1,7 +1,7 @@
1
- import { TournamentMatchAttributes, TournamentMatchModel } from '../models';
2
1
  import { TournamentMatch } from '../../service';
3
2
  import { APITournamentMatch } from '../../routing';
4
- declare function transformToAttributes(match: TournamentMatch, tournamentId: string): TournamentMatchAttributes;
5
- declare function transformToObject(model: TournamentMatchModel): TournamentMatch;
6
- declare function transformToAPIObject(model: TournamentMatchModel): APITournamentMatch;
3
+ import { TournamentMatchesAttributes, TournamentMatchesModel } from '../models';
4
+ declare function transformToAttributes(match: TournamentMatch, tournamentId: string): TournamentMatchesAttributes;
5
+ declare function transformToObject(model: TournamentMatchesModel): TournamentMatch;
6
+ declare function transformToAPIObject(model: TournamentMatchesModel): APITournamentMatch;
7
7
  export { transformToObject as transformToTournamentMatch, transformToAPIObject as transformToAPITournamentMatch, transformToAttributes as transformFromTournamentMatch };
@@ -5,11 +5,13 @@ const team_1 = require("./team");
5
5
  const service_1 = require("../../service");
6
6
  const tournament_match_1 = require("./tournament-match");
7
7
  function transformToAttributes(tournament) {
8
+ const tournamentMatches = tournament.matches != null ?
9
+ tournament.matches.map(match => (0, tournament_match_1.transformFromTournamentMatch)(match, tournament.id)) : [];
8
10
  return {
9
11
  tournament_id: tournament.id,
10
12
  iteration: tournament.iteration,
11
- matches: tournament.matches != null ? tournament.matches : [],
12
- champion: tournament.champion != null ? tournament.champion.id : undefined
13
+ champion: tournament.champion != null ? tournament.champion.id : undefined,
14
+ tournamentMatches
13
15
  };
14
16
  }
15
17
  exports.transformFromTournament = transformToAttributes;
@@ -17,7 +19,7 @@ function transformToObject(model) {
17
19
  return new service_1.Tournament({
18
20
  id: model.tournament_id,
19
21
  iteration: model.iteration,
20
- matches: model.Matches.map(tournament_match_1.transformToTournamentMatch),
22
+ matches: model.TournamentMatches.map(tournament_match_1.transformToTournamentMatch),
21
23
  champion: model.Champion != null ? (0, team_1.transformToTeam)(model.Champion) : undefined
22
24
  });
23
25
  }