volleyballsimtypes 0.0.29 → 0.0.31

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 (35) hide show
  1. package/dist/cjs/src/data/index.d.ts +2 -2
  2. package/dist/cjs/src/data/index.js +4 -3
  3. package/dist/cjs/src/data/init-models.d.ts +2 -1
  4. package/dist/cjs/src/data/init-models.js +119 -90
  5. package/dist/cjs/src/data/models/index.d.ts +2 -1
  6. package/dist/cjs/src/data/models/index.js +3 -1
  7. package/dist/cjs/src/data/models/match.d.ts +24 -6
  8. package/dist/cjs/src/data/models/match.js +0 -8
  9. package/dist/cjs/src/data/models/season-matches.d.ts +24 -0
  10. package/dist/cjs/src/data/models/season-matches.js +44 -0
  11. package/dist/cjs/src/data/models/season.d.ts +24 -2
  12. package/dist/cjs/src/data/models/team.d.ts +1 -0
  13. package/dist/cjs/src/data/transformers/match.d.ts +1 -1
  14. package/dist/cjs/src/data/transformers/match.js +1 -2
  15. package/dist/cjs/src/data/transformers/season.js +2 -2
  16. package/dist/cjs/src/index.d.ts +2 -2
  17. package/dist/cjs/src/index.js +4 -3
  18. package/dist/esm/src/data/index.d.ts +2 -2
  19. package/dist/esm/src/data/index.js +2 -2
  20. package/dist/esm/src/data/init-models.d.ts +2 -1
  21. package/dist/esm/src/data/init-models.js +120 -91
  22. package/dist/esm/src/data/models/index.d.ts +2 -1
  23. package/dist/esm/src/data/models/index.js +3 -2
  24. package/dist/esm/src/data/models/match.d.ts +24 -6
  25. package/dist/esm/src/data/models/match.js +0 -8
  26. package/dist/esm/src/data/models/season-matches.d.ts +24 -0
  27. package/dist/esm/src/data/models/season-matches.js +40 -0
  28. package/dist/esm/src/data/models/season.d.ts +24 -2
  29. package/dist/esm/src/data/models/team.d.ts +1 -0
  30. package/dist/esm/src/data/transformers/match.d.ts +1 -1
  31. package/dist/esm/src/data/transformers/match.js +1 -2
  32. package/dist/esm/src/data/transformers/season.js +2 -2
  33. package/dist/esm/src/index.d.ts +2 -2
  34. package/dist/esm/src/index.js +2 -2
  35. 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, 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, TournamentMatchAttributes, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchModel, TournamentMatchPk, 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, 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, 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 };
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transformFromSpike = 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.transformFromStage = exports.transformToStage = exports.initModels = void 0;
4
- exports.transformFromTournamentMatch = 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 = void 0;
5
- exports.transformToTournamentMatch = exports.transformToAPITournamentMatch = 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.TournamentMatchModel = exports.TournamentModel = exports.SeasonMatchesModel = exports.transformFromStage = exports.transformToStage = exports.initModels = void 0;
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
+ exports.transformToTournamentMatch = exports.transformToAPITournamentMatch = exports.transformFromTournamentMatch = void 0;
6
6
  const models_1 = require("./models");
7
7
  Object.defineProperty(exports, "BlockModel", { enumerable: true, get: function () { return models_1.BlockModel; } });
8
8
  Object.defineProperty(exports, "CoachModel", { enumerable: true, get: function () { return models_1.CoachModel; } });
@@ -19,6 +19,7 @@ Object.defineProperty(exports, "RallyModel", { enumerable: true, get: function (
19
19
  Object.defineProperty(exports, "RallyPositionModel", { enumerable: true, get: function () { return models_1.RallyPositionModel; } });
20
20
  Object.defineProperty(exports, "ReceptionModel", { enumerable: true, get: function () { return models_1.ReceptionModel; } });
21
21
  Object.defineProperty(exports, "ScoreModel", { enumerable: true, get: function () { return models_1.ScoreModel; } });
22
+ Object.defineProperty(exports, "SeasonMatchesModel", { enumerable: true, get: function () { return models_1.SeasonMatchesModel; } });
22
23
  Object.defineProperty(exports, "SeasonModel", { enumerable: true, get: function () { return models_1.SeasonModel; } });
23
24
  Object.defineProperty(exports, "SeasonTeamsModel", { enumerable: true, get: function () { return models_1.SeasonTeamsModel; } });
24
25
  Object.defineProperty(exports, "ServeModel", { enumerable: true, get: function () { return models_1.ServeModel; } });
@@ -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, 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, TournamentMatchModel, TournamentModel } from './models';
3
3
  export declare function initModels(sequelize: Sequelize): {
4
4
  Block: typeof BlockModel;
5
5
  Coach: typeof CoachModel;
@@ -18,6 +18,7 @@ export declare function initModels(sequelize: Sequelize): {
18
18
  Score: typeof ScoreModel;
19
19
  Season: typeof SeasonModel;
20
20
  SeasonTeams: typeof SeasonTeamsModel;
21
+ SeasonMatches: typeof SeasonMatchesModel;
21
22
  Serve: typeof ServeModel;
22
23
  Set: typeof SetModel;
23
24
  Spike: typeof SpikeModel;
@@ -19,6 +19,7 @@ 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 SeasonMatches = models_1.SeasonMatchesModel.initModel(sequelize);
22
23
  const SeasonTeams = models_1.SeasonTeamsModel.initModel(sequelize);
23
24
  const Serve = models_1.ServeModel.initModel(sequelize);
24
25
  const Set = models_1.SetModel.initModel(sequelize);
@@ -27,142 +28,169 @@ function initModels(sequelize) {
27
28
  const Team = models_1.TeamModel.initModel(sequelize);
28
29
  const Tournament = models_1.TournamentModel.initModel(sequelize);
29
30
  const TournamentMatch = models_1.TournamentMatchModel.initModel(sequelize);
30
- MatchSet.belongsToMany(Player, {
31
- as: 'player_id_Players',
32
- through: MatchSetStats,
33
- foreignKey: 'match_set_id',
34
- otherKey: 'player_id'
35
- });
36
- Player.belongsToMany(MatchSet, {
37
- as: 'match_set_id_MatchSets',
38
- through: MatchSetStats,
39
- foreignKey: 'player_id',
40
- otherKey: 'match_set_id'
41
- });
42
- Player.belongsToMany(Rally, {
43
- as: 'rally_id_Rallies',
44
- through: RallyPosition,
45
- foreignKey: 'player_id',
46
- otherKey: 'rally_id'
47
- });
48
- Rally.belongsToMany(Player, {
49
- as: 'player_id_Player_RallyPositions',
50
- through: RallyPosition,
51
- foreignKey: 'rally_id',
52
- otherKey: 'player_id'
53
- });
54
- Season.belongsToMany(Team, {
55
- as: 'seasonTeams',
56
- through: SeasonTeams,
57
- foreignKey: 'season_id',
58
- otherKey: 'team_id'
59
- });
60
- Team.belongsToMany(Season, {
61
- as: 'season_id_Seasons',
62
- through: SeasonTeams,
63
- foreignKey: 'team_id',
64
- otherKey: 'season_id'
65
- });
66
- Team.belongsTo(Coach, { as: 'coach', foreignKey: 'coach_id' });
67
- Coach.hasMany(Team, { as: 'Teams', foreignKey: 'coach_id' });
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' });
68
36
  Coach.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
37
+ Coach.hasMany(Team, { as: 'Teams', foreignKey: 'coach_id' });
69
38
  Country.hasMany(Coach, { as: 'Coaches', foreignKey: 'country_id' });
70
- League.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
71
39
  Country.hasMany(League, { as: 'Leagues', foreignKey: 'country_id' });
72
- Player.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
73
40
  Country.hasMany(Player, { as: 'Players', foreignKey: 'country_id' });
74
- Team.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
75
41
  Country.hasMany(Team, { as: 'Teams', foreignKey: 'country_id' });
76
- Season.belongsTo(League, { as: 'league', foreignKey: 'league_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' });
77
46
  League.hasMany(Season, { as: 'Seasons', foreignKey: 'league_id' });
78
- MatchSet.belongsTo(Match, { as: 'match', foreignKey: 'match_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' });
79
52
  Match.hasMany(MatchSet, { as: 'MatchSets', foreignKey: 'match_id' });
80
- MatchSetStats.belongsTo(MatchSet, { as: 'match_set', foreignKey: 'match_set_id' });
53
+ Match.hasMany(SeasonMatches, { as: 'SeasonMatches', foreignKey: 'match_id' });
54
+ Match.hasMany(TournamentMatch, { as: 'TournamentMatch', foreignKey: 'match_id' });
55
+ Match.belongsToMany(Season, {
56
+ as: 'season_id_Seasons',
57
+ through: SeasonMatches,
58
+ foreignKey: 'match_id',
59
+ otherKey: 'season_id'
60
+ });
61
+ Match.belongsToMany(Tournament, {
62
+ as: 'tournament_id_Tournaments',
63
+ through: TournamentMatch,
64
+ foreignKey: 'match_id',
65
+ otherKey: 'tournament_id'
66
+ });
67
+ MatchSet.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
68
+ MatchSet.belongsTo(Player, { as: 'away_libero_Player', foreignKey: 'away_libero' });
69
+ MatchSet.belongsTo(Player, { as: 'home_libero_Player', foreignKey: 'home_libero' });
81
70
  MatchSet.hasMany(MatchSetStats, { as: 'MatchSetStats', foreignKey: 'match_set_id' });
82
- Rally.belongsTo(MatchSet, { as: 'match_set', foreignKey: 'match_set_id' });
83
71
  MatchSet.hasMany(Rally, { as: 'Rallies', foreignKey: 'match_set_id' });
84
- 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' });
85
83
  Player.hasMany(Block, { as: 'Blocks', foreignKey: 'player_id' });
86
- Block.belongsTo(Player, { as: 'blocker_1_Player', foreignKey: 'blocker_1' });
87
84
  Player.hasMany(Block, { as: 'blocker_1_Blocks', foreignKey: 'blocker_1' });
88
- Block.belongsTo(Player, { as: 'blocker_2_Player', foreignKey: 'blocker_2' });
89
85
  Player.hasMany(Block, { as: 'blocker_2_Blocks', foreignKey: 'blocker_2' });
90
- Block.belongsTo(Player, { as: 'blocker_3_Player', foreignKey: 'blocker_3' });
91
86
  Player.hasMany(Block, { as: 'blocker_3_Blocks', foreignKey: 'blocker_3' });
92
- Event.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
93
87
  Player.hasMany(Event, { as: 'Events', foreignKey: 'player_id' });
94
- LiberoReplacement.belongsTo(Player, { as: 'libero_Player', foreignKey: 'libero' });
95
88
  Player.hasMany(LiberoReplacement, { as: 'LiberoReplacements', foreignKey: 'libero' });
96
- LiberoReplacement.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
97
89
  Player.hasMany(LiberoReplacement, { as: 'player_LiberoReplacements', foreignKey: 'player_id' });
98
- MatchSet.belongsTo(Player, { as: 'away_libero_Player', foreignKey: 'away_libero' });
99
90
  Player.hasMany(MatchSet, { as: 'MatchSets', foreignKey: 'away_libero' });
100
- MatchSet.belongsTo(Player, { as: 'home_libero_Player', foreignKey: 'home_libero' });
101
91
  Player.hasMany(MatchSet, { as: 'home_libero_MatchSets', foreignKey: 'home_libero' });
102
- MatchSetStats.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
103
92
  Player.hasMany(MatchSetStats, { as: 'MatchSetStats', foreignKey: 'player_id' });
104
- PerformanceStats.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
105
- Player.hasOne(PerformanceStats, { as: 'PerformanceStat', foreignKey: 'player_id' });
106
- RallyPosition.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
107
93
  Player.hasMany(RallyPosition, { as: 'RallyPositions', foreignKey: 'player_id' });
108
- Reception.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
109
94
  Player.hasMany(Reception, { as: 'Receptions', foreignKey: 'player_id' });
110
- Score.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
111
95
  Player.hasMany(Score, { as: 'Scores', foreignKey: 'player_id' });
112
- Serve.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
113
96
  Player.hasMany(Serve, { as: 'Serves', foreignKey: 'player_id' });
114
- Set.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
115
97
  Player.hasMany(Set, { as: 'Sets', foreignKey: 'player_id' });
116
- Spike.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
117
98
  Player.hasMany(Spike, { as: 'Spikes', foreignKey: 'player_id' });
118
- Substitution.belongsTo(Player, { as: 'player_out_Player', foreignKey: 'player_out' });
119
99
  Player.hasMany(Substitution, { as: 'Substitutions', foreignKey: 'player_out' });
120
- Substitution.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
121
100
  Player.hasMany(Substitution, { as: 'player_Substitutions', foreignKey: 'player_id' });
122
- 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' });
123
116
  Rally.hasMany(Block, { as: 'Blocks', foreignKey: 'rally_id' });
124
- Event.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
125
117
  Rally.hasMany(Event, { as: 'Events', foreignKey: 'rally_id' });
126
- LiberoReplacement.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
127
118
  Rally.hasMany(LiberoReplacement, { as: 'LiberoReplacements', foreignKey: 'rally_id' });
128
- RallyPosition.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
129
119
  Rally.hasMany(RallyPosition, { as: 'RallyPositions', foreignKey: 'rally_id' });
130
- Reception.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
131
120
  Rally.hasMany(Reception, { as: 'Receptions', foreignKey: 'rally_id' });
132
- Score.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
133
121
  Rally.hasMany(Score, { as: 'Scores', foreignKey: 'rally_id' });
134
- Serve.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
135
122
  Rally.hasMany(Serve, { as: 'Serves', foreignKey: 'rally_id' });
136
- Set.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
137
123
  Rally.hasMany(Set, { as: 'Sets', foreignKey: 'rally_id' });
138
- Spike.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
139
124
  Rally.hasMany(Spike, { as: 'Spikes', foreignKey: 'rally_id' });
140
- Substitution.belongsTo(Rally, { as: 'rally', foreignKey: 'rally_id' });
141
125
  Rally.hasMany(Substitution, { as: 'Substitutions', foreignKey: 'rally_id' });
142
- 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' });
143
142
  Season.hasMany(SeasonTeams, { as: 'SeasonTeams', foreignKey: 'season_id' });
144
- 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' });
145
171
  Team.hasMany(Match, { as: 'Matches', foreignKey: 'home_team' });
146
- Match.belongsTo(Team, { as: 'awayTeam', foreignKey: 'away_team' });
147
172
  Team.hasMany(Match, { as: 'away_team_Matches', foreignKey: 'away_team' });
148
- Player.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
149
173
  Team.hasMany(Player, { as: 'Players', foreignKey: 'team_id' });
150
- Rally.belongsTo(Team, { as: 'serving_team_Team', foreignKey: 'serving_team' });
151
174
  Team.hasMany(Rally, { as: 'Rallies', foreignKey: 'serving_team' });
152
- Score.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
153
175
  Team.hasMany(Score, { as: 'Scores', foreignKey: 'team_id' });
154
- SeasonTeams.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
155
- Team.hasMany(SeasonTeams, { as: 'SeasonTeams', foreignKey: 'team_id' });
156
- Match.belongsTo(Season, { as: 'season', foreignKey: 'season_id' });
157
- Season.hasMany(Match, { as: 'Matches', foreignKey: 'season_id' });
158
- Team.belongsTo(League, { as: 'league', foreignKey: 'league_id' });
159
- League.hasMany(League, { as: 'Teams', foreignKey: 'league_id' });
160
- Season.belongsTo(Team, { as: 'Champion', foreignKey: 'champion' });
161
176
  Team.hasMany(Season, { as: 'titles', foreignKey: 'champion' });
162
- Tournament.hasMany(TournamentMatch, { as: 'Matches', foreignKey: 'tournament_id' });
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
+ });
163
184
  Tournament.belongsTo(Team, { as: 'Champion', foreignKey: 'champion' });
164
- TournamentMatch.belongsTo(Tournament, { as: 'tournament', foreignKey: 'tournament_id' });
185
+ Tournament.hasMany(TournamentMatch, { as: 'TournamentMatches', foreignKey: 'tournament_id' });
186
+ Tournament.belongsToMany(Match, {
187
+ as: 'tournamentMatch',
188
+ through: TournamentMatch,
189
+ foreignKey: 'tournament_id',
190
+ otherKey: 'match_id'
191
+ });
165
192
  TournamentMatch.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
193
+ TournamentMatch.belongsTo(Tournament, { as: 'tournament', foreignKey: 'tournament_id' });
166
194
  return {
167
195
  Block,
168
196
  Coach,
@@ -181,6 +209,7 @@ function initModels(sequelize) {
181
209
  Score,
182
210
  Season,
183
211
  SeasonTeams,
212
+ SeasonMatches,
184
213
  Serve,
185
214
  Set,
186
215
  Spike,
@@ -15,6 +15,7 @@ import { ReceptionAttributes, ReceptionCreationAttributes, ReceptionId, Receptio
15
15
  import { ScoreAttributes, ScoreCreationAttributes, ScoreId, ScoreModel, ScorePk } from './score';
16
16
  import { SeasonAttributes, SeasonCreationAttributes, SeasonId, SeasonModel, SeasonPk } from './season';
17
17
  import { SeasonTeamsAttributes, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonTeamsPk } from './season-teams';
18
+ import { SeasonMatchesAttributes, SeasonMatchesCreationAttributes, SeasonMatchesId, SeasonMatchesModel, SeasonMatchesPk } from './season-matches';
18
19
  import { ServeAttributes, ServeCreationAttributes, ServeId, ServeModel, ServePk } from './serve';
19
20
  import { SetAttributes, SetCreationAttributes, SetId, SetModel, SetPk } from './set';
20
21
  import { SpikeAttributes, SpikeCreationAttributes, SpikeId, SpikeModel, SpikePk } from './spike';
@@ -22,4 +23,4 @@ import { SubstitutionAttributes, SubstitutionCreationAttributes, SubstitutionId,
22
23
  import { TeamAttributes, TeamCreationAttributes, TeamId, TeamModel, TeamPk } from './team';
23
24
  import { TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk } from './tournament';
24
25
  import { TournamentMatchAttributes, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchModel, TournamentMatchPk, TournamentStage } from './tournament-match';
25
- 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, 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, };
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, };
@@ -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.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.TournamentMatchModel = 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");
@@ -35,6 +35,8 @@ const season_1 = require("./season");
35
35
  Object.defineProperty(exports, "SeasonModel", { enumerable: true, get: function () { return season_1.SeasonModel; } });
36
36
  const season_teams_1 = require("./season-teams");
37
37
  Object.defineProperty(exports, "SeasonTeamsModel", { enumerable: true, get: function () { return season_teams_1.SeasonTeamsModel; } });
38
+ const season_matches_1 = require("./season-matches");
39
+ Object.defineProperty(exports, "SeasonMatchesModel", { enumerable: true, get: function () { return season_matches_1.SeasonMatchesModel; } });
38
40
  const serve_1 = require("./serve");
39
41
  Object.defineProperty(exports, "ServeModel", { enumerable: true, get: function () { return serve_1.ServeModel; } });
40
42
  const set_1 = require("./set");
@@ -3,12 +3,12 @@ import { Model } from 'sequelize';
3
3
  import type { MatchSetAttributes, MatchSetId, MatchSetModel } from './match-set';
4
4
  import type { SeasonId, SeasonModel } from './season';
5
5
  import type { TeamId, TeamModel } from './team';
6
+ import { SeasonMatchesId, SeasonMatchesModel } from './season-matches';
6
7
  export interface MatchAttributes {
7
8
  match_id: string;
8
9
  home_team: string;
9
10
  away_team: string;
10
11
  scheduled_date: string;
11
- season_id: string;
12
12
  is_simulated: boolean;
13
13
  MatchSets?: MatchSetAttributes[];
14
14
  }
@@ -20,9 +20,9 @@ export declare class MatchModel extends Model<MatchAttributes, MatchCreationAttr
20
20
  home_team: string;
21
21
  away_team: string;
22
22
  scheduled_date: string;
23
- season_id: string;
24
23
  is_simulated: boolean;
25
24
  MatchSets: MatchSetModel[];
25
+ season_id: string;
26
26
  getMatchSets: Sequelize.HasManyGetAssociationsMixin<MatchSetModel>;
27
27
  setMatchSets: Sequelize.HasManySetAssociationsMixin<MatchSetModel, MatchSetId>;
28
28
  addMatchSet: Sequelize.HasManyAddAssociationMixin<MatchSetModel, MatchSetId>;
@@ -33,10 +33,6 @@ export declare class MatchModel extends Model<MatchAttributes, MatchCreationAttr
33
33
  hasMatchSet: Sequelize.HasManyHasAssociationMixin<MatchSetModel, MatchSetId>;
34
34
  hasMatchSets: Sequelize.HasManyHasAssociationsMixin<MatchSetModel, MatchSetId>;
35
35
  countMatchSets: Sequelize.HasManyCountAssociationsMixin;
36
- season: SeasonModel;
37
- getSeason: Sequelize.BelongsToGetAssociationMixin<SeasonModel>;
38
- setSeason: Sequelize.BelongsToSetAssociationMixin<SeasonModel, SeasonId>;
39
- createSeason: Sequelize.BelongsToCreateAssociationMixin<SeasonModel>;
40
36
  homeTeam: TeamModel;
41
37
  getHomeTeam: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
42
38
  setHomeTeam: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
@@ -45,5 +41,27 @@ export declare class MatchModel extends Model<MatchAttributes, MatchCreationAttr
45
41
  getAwayTeam: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
46
42
  setAwayTeam: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
47
43
  createAwayTeam: Sequelize.BelongsToCreateAssociationMixin<TeamModel>;
44
+ season_id_Seasons: SeasonModel[];
45
+ getSeason_id_Seasons: Sequelize.BelongsToManyGetAssociationsMixin<SeasonModel>;
46
+ setSeason_id_Seasons: Sequelize.BelongsToManySetAssociationsMixin<SeasonModel, SeasonId>;
47
+ addSeason_id_Season: Sequelize.BelongsToManyAddAssociationMixin<SeasonModel, SeasonId>;
48
+ addSeason_id_Seasons: Sequelize.BelongsToManyAddAssociationsMixin<SeasonModel, SeasonId>;
49
+ createSeason_id_Season: Sequelize.BelongsToManyCreateAssociationMixin<SeasonModel>;
50
+ removeSeason_id_Season: Sequelize.BelongsToManyRemoveAssociationMixin<SeasonModel, SeasonId>;
51
+ removeSeason_id_Seasons: Sequelize.BelongsToManyRemoveAssociationsMixin<SeasonModel, SeasonId>;
52
+ hasSeason_id_Season: Sequelize.BelongsToManyHasAssociationMixin<SeasonModel, SeasonId>;
53
+ hasSeason_id_Seasons: Sequelize.BelongsToManyHasAssociationsMixin<SeasonModel, SeasonId>;
54
+ countSeason_id_Seasons: Sequelize.BelongsToManyCountAssociationsMixin;
55
+ Season: SeasonMatchesModel[];
56
+ getSeasonMatches: Sequelize.HasManyGetAssociationsMixin<SeasonMatchesModel>;
57
+ setSeasonMatches: Sequelize.HasManySetAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
58
+ addSeasonMatch: Sequelize.HasManyAddAssociationMixin<SeasonMatchesModel, SeasonMatchesId>;
59
+ addSeasonMatches: Sequelize.HasManyAddAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
60
+ createSeasonMatch: Sequelize.HasManyCreateAssociationMixin<SeasonMatchesModel>;
61
+ removeSeasonMatch: Sequelize.HasManyRemoveAssociationMixin<SeasonMatchesModel, SeasonMatchesId>;
62
+ removeSeasonMatches: Sequelize.HasManyRemoveAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
63
+ hasSeasonMatch: Sequelize.HasManyHasAssociationMixin<SeasonMatchesModel, SeasonMatchesId>;
64
+ hasSeasonMatches: Sequelize.HasManyHasAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
65
+ countSeasonMatches: Sequelize.HasManyCountAssociationsMixin;
48
66
  static initModel(sequelize: Sequelize.Sequelize): typeof MatchModel;
49
67
  }
@@ -33,14 +33,6 @@ class MatchModel extends sequelize_1.Model {
33
33
  is_simulated: {
34
34
  type: sequelize_1.DataTypes.BOOLEAN,
35
35
  allowNull: false
36
- },
37
- season_id: {
38
- type: sequelize_1.DataTypes.UUID,
39
- allowNull: false,
40
- references: {
41
- model: 'Season',
42
- key: 'season_id'
43
- }
44
36
  }
45
37
  }, {
46
38
  sequelize,
@@ -0,0 +1,24 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model } from 'sequelize';
3
+ import type { SeasonId, SeasonModel } from './season';
4
+ import type { MatchId, MatchModel } from './match';
5
+ export interface SeasonMatchesAttributes {
6
+ season_id: string;
7
+ match_id: string;
8
+ }
9
+ export type SeasonMatchesPk = 'season_id' | 'match_id';
10
+ export type SeasonMatchesId = SeasonMatchesModel[SeasonMatchesPk];
11
+ export type SeasonMatchesCreationAttributes = SeasonMatchesAttributes;
12
+ export declare class SeasonMatchesModel extends Model<SeasonMatchesAttributes, SeasonMatchesCreationAttributes> implements SeasonMatchesAttributes {
13
+ season_id: string;
14
+ match_id: string;
15
+ season: SeasonModel;
16
+ getSeason: Sequelize.BelongsToGetAssociationMixin<SeasonModel>;
17
+ setSeason: Sequelize.BelongsToSetAssociationMixin<SeasonModel, SeasonId>;
18
+ createSeason: Sequelize.BelongsToCreateAssociationMixin<SeasonModel>;
19
+ team: MatchModel;
20
+ getMatch: Sequelize.BelongsToGetAssociationMixin<MatchModel>;
21
+ setMatch: Sequelize.BelongsToSetAssociationMixin<MatchModel, MatchId>;
22
+ createMatch: Sequelize.BelongsToCreateAssociationMixin<MatchModel>;
23
+ static initModel(sequelize: Sequelize.Sequelize): typeof SeasonMatchesModel;
24
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SeasonMatchesModel = void 0;
4
+ const sequelize_1 = require("sequelize");
5
+ class SeasonMatchesModel extends sequelize_1.Model {
6
+ static initModel(sequelize) {
7
+ return SeasonMatchesModel.init({
8
+ season_id: {
9
+ type: sequelize_1.DataTypes.UUID,
10
+ allowNull: false,
11
+ primaryKey: true,
12
+ references: {
13
+ model: 'Season',
14
+ key: 'season_id'
15
+ }
16
+ },
17
+ match_id: {
18
+ type: sequelize_1.DataTypes.UUID,
19
+ allowNull: false,
20
+ primaryKey: true,
21
+ references: {
22
+ model: 'Match',
23
+ key: 'match_id'
24
+ }
25
+ }
26
+ }, {
27
+ sequelize,
28
+ tableName: 'SeasonMatches',
29
+ schema: 'public',
30
+ timestamps: false,
31
+ indexes: [
32
+ {
33
+ name: 'SeasonMatches_pk',
34
+ unique: true,
35
+ fields: [
36
+ { name: 'season_id' },
37
+ { name: 'match_id' }
38
+ ]
39
+ }
40
+ ]
41
+ });
42
+ }
43
+ }
44
+ exports.SeasonMatchesModel = SeasonMatchesModel;
@@ -4,12 +4,13 @@ import type { LeagueAttributes, LeagueId, LeagueModel } from './league';
4
4
  import type { MatchAttributes, MatchId, MatchModel } from './match';
5
5
  import type { SeasonTeamsId, SeasonTeamsModel } from './season-teams';
6
6
  import type { TeamAttributes, TeamId, TeamModel } from './team';
7
+ import { SeasonMatchesId, SeasonMatchesModel } from './season-matches';
7
8
  export interface SeasonAttributes {
8
9
  season_id: string;
9
10
  iteration: number;
10
11
  league_id: string;
11
12
  seasonTeams?: TeamAttributes[];
12
- Matches?: MatchAttributes[];
13
+ seasonMatches?: MatchAttributes[];
13
14
  league?: LeagueAttributes;
14
15
  champion?: string;
15
16
  }
@@ -21,7 +22,7 @@ export declare class SeasonModel extends Model<SeasonAttributes, SeasonCreationA
21
22
  iteration: number;
22
23
  league_id: string;
23
24
  seasonTeams: TeamModel[];
24
- Matches: MatchModel[];
25
+ seasonMatches: MatchModel[];
25
26
  league: LeagueModel;
26
27
  getLeague: Sequelize.BelongsToGetAssociationMixin<LeagueModel>;
27
28
  setLeague: Sequelize.BelongsToSetAssociationMixin<LeagueModel, LeagueId>;
@@ -57,6 +58,27 @@ export declare class SeasonModel extends Model<SeasonAttributes, SeasonCreationA
57
58
  hasTeam_id_Team: Sequelize.BelongsToManyHasAssociationMixin<TeamModel, TeamId>;
58
59
  hasseasonTeams: Sequelize.BelongsToManyHasAssociationsMixin<TeamModel, TeamId>;
59
60
  countseasonTeams: Sequelize.BelongsToManyCountAssociationsMixin;
61
+ SeasonMatches: SeasonMatchesModel[];
62
+ getSeasonMatches: Sequelize.HasManyGetAssociationsMixin<SeasonMatchesModel>;
63
+ setSeasonMatches: Sequelize.HasManySetAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
64
+ addSeasonMatch: Sequelize.HasManyAddAssociationMixin<SeasonMatchesModel, SeasonMatchesId>;
65
+ addSeasonMatches: Sequelize.HasManyAddAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
66
+ createSeasonMatch: Sequelize.HasManyCreateAssociationMixin<SeasonMatchesModel>;
67
+ removeSeasonMatch: Sequelize.HasManyRemoveAssociationMixin<SeasonMatchesModel, SeasonMatchesId>;
68
+ removeSeasonMatches: Sequelize.HasManyRemoveAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
69
+ hasSeasonMatch: Sequelize.HasManyHasAssociationMixin<SeasonMatchesModel, SeasonMatchesId>;
70
+ hasSeasonMatches: Sequelize.HasManyHasAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
71
+ countSeasonMatches: Sequelize.HasManyCountAssociationsMixin;
72
+ getseasonMatches: Sequelize.BelongsToManyGetAssociationsMixin<MatchModel>;
73
+ setseasonMatches: Sequelize.BelongsToManySetAssociationsMixin<MatchModel, MatchId>;
74
+ addMatch_id_Match: Sequelize.BelongsToManyAddAssociationMixin<MatchModel, MatchId>;
75
+ addseasonMatches: Sequelize.BelongsToManyAddAssociationsMixin<MatchModel, MatchId>;
76
+ createMatch_id_Match: Sequelize.BelongsToManyCreateAssociationMixin<MatchModel>;
77
+ removeMatch_id_Match: Sequelize.BelongsToManyRemoveAssociationMixin<MatchModel, MatchId>;
78
+ removeseasonMatches: Sequelize.BelongsToManyRemoveAssociationsMixin<MatchModel, MatchId>;
79
+ hasMatch_id_Match: Sequelize.BelongsToManyHasAssociationMixin<MatchModel, MatchId>;
80
+ hasseasonMatches: Sequelize.BelongsToManyHasAssociationsMixin<MatchModel, MatchId>;
81
+ countseasonMatches: Sequelize.BelongsToManyCountAssociationsMixin;
60
82
  Champion: TeamModel;
61
83
  getChampion: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
62
84
  setChampion: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
@@ -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];
@@ -1,7 +1,7 @@
1
1
  import { MatchAttributes, MatchModel } from '../models';
2
2
  import { Match } from '../../service';
3
3
  import { APIMatch } from '../../routing';
4
- declare function transformToAttributes(match: Match, seasonId: string): MatchAttributes;
4
+ declare function transformToAttributes(match: Match): MatchAttributes;
5
5
  declare function transformToObject(model: MatchModel): Match;
6
6
  declare function transformToAPIObject(model: MatchModel): APIMatch;
7
7
  export { transformToObject as transformToMatch, transformToAPIObject as transformToAPIMatch, transformToAttributes as transformFromMatch };