volleyballsimtypes 0.0.28 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/data/index.d.ts +2 -2
- package/dist/cjs/src/data/index.js +4 -3
- package/dist/cjs/src/data/init-models.d.ts +2 -1
- package/dist/cjs/src/data/init-models.js +32 -3
- package/dist/cjs/src/data/models/index.d.ts +2 -1
- package/dist/cjs/src/data/models/index.js +3 -1
- package/dist/cjs/src/data/models/match.d.ts +24 -6
- package/dist/cjs/src/data/models/match.js +0 -8
- package/dist/cjs/src/data/models/season-matches.d.ts +24 -0
- package/dist/cjs/src/data/models/season-matches.js +44 -0
- package/dist/cjs/src/data/models/season.d.ts +24 -1
- package/dist/cjs/src/data/transformers/match.d.ts +1 -1
- package/dist/cjs/src/data/transformers/match.js +1 -2
- package/dist/cjs/src/data/transformers/season.js +2 -2
- package/dist/cjs/src/index.d.ts +2 -2
- package/dist/cjs/src/index.js +4 -3
- package/dist/cjs/src/service/league/season.js +3 -1
- package/dist/esm/src/data/index.d.ts +2 -2
- package/dist/esm/src/data/index.js +2 -2
- package/dist/esm/src/data/init-models.d.ts +2 -1
- package/dist/esm/src/data/init-models.js +33 -4
- package/dist/esm/src/data/models/index.d.ts +2 -1
- package/dist/esm/src/data/models/index.js +3 -2
- package/dist/esm/src/data/models/match.d.ts +24 -6
- package/dist/esm/src/data/models/match.js +0 -8
- package/dist/esm/src/data/models/season-matches.d.ts +24 -0
- package/dist/esm/src/data/models/season-matches.js +40 -0
- package/dist/esm/src/data/models/season.d.ts +24 -1
- package/dist/esm/src/data/transformers/match.d.ts +1 -1
- package/dist/esm/src/data/transformers/match.js +1 -2
- package/dist/esm/src/data/transformers/season.js +2 -2
- package/dist/esm/src/index.d.ts +2 -2
- package/dist/esm/src/index.js +2 -2
- package/dist/esm/src/service/league/season.js +3 -1
- 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.
|
|
4
|
-
exports.
|
|
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;
|
|
@@ -20,6 +20,7 @@ function initModels(sequelize) {
|
|
|
20
20
|
const Score = models_1.ScoreModel.initModel(sequelize);
|
|
21
21
|
const Season = models_1.SeasonModel.initModel(sequelize);
|
|
22
22
|
const SeasonTeams = models_1.SeasonTeamsModel.initModel(sequelize);
|
|
23
|
+
const SeasonMatches = models_1.SeasonMatchesModel.initModel(sequelize);
|
|
23
24
|
const Serve = models_1.ServeModel.initModel(sequelize);
|
|
24
25
|
const Set = models_1.SetModel.initModel(sequelize);
|
|
25
26
|
const Spike = models_1.SpikeModel.initModel(sequelize);
|
|
@@ -63,6 +64,30 @@ function initModels(sequelize) {
|
|
|
63
64
|
foreignKey: 'team_id',
|
|
64
65
|
otherKey: 'season_id'
|
|
65
66
|
});
|
|
67
|
+
Season.belongsToMany(Match, {
|
|
68
|
+
as: 'seasonMatches',
|
|
69
|
+
through: SeasonMatches,
|
|
70
|
+
foreignKey: 'season_id',
|
|
71
|
+
otherKey: 'match_id'
|
|
72
|
+
});
|
|
73
|
+
Match.belongsToMany(Season, {
|
|
74
|
+
as: 'season_id_Seasons',
|
|
75
|
+
through: SeasonMatches,
|
|
76
|
+
foreignKey: 'match_id',
|
|
77
|
+
otherKey: 'season_id'
|
|
78
|
+
});
|
|
79
|
+
Tournament.belongsToMany(Match, {
|
|
80
|
+
as: 'tournamentMatch',
|
|
81
|
+
through: TournamentMatch,
|
|
82
|
+
foreignKey: 'tournament_id',
|
|
83
|
+
otherKey: 'match_id'
|
|
84
|
+
});
|
|
85
|
+
Match.belongsToMany(Tournament, {
|
|
86
|
+
as: 'tournament_id_Tournaments',
|
|
87
|
+
through: TournamentMatch,
|
|
88
|
+
foreignKey: 'match_id',
|
|
89
|
+
otherKey: 'tournament_id'
|
|
90
|
+
});
|
|
66
91
|
Team.belongsTo(Coach, { as: 'coach', foreignKey: 'coach_id' });
|
|
67
92
|
Coach.hasMany(Team, { as: 'Teams', foreignKey: 'coach_id' });
|
|
68
93
|
Coach.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
|
|
@@ -153,14 +178,17 @@ function initModels(sequelize) {
|
|
|
153
178
|
Team.hasMany(Score, { as: 'Scores', foreignKey: 'team_id' });
|
|
154
179
|
SeasonTeams.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
|
|
155
180
|
Team.hasMany(SeasonTeams, { as: 'SeasonTeams', foreignKey: 'team_id' });
|
|
156
|
-
Match.
|
|
157
|
-
Season.hasMany(
|
|
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' });
|
|
158
185
|
Team.belongsTo(League, { as: 'league', foreignKey: 'league_id' });
|
|
159
186
|
League.hasMany(League, { as: 'Teams', foreignKey: 'league_id' });
|
|
160
187
|
Season.belongsTo(Team, { as: 'Champion', foreignKey: 'champion' });
|
|
161
188
|
Team.hasMany(Season, { as: 'titles', foreignKey: 'champion' });
|
|
162
|
-
Tournament.hasMany(TournamentMatch, { as: 'Matches', foreignKey: 'tournament_id' });
|
|
163
189
|
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' });
|
|
164
192
|
TournamentMatch.belongsTo(Tournament, { as: 'tournament', foreignKey: 'tournament_id' });
|
|
165
193
|
TournamentMatch.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
|
|
166
194
|
return {
|
|
@@ -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,11 +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[];
|
|
13
|
+
seasonMatches?: MatchAttributes[];
|
|
12
14
|
Matches?: MatchAttributes[];
|
|
13
15
|
league?: LeagueAttributes;
|
|
14
16
|
champion?: string;
|
|
@@ -21,7 +23,7 @@ export declare class SeasonModel extends Model<SeasonAttributes, SeasonCreationA
|
|
|
21
23
|
iteration: number;
|
|
22
24
|
league_id: string;
|
|
23
25
|
seasonTeams: TeamModel[];
|
|
24
|
-
|
|
26
|
+
seasonMatches: MatchModel[];
|
|
25
27
|
league: LeagueModel;
|
|
26
28
|
getLeague: Sequelize.BelongsToGetAssociationMixin<LeagueModel>;
|
|
27
29
|
setLeague: Sequelize.BelongsToSetAssociationMixin<LeagueModel, LeagueId>;
|
|
@@ -57,6 +59,27 @@ export declare class SeasonModel extends Model<SeasonAttributes, SeasonCreationA
|
|
|
57
59
|
hasTeam_id_Team: Sequelize.BelongsToManyHasAssociationMixin<TeamModel, TeamId>;
|
|
58
60
|
hasseasonTeams: Sequelize.BelongsToManyHasAssociationsMixin<TeamModel, TeamId>;
|
|
59
61
|
countseasonTeams: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
62
|
+
SeasonMatches: SeasonMatchesModel[];
|
|
63
|
+
getSeasonMatches: Sequelize.HasManyGetAssociationsMixin<SeasonMatchesModel>;
|
|
64
|
+
setSeasonMatches: Sequelize.HasManySetAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
65
|
+
addSeasonMatch: Sequelize.HasManyAddAssociationMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
66
|
+
addSeasonMatches: Sequelize.HasManyAddAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
67
|
+
createSeasonMatch: Sequelize.HasManyCreateAssociationMixin<SeasonMatchesModel>;
|
|
68
|
+
removeSeasonMatch: Sequelize.HasManyRemoveAssociationMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
69
|
+
removeSeasonMatches: Sequelize.HasManyRemoveAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
70
|
+
hasSeasonMatch: Sequelize.HasManyHasAssociationMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
71
|
+
hasSeasonMatches: Sequelize.HasManyHasAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
72
|
+
countSeasonMatches: Sequelize.HasManyCountAssociationsMixin;
|
|
73
|
+
getseasonMatches: Sequelize.BelongsToManyGetAssociationsMixin<MatchModel>;
|
|
74
|
+
setseasonMatches: Sequelize.BelongsToManySetAssociationsMixin<MatchModel, MatchId>;
|
|
75
|
+
addMatch_id_Match: Sequelize.BelongsToManyAddAssociationMixin<MatchModel, MatchId>;
|
|
76
|
+
addseasonMatches: Sequelize.BelongsToManyAddAssociationsMixin<MatchModel, MatchId>;
|
|
77
|
+
createMatch_id_Match: Sequelize.BelongsToManyCreateAssociationMixin<MatchModel>;
|
|
78
|
+
removeMatch_id_Match: Sequelize.BelongsToManyRemoveAssociationMixin<MatchModel, MatchId>;
|
|
79
|
+
removeseasonMatches: Sequelize.BelongsToManyRemoveAssociationsMixin<MatchModel, MatchId>;
|
|
80
|
+
hasMatch_id_Match: Sequelize.BelongsToManyHasAssociationMixin<MatchModel, MatchId>;
|
|
81
|
+
hasseasonMatches: Sequelize.BelongsToManyHasAssociationsMixin<MatchModel, MatchId>;
|
|
82
|
+
countseasonMatches: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
60
83
|
Champion: TeamModel;
|
|
61
84
|
getChampion: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
|
|
62
85
|
setChampion: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
|
|
@@ -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
|
|
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 };
|
|
@@ -4,10 +4,9 @@ exports.transformFromMatch = exports.transformToAPIMatch = exports.transformToMa
|
|
|
4
4
|
const service_1 = require("../../service");
|
|
5
5
|
const team_1 = require("./team");
|
|
6
6
|
const match_set_1 = require("./match-set");
|
|
7
|
-
function transformToAttributes(match
|
|
7
|
+
function transformToAttributes(match) {
|
|
8
8
|
return {
|
|
9
9
|
match_id: match.id,
|
|
10
|
-
season_id: seasonId,
|
|
11
10
|
away_team: match.awayTeam.id,
|
|
12
11
|
home_team: match.homeTeam.id,
|
|
13
12
|
scheduled_date: match.scheduledDate.toISOString(),
|
|
@@ -17,7 +17,7 @@ exports.transformFromSeason = transformToAttributes;
|
|
|
17
17
|
function transformToObject(model) {
|
|
18
18
|
return new service_1.Season({
|
|
19
19
|
id: model.season_id,
|
|
20
|
-
matches: model.
|
|
20
|
+
matches: model.seasonMatches != null ? model.seasonMatches.map(match_1.transformToMatch) : [],
|
|
21
21
|
iteration: model.iteration,
|
|
22
22
|
teams: model.seasonTeams != null ? model.seasonTeams.map(team_1.transformToTeam) : [],
|
|
23
23
|
champion: model.Champion != null ? (0, team_1.transformToTeam)(model.Champion) : undefined
|
|
@@ -28,7 +28,7 @@ function transformToAPIObject(model) {
|
|
|
28
28
|
const season = transformToObject(model);
|
|
29
29
|
return {
|
|
30
30
|
id: model.season_id,
|
|
31
|
-
matches: model.
|
|
31
|
+
matches: model.seasonMatches != null ? model.seasonMatches.map(match_1.transformToAPIMatch) : [],
|
|
32
32
|
iteration: model.iteration,
|
|
33
33
|
teams: model.seasonTeams != null ? model.seasonTeams.map(team_1.transformToAPITeam) : [],
|
|
34
34
|
league: (0, league_1.transformToLeague)(model.league),
|
package/dist/cjs/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Block, BlockFailure, BlockType, Coach, CoachOpts, Country, CountryOpts, CourtPosition, CourtRow, CourtTarget, EventStat, EventType, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, InPlayEventOpts, League, LeagueOpts, LiberoReplacement, LiberoReplacementOpts, LiberoReplacementType, Match, MatchSet, MatchSetOpts, MatchSetState, MatchTeam, Name, PerformanceStats, PerformanceStatsOpts, Player, PlayerOpts, PlayerPosition, Rally, RallyEvent, RallyEventOpts, RallyState, randomNumber, Reception, ReceptionFailure, ReceptionType, Role, Score, Season, SeasonOpts, Serve, ServeFailure, ServeType, Set, SetFailure, SetStatistics, SetType, shuffle, Spike, SpikeFailure, SpikeType, Stage, Standing, StandingOpts, Stat, SubPriority, Substitution, SubstitutionOpts, Team, TeamOpts, Tournament, TournamentMatch, TournamentOpts, TournamentStageOpts, Trait, validateUUID } from './service';
|
|
2
2
|
import { APIBlock, APICoach, APIEvent, APIInPlayEvent, APILeague, APILiberoReplacement, APIMatch, APIMatchSet, APIPlayer, APIRally, APIReception, APIScore, APISeason, APIServe, APISet, APISetStatistics, APISpike, APISubstitution, APITeam, APITournament, APITournamentMatch, APITrait } from './routing';
|
|
3
|
-
import { BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, initModels, 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, 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 './data';
|
|
4
|
-
export { League, Standing, LeagueOpts, CountryOpts, SeasonOpts, Season, StandingOpts, Country, CoachOpts, Coach, Role, SubPriority, GeneralStat, PerformanceStats, Formation, Stat, PerformanceStatsOpts, Block, EventType, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockType, LiberoReplacementType, BlockFailure, MatchSetState, MatchSetOpts, LiberoReplacementOpts, RallyEventOpts, InPlayEventOpts, EventStat, Match, InPlayEvent, CourtRow, CourtPosition, CourtTarget, formatNumber, generateModifier, getKeys, MatchTeam, Name, PlayerOpts, Player, RallyState, PlayerPosition, randomNumber, ReceptionType, ServeFailure, ServeType, SetFailure, SetStatistics, SetType, ReceptionFailure, SpikeFailure, SpikeType, SubstitutionOpts, Team, shuffle, TeamOpts, Trait, getRandomEnumValue, validateUUID, APIBlock, APICoach, APIEvent, APILiberoReplacement, APIRally, APIReception, APIScore, APIServe, APISet, APISpike, APISubstitution, APILeague, APIMatch, APIInPlayEvent, APIMatchSet, APIPlayer, APISeason, APITeam, APITrait, APITournament, APITournamentMatch, APISetStatistics, initModels, BlockId, BlockModel, RallyModel, RallyId, EventId, EventModel, MatchSetId, MatchSetModel, PerformanceStatsModel, PerformanceStatsId, BlockAttributes, LiberoReplacementId, LiberoReplacementModel, BlockPk, MatchSetStatsId, MatchSetStatsModel, BlockCreationAttributes, ReceptionId, ReceptionModel, BlockOptionalAttributes, CoachAttributes, CoachId, CountryId, CountryModel, CoachCreationAttributes, CoachPk, ScoreId, ScoreModel, CoachModel, RallyPositionId, RallyPositionModel, CoachOptionalAttributes, CountryAttributes, CountryCreationAttributes, CountryPk, EventAttributes, EventPk, EventCreationAttributes, LeagueAttributes, LeagueId, LeagueCreationAttributes, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementPk, MatchAttributes, MatchId, MatchPk, MatchCreationAttributes, MatchModel, MatchSetAttributes, MatchSetCreationAttributes, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsOptionalAttributes, transformToAPICoach, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerCreationAttributes, PlayerAttributes, PlayerId, PlayerPk, RallyCreationAttributes, RallyAttributes, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPk, RallyPositionPk, ReceptionCreationAttributes, ReceptionAttributes, ReceptionPk, ScoreCreationAttributes, ScoreAttributes, ScorePk, SeasonCreationAttributes, SeasonAttributes, SeasonId, SeasonTeamsAttributes, PlayerModel, SeasonPk, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonModel, SeasonTeamsPk, ServeCreationAttributes, ServeAttributes, ServeId, ServeModel, SetAttributes, ServePk, SetId, SetModel, SetPk, SetCreationAttributes, SpikeCreationAttributes, SpikeAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionCreationAttributes, SubstitutionAttributes, TeamAttributes, TeamId, TeamModel, TeamPk, transformToStage, transformFromStage, SubstitutionId, SubstitutionModel, TeamCreationAttributes, SubstitutionPk, RoleType, TraitType, TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk, TournamentMatchAttributes, TournamentMatchModel, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentStage, transformFromBlock, transformToAPIBlock, transformToBlock, transformFromCoach, transformFromCountry, transformFromRally, transformToAPIReception, transformToReception, transformToAPIScore, transformToScore, transformFromFormation, transformFromMatch, transformToAPISet, transformToSet, transformFromMatchSet, transformFromMatchSetStats, transformFromLeague, transformFromPlayer, transformFromPlayerPosition, transformToPlayerPosition, transformFromCourtPosition, transformFromCourtTarget, transformFromPerformanceStats, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromEventType, transformFromServe, transformToAPIServe, transformToServe, transformFromSet, transformFromSpike, transformToAPISpike, transformToSpike, transformFromSubstitution, transformToAPISubstitution, transformToSubstitution, transformFromTeam, transformFromTrait, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, Stage, TournamentStageOpts, TournamentMatch, Tournament, TournamentOpts, };
|
|
3
|
+
import { BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, initModels, 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, 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 './data';
|
|
4
|
+
export { League, Standing, LeagueOpts, CountryOpts, SeasonOpts, Season, StandingOpts, Country, CoachOpts, Coach, Role, SubPriority, GeneralStat, PerformanceStats, Formation, Stat, PerformanceStatsOpts, Block, EventType, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockType, LiberoReplacementType, BlockFailure, MatchSetState, MatchSetOpts, LiberoReplacementOpts, RallyEventOpts, InPlayEventOpts, EventStat, Match, InPlayEvent, CourtRow, CourtPosition, CourtTarget, formatNumber, generateModifier, getKeys, MatchTeam, Name, PlayerOpts, Player, RallyState, PlayerPosition, randomNumber, ReceptionType, ServeFailure, ServeType, SetFailure, SetStatistics, SetType, ReceptionFailure, SpikeFailure, SpikeType, SubstitutionOpts, Team, shuffle, TeamOpts, Trait, getRandomEnumValue, validateUUID, APIBlock, APICoach, APIEvent, APILiberoReplacement, APIRally, APIReception, APIScore, APIServe, APISet, APISpike, APISubstitution, APILeague, APIMatch, APIInPlayEvent, APIMatchSet, APIPlayer, APISeason, APITeam, APITrait, APITournament, APITournamentMatch, APISetStatistics, initModels, BlockId, BlockModel, RallyModel, RallyId, EventId, EventModel, MatchSetId, MatchSetModel, PerformanceStatsModel, PerformanceStatsId, BlockAttributes, LiberoReplacementId, LiberoReplacementModel, BlockPk, MatchSetStatsId, MatchSetStatsModel, BlockCreationAttributes, ReceptionId, ReceptionModel, BlockOptionalAttributes, CoachAttributes, CoachId, CountryId, CountryModel, CoachCreationAttributes, CoachPk, ScoreId, ScoreModel, CoachModel, RallyPositionId, RallyPositionModel, CoachOptionalAttributes, CountryAttributes, CountryCreationAttributes, CountryPk, EventAttributes, EventPk, EventCreationAttributes, LeagueAttributes, LeagueId, LeagueCreationAttributes, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementPk, MatchAttributes, MatchId, MatchPk, MatchCreationAttributes, MatchModel, MatchSetAttributes, MatchSetCreationAttributes, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsOptionalAttributes, transformToAPICoach, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerCreationAttributes, PlayerAttributes, PlayerId, PlayerPk, RallyCreationAttributes, RallyAttributes, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPk, RallyPositionPk, ReceptionCreationAttributes, ReceptionAttributes, ReceptionPk, ScoreCreationAttributes, ScoreAttributes, ScorePk, SeasonCreationAttributes, SeasonAttributes, SeasonId, SeasonTeamsAttributes, PlayerModel, SeasonPk, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonModel, SeasonTeamsPk, ServeCreationAttributes, ServeAttributes, ServeId, ServeModel, SetAttributes, ServePk, SetId, SetModel, SetPk, SetCreationAttributes, SpikeCreationAttributes, SpikeAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionCreationAttributes, SubstitutionAttributes, TeamAttributes, TeamId, TeamModel, TeamPk, transformToStage, transformFromStage, SubstitutionId, SubstitutionModel, TeamCreationAttributes, SubstitutionPk, RoleType, TraitType, TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk, TournamentMatchAttributes, TournamentMatchModel, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentStage, SeasonMatchesModel, SeasonMatchesAttributes, SeasonMatchesCreationAttributes, SeasonMatchesId, SeasonMatchesPk, transformFromBlock, transformToAPIBlock, transformToBlock, transformFromCoach, transformFromCountry, transformFromRally, transformToAPIReception, transformToReception, transformToAPIScore, transformToScore, transformFromFormation, transformFromMatch, transformToAPISet, transformToSet, transformFromMatchSet, transformFromMatchSetStats, transformFromLeague, transformFromPlayer, transformFromPlayerPosition, transformToPlayerPosition, transformFromCourtPosition, transformFromCourtTarget, transformFromPerformanceStats, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromEventType, transformFromServe, transformToAPIServe, transformToServe, transformFromSet, transformFromSpike, transformToAPISpike, transformToSpike, transformFromSubstitution, transformToAPISubstitution, transformToSubstitution, transformFromTeam, transformFromTrait, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, Stage, TournamentStageOpts, TournamentMatch, Tournament, TournamentOpts, };
|
package/dist/cjs/src/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateUUID = exports.getRandomEnumValue = exports.Trait = exports.shuffle = exports.Team = exports.SpikeType = exports.SpikeFailure = exports.ReceptionFailure = exports.SetType = exports.SetFailure = exports.ServeType = exports.ServeFailure = exports.ReceptionType = exports.randomNumber = exports.RallyState = exports.Player = exports.MatchTeam = exports.getKeys = exports.generateModifier = exports.formatNumber = exports.CourtTarget = exports.CourtPosition = exports.CourtRow = exports.InPlayEvent = exports.Match = exports.MatchSetState = exports.BlockFailure = exports.LiberoReplacementType = exports.BlockType = exports.Substitution = exports.Spike = exports.Set = exports.Serve = exports.Score = exports.Reception = exports.RallyEvent = exports.Rally = exports.MatchSet = exports.LiberoReplacement = exports.EventType = exports.Block = exports.Formation = exports.PerformanceStats = exports.GeneralStat = exports.Role = exports.Coach = exports.Country = exports.Season = exports.Standing = exports.League = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.Tournament = exports.TournamentMatch = exports.Stage = exports.transformToTournamentMatch = exports.transformToAPITournamentMatch = exports.transformFromTournamentMatch = void 0;
|
|
4
|
+
exports.transformToPlayerPosition = exports.transformFromPlayerPosition = exports.transformFromPlayer = exports.transformFromLeague = exports.transformFromMatchSetStats = exports.transformFromMatchSet = exports.transformToSet = exports.transformToAPISet = exports.transformFromMatch = exports.transformFromFormation = exports.transformToScore = exports.transformToAPIScore = exports.transformToReception = exports.transformToAPIReception = exports.transformFromRally = exports.transformFromCountry = exports.transformFromCoach = exports.transformToBlock = exports.transformToAPIBlock = exports.transformFromBlock = exports.SeasonMatchesModel = exports.TournamentMatchModel = exports.TournamentModel = exports.SubstitutionModel = exports.transformFromStage = exports.transformToStage = exports.TeamModel = exports.SpikeModel = exports.SetModel = exports.ServeModel = exports.SeasonModel = exports.SeasonTeamsModel = exports.PlayerModel = exports.transformToAPICoach = exports.MatchModel = exports.LeagueModel = exports.RallyPositionModel = exports.CoachModel = exports.ScoreModel = exports.CountryModel = exports.ReceptionModel = exports.MatchSetStatsModel = exports.LiberoReplacementModel = exports.PerformanceStatsModel = exports.MatchSetModel = exports.EventModel = exports.RallyModel = exports.BlockModel = exports.initModels = exports.APITrait = void 0;
|
|
5
|
+
exports.transformToAPITournament = exports.transformFromTournament = exports.transformToRole = exports.transformToLeague = exports.transformToTrait = exports.transformToTeam = exports.transformToSeason = exports.transformToMatch = exports.transformToRally = exports.transformToPlayer = exports.transformToPerformanceStats = exports.transformToMatchSetStats = exports.transformToFormation = exports.transformToCourtTarget = exports.transformToCourtPosition = exports.transformToMatchSet = exports.transformToEventType = exports.transformToCountry = exports.transformToCoach = exports.transformToLiberoReplacement = exports.transformToAPILiberoReplacement = exports.transformFromLiberoReplacement = exports.transformToAPITrait = exports.transformToAPITeam = exports.transformToAPISeason = exports.transformToAPIRally = exports.transformToAPIPlayer = exports.transformToAPIMatchSetStats = exports.transformToAPIMatchSet = exports.transformToAPIMatch = exports.transformFromTrait = exports.transformFromTeam = exports.transformToSubstitution = exports.transformToAPISubstitution = exports.transformFromSubstitution = exports.transformToSpike = exports.transformToAPISpike = exports.transformFromSpike = exports.transformFromSet = exports.transformToServe = exports.transformToAPIServe = exports.transformFromServe = exports.transformFromEventType = exports.transformFromSeason = exports.transformFromScore = exports.transformFromRole = exports.transformFromReception = exports.transformFromPerformanceStats = exports.transformFromCourtTarget = exports.transformFromCourtPosition = void 0;
|
|
6
|
+
exports.Tournament = exports.TournamentMatch = exports.Stage = exports.transformToTournamentMatch = exports.transformToAPITournamentMatch = exports.transformFromTournamentMatch = exports.transformToTournament = void 0;
|
|
7
7
|
const service_1 = require("./service");
|
|
8
8
|
Object.defineProperty(exports, "Block", { enumerable: true, get: function () { return service_1.Block; } });
|
|
9
9
|
Object.defineProperty(exports, "BlockFailure", { enumerable: true, get: function () { return service_1.BlockFailure; } });
|
|
@@ -77,6 +77,7 @@ Object.defineProperty(exports, "RallyModel", { enumerable: true, get: function (
|
|
|
77
77
|
Object.defineProperty(exports, "RallyPositionModel", { enumerable: true, get: function () { return data_1.RallyPositionModel; } });
|
|
78
78
|
Object.defineProperty(exports, "ReceptionModel", { enumerable: true, get: function () { return data_1.ReceptionModel; } });
|
|
79
79
|
Object.defineProperty(exports, "ScoreModel", { enumerable: true, get: function () { return data_1.ScoreModel; } });
|
|
80
|
+
Object.defineProperty(exports, "SeasonMatchesModel", { enumerable: true, get: function () { return data_1.SeasonMatchesModel; } });
|
|
80
81
|
Object.defineProperty(exports, "SeasonModel", { enumerable: true, get: function () { return data_1.SeasonModel; } });
|
|
81
82
|
Object.defineProperty(exports, "SeasonTeamsModel", { enumerable: true, get: function () { return data_1.SeasonTeamsModel; } });
|
|
82
83
|
Object.defineProperty(exports, "ServeModel", { enumerable: true, get: function () { return data_1.ServeModel; } });
|
|
@@ -8,8 +8,8 @@ class Season {
|
|
|
8
8
|
this.teams = teams;
|
|
9
9
|
this.matches = matches;
|
|
10
10
|
this.iteration = iteration;
|
|
11
|
-
this.standings = this.calculateStandings();
|
|
12
11
|
this.champion = champion;
|
|
12
|
+
this.standings = this.calculateStandings();
|
|
13
13
|
}
|
|
14
14
|
calculateStandings() {
|
|
15
15
|
return this.teams.map(team => {
|
|
@@ -19,6 +19,8 @@ class Season {
|
|
|
19
19
|
}).sort(standing_1.Standing.sortFn);
|
|
20
20
|
}
|
|
21
21
|
updateStandings() {
|
|
22
|
+
if (this.matches == null || this.matches.length < 1)
|
|
23
|
+
throw new Error('NO_MATCHES');
|
|
22
24
|
this.standings.length = 0;
|
|
23
25
|
this.standings.push(...this.calculateStandings());
|
|
24
26
|
if (this.matches.every((match) => match.isSimulated)) {
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
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';
|
|
1
|
+
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
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, TournamentModel, TournamentMatchModel, BlockModel, CoachModel, CountryModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, 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, TournamentModel, TournamentMatchModel, BlockModel, CoachModel, CountryModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, 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,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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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';
|
|
1
|
+
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
2
|
export function initModels(sequelize) {
|
|
3
3
|
const Block = BlockModel.initModel(sequelize);
|
|
4
4
|
const Coach = CoachModel.initModel(sequelize);
|
|
@@ -17,6 +17,7 @@ export function initModels(sequelize) {
|
|
|
17
17
|
const Score = ScoreModel.initModel(sequelize);
|
|
18
18
|
const Season = SeasonModel.initModel(sequelize);
|
|
19
19
|
const SeasonTeams = SeasonTeamsModel.initModel(sequelize);
|
|
20
|
+
const SeasonMatches = SeasonMatchesModel.initModel(sequelize);
|
|
20
21
|
const Serve = ServeModel.initModel(sequelize);
|
|
21
22
|
const Set = SetModel.initModel(sequelize);
|
|
22
23
|
const Spike = SpikeModel.initModel(sequelize);
|
|
@@ -60,6 +61,30 @@ export function initModels(sequelize) {
|
|
|
60
61
|
foreignKey: 'team_id',
|
|
61
62
|
otherKey: 'season_id'
|
|
62
63
|
});
|
|
64
|
+
Season.belongsToMany(Match, {
|
|
65
|
+
as: 'seasonMatches',
|
|
66
|
+
through: SeasonMatches,
|
|
67
|
+
foreignKey: 'season_id',
|
|
68
|
+
otherKey: 'match_id'
|
|
69
|
+
});
|
|
70
|
+
Match.belongsToMany(Season, {
|
|
71
|
+
as: 'season_id_Seasons',
|
|
72
|
+
through: SeasonMatches,
|
|
73
|
+
foreignKey: 'match_id',
|
|
74
|
+
otherKey: 'season_id'
|
|
75
|
+
});
|
|
76
|
+
Tournament.belongsToMany(Match, {
|
|
77
|
+
as: 'tournamentMatch',
|
|
78
|
+
through: TournamentMatch,
|
|
79
|
+
foreignKey: 'tournament_id',
|
|
80
|
+
otherKey: 'match_id'
|
|
81
|
+
});
|
|
82
|
+
Match.belongsToMany(Tournament, {
|
|
83
|
+
as: 'tournament_id_Tournaments',
|
|
84
|
+
through: TournamentMatch,
|
|
85
|
+
foreignKey: 'match_id',
|
|
86
|
+
otherKey: 'tournament_id'
|
|
87
|
+
});
|
|
63
88
|
Team.belongsTo(Coach, { as: 'coach', foreignKey: 'coach_id' });
|
|
64
89
|
Coach.hasMany(Team, { as: 'Teams', foreignKey: 'coach_id' });
|
|
65
90
|
Coach.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
|
|
@@ -150,14 +175,17 @@ export function initModels(sequelize) {
|
|
|
150
175
|
Team.hasMany(Score, { as: 'Scores', foreignKey: 'team_id' });
|
|
151
176
|
SeasonTeams.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
|
|
152
177
|
Team.hasMany(SeasonTeams, { as: 'SeasonTeams', foreignKey: 'team_id' });
|
|
153
|
-
Match.
|
|
154
|
-
Season.hasMany(
|
|
178
|
+
Match.hasMany(SeasonMatches, { as: 'SeasonMatches', foreignKey: 'match_id' });
|
|
179
|
+
Season.hasMany(SeasonMatches, { as: 'SeasonMatches', foreignKey: 'season_id' });
|
|
180
|
+
SeasonMatches.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
|
|
181
|
+
SeasonMatches.belongsTo(Season, { as: 'season', foreignKey: 'season_id' });
|
|
155
182
|
Team.belongsTo(League, { as: 'league', foreignKey: 'league_id' });
|
|
156
183
|
League.hasMany(League, { as: 'Teams', foreignKey: 'league_id' });
|
|
157
184
|
Season.belongsTo(Team, { as: 'Champion', foreignKey: 'champion' });
|
|
158
185
|
Team.hasMany(Season, { as: 'titles', foreignKey: 'champion' });
|
|
159
|
-
Tournament.hasMany(TournamentMatch, { as: 'Matches', foreignKey: 'tournament_id' });
|
|
160
186
|
Tournament.belongsTo(Team, { as: 'Champion', foreignKey: 'champion' });
|
|
187
|
+
Tournament.hasMany(TournamentMatch, { as: 'Matches', foreignKey: 'tournament_id' });
|
|
188
|
+
Match.hasMany(TournamentMatch, { as: 'TournamentMatch', foreignKey: 'match_id' });
|
|
161
189
|
TournamentMatch.belongsTo(Tournament, { as: 'tournament', foreignKey: 'tournament_id' });
|
|
162
190
|
TournamentMatch.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
|
|
163
191
|
return {
|
|
@@ -178,6 +206,7 @@ export function initModels(sequelize) {
|
|
|
178
206
|
Score,
|
|
179
207
|
Season,
|
|
180
208
|
SeasonTeams,
|
|
209
|
+
SeasonMatches,
|
|
181
210
|
Serve,
|
|
182
211
|
Set,
|
|
183
212
|
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, };
|
|
@@ -14,7 +14,8 @@ import { RallyPositionModel } from './rally-position';
|
|
|
14
14
|
import { ReceptionModel, } from './reception';
|
|
15
15
|
import { ScoreModel } from './score';
|
|
16
16
|
import { SeasonModel } from './season';
|
|
17
|
-
import { SeasonTeamsModel
|
|
17
|
+
import { SeasonTeamsModel } from './season-teams';
|
|
18
|
+
import { SeasonMatchesModel } from './season-matches';
|
|
18
19
|
import { ServeModel } from './serve';
|
|
19
20
|
import { SetModel } from './set';
|
|
20
21
|
import { SpikeModel } from './spike';
|
|
@@ -22,4 +23,4 @@ import { SubstitutionModel, } from './substitution';
|
|
|
22
23
|
import { TeamModel } from './team';
|
|
23
24
|
import { TournamentModel } from './tournament';
|
|
24
25
|
import { TournamentMatchModel } from './tournament-match';
|
|
25
|
-
export { TournamentModel, TournamentMatchModel, BlockModel, CoachModel, CountryModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, };
|
|
26
|
+
export { TournamentModel, TournamentMatchModel, BlockModel, CoachModel, CountryModel, SeasonMatchesModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, };
|
|
@@ -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
|
}
|
|
@@ -30,14 +30,6 @@ export class MatchModel extends Model {
|
|
|
30
30
|
is_simulated: {
|
|
31
31
|
type: DataTypes.BOOLEAN,
|
|
32
32
|
allowNull: false
|
|
33
|
-
},
|
|
34
|
-
season_id: {
|
|
35
|
-
type: DataTypes.UUID,
|
|
36
|
-
allowNull: false,
|
|
37
|
-
references: {
|
|
38
|
-
model: 'Season',
|
|
39
|
-
key: 'season_id'
|
|
40
|
-
}
|
|
41
33
|
}
|
|
42
34
|
}, {
|
|
43
35
|
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,40 @@
|
|
|
1
|
+
import { DataTypes, Model } from 'sequelize';
|
|
2
|
+
export class SeasonMatchesModel extends Model {
|
|
3
|
+
static initModel(sequelize) {
|
|
4
|
+
return SeasonMatchesModel.init({
|
|
5
|
+
season_id: {
|
|
6
|
+
type: DataTypes.UUID,
|
|
7
|
+
allowNull: false,
|
|
8
|
+
primaryKey: true,
|
|
9
|
+
references: {
|
|
10
|
+
model: 'Season',
|
|
11
|
+
key: 'season_id'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
match_id: {
|
|
15
|
+
type: DataTypes.UUID,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
primaryKey: true,
|
|
18
|
+
references: {
|
|
19
|
+
model: 'Match',
|
|
20
|
+
key: 'match_id'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}, {
|
|
24
|
+
sequelize,
|
|
25
|
+
tableName: 'SeasonMatches',
|
|
26
|
+
schema: 'public',
|
|
27
|
+
timestamps: false,
|
|
28
|
+
indexes: [
|
|
29
|
+
{
|
|
30
|
+
name: 'SeasonMatches_pk',
|
|
31
|
+
unique: true,
|
|
32
|
+
fields: [
|
|
33
|
+
{ name: 'season_id' },
|
|
34
|
+
{ name: 'match_id' }
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -4,11 +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[];
|
|
13
|
+
seasonMatches?: MatchAttributes[];
|
|
12
14
|
Matches?: MatchAttributes[];
|
|
13
15
|
league?: LeagueAttributes;
|
|
14
16
|
champion?: string;
|
|
@@ -21,7 +23,7 @@ export declare class SeasonModel extends Model<SeasonAttributes, SeasonCreationA
|
|
|
21
23
|
iteration: number;
|
|
22
24
|
league_id: string;
|
|
23
25
|
seasonTeams: TeamModel[];
|
|
24
|
-
|
|
26
|
+
seasonMatches: MatchModel[];
|
|
25
27
|
league: LeagueModel;
|
|
26
28
|
getLeague: Sequelize.BelongsToGetAssociationMixin<LeagueModel>;
|
|
27
29
|
setLeague: Sequelize.BelongsToSetAssociationMixin<LeagueModel, LeagueId>;
|
|
@@ -57,6 +59,27 @@ export declare class SeasonModel extends Model<SeasonAttributes, SeasonCreationA
|
|
|
57
59
|
hasTeam_id_Team: Sequelize.BelongsToManyHasAssociationMixin<TeamModel, TeamId>;
|
|
58
60
|
hasseasonTeams: Sequelize.BelongsToManyHasAssociationsMixin<TeamModel, TeamId>;
|
|
59
61
|
countseasonTeams: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
62
|
+
SeasonMatches: SeasonMatchesModel[];
|
|
63
|
+
getSeasonMatches: Sequelize.HasManyGetAssociationsMixin<SeasonMatchesModel>;
|
|
64
|
+
setSeasonMatches: Sequelize.HasManySetAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
65
|
+
addSeasonMatch: Sequelize.HasManyAddAssociationMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
66
|
+
addSeasonMatches: Sequelize.HasManyAddAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
67
|
+
createSeasonMatch: Sequelize.HasManyCreateAssociationMixin<SeasonMatchesModel>;
|
|
68
|
+
removeSeasonMatch: Sequelize.HasManyRemoveAssociationMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
69
|
+
removeSeasonMatches: Sequelize.HasManyRemoveAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
70
|
+
hasSeasonMatch: Sequelize.HasManyHasAssociationMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
71
|
+
hasSeasonMatches: Sequelize.HasManyHasAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
72
|
+
countSeasonMatches: Sequelize.HasManyCountAssociationsMixin;
|
|
73
|
+
getseasonMatches: Sequelize.BelongsToManyGetAssociationsMixin<MatchModel>;
|
|
74
|
+
setseasonMatches: Sequelize.BelongsToManySetAssociationsMixin<MatchModel, MatchId>;
|
|
75
|
+
addMatch_id_Match: Sequelize.BelongsToManyAddAssociationMixin<MatchModel, MatchId>;
|
|
76
|
+
addseasonMatches: Sequelize.BelongsToManyAddAssociationsMixin<MatchModel, MatchId>;
|
|
77
|
+
createMatch_id_Match: Sequelize.BelongsToManyCreateAssociationMixin<MatchModel>;
|
|
78
|
+
removeMatch_id_Match: Sequelize.BelongsToManyRemoveAssociationMixin<MatchModel, MatchId>;
|
|
79
|
+
removeseasonMatches: Sequelize.BelongsToManyRemoveAssociationsMixin<MatchModel, MatchId>;
|
|
80
|
+
hasMatch_id_Match: Sequelize.BelongsToManyHasAssociationMixin<MatchModel, MatchId>;
|
|
81
|
+
hasseasonMatches: Sequelize.BelongsToManyHasAssociationsMixin<MatchModel, MatchId>;
|
|
82
|
+
countseasonMatches: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
60
83
|
Champion: TeamModel;
|
|
61
84
|
getChampion: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
|
|
62
85
|
setChampion: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
|
|
@@ -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
|
|
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 };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Match } from '../../service';
|
|
2
2
|
import { transformToAPITeam, transformToTeam } from './team';
|
|
3
3
|
import { transformToAPIMatchSet, transformToMatchSet } from './match-set';
|
|
4
|
-
function transformToAttributes(match
|
|
4
|
+
function transformToAttributes(match) {
|
|
5
5
|
return {
|
|
6
6
|
match_id: match.id,
|
|
7
|
-
season_id: seasonId,
|
|
8
7
|
away_team: match.awayTeam.id,
|
|
9
8
|
home_team: match.homeTeam.id,
|
|
10
9
|
scheduled_date: match.scheduledDate.toISOString(),
|
|
@@ -13,7 +13,7 @@ function transformToAttributes(season, leagueId) {
|
|
|
13
13
|
function transformToObject(model) {
|
|
14
14
|
return new Season({
|
|
15
15
|
id: model.season_id,
|
|
16
|
-
matches: model.
|
|
16
|
+
matches: model.seasonMatches != null ? model.seasonMatches.map(transformToMatch) : [],
|
|
17
17
|
iteration: model.iteration,
|
|
18
18
|
teams: model.seasonTeams != null ? model.seasonTeams.map(transformToTeam) : [],
|
|
19
19
|
champion: model.Champion != null ? transformToTeam(model.Champion) : undefined
|
|
@@ -23,7 +23,7 @@ function transformToAPIObject(model) {
|
|
|
23
23
|
const season = transformToObject(model);
|
|
24
24
|
return {
|
|
25
25
|
id: model.season_id,
|
|
26
|
-
matches: model.
|
|
26
|
+
matches: model.seasonMatches != null ? model.seasonMatches.map(transformToAPIMatch) : [],
|
|
27
27
|
iteration: model.iteration,
|
|
28
28
|
teams: model.seasonTeams != null ? model.seasonTeams.map(transformToAPITeam) : [],
|
|
29
29
|
league: transformToLeague(model.league),
|
package/dist/esm/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Block, BlockFailure, BlockType, Coach, CoachOpts, Country, CountryOpts, CourtPosition, CourtRow, CourtTarget, EventStat, EventType, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, InPlayEventOpts, League, LeagueOpts, LiberoReplacement, LiberoReplacementOpts, LiberoReplacementType, Match, MatchSet, MatchSetOpts, MatchSetState, MatchTeam, Name, PerformanceStats, PerformanceStatsOpts, Player, PlayerOpts, PlayerPosition, Rally, RallyEvent, RallyEventOpts, RallyState, randomNumber, Reception, ReceptionFailure, ReceptionType, Role, Score, Season, SeasonOpts, Serve, ServeFailure, ServeType, Set, SetFailure, SetStatistics, SetType, shuffle, Spike, SpikeFailure, SpikeType, Stage, Standing, StandingOpts, Stat, SubPriority, Substitution, SubstitutionOpts, Team, TeamOpts, Tournament, TournamentMatch, TournamentOpts, TournamentStageOpts, Trait, validateUUID } from './service';
|
|
2
2
|
import { APIBlock, APICoach, APIEvent, APIInPlayEvent, APILeague, APILiberoReplacement, APIMatch, APIMatchSet, APIPlayer, APIRally, APIReception, APIScore, APISeason, APIServe, APISet, APISetStatistics, APISpike, APISubstitution, APITeam, APITournament, APITournamentMatch, APITrait } from './routing';
|
|
3
|
-
import { BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, initModels, 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, 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 './data';
|
|
4
|
-
export { League, Standing, LeagueOpts, CountryOpts, SeasonOpts, Season, StandingOpts, Country, CoachOpts, Coach, Role, SubPriority, GeneralStat, PerformanceStats, Formation, Stat, PerformanceStatsOpts, Block, EventType, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockType, LiberoReplacementType, BlockFailure, MatchSetState, MatchSetOpts, LiberoReplacementOpts, RallyEventOpts, InPlayEventOpts, EventStat, Match, InPlayEvent, CourtRow, CourtPosition, CourtTarget, formatNumber, generateModifier, getKeys, MatchTeam, Name, PlayerOpts, Player, RallyState, PlayerPosition, randomNumber, ReceptionType, ServeFailure, ServeType, SetFailure, SetStatistics, SetType, ReceptionFailure, SpikeFailure, SpikeType, SubstitutionOpts, Team, shuffle, TeamOpts, Trait, getRandomEnumValue, validateUUID, APIBlock, APICoach, APIEvent, APILiberoReplacement, APIRally, APIReception, APIScore, APIServe, APISet, APISpike, APISubstitution, APILeague, APIMatch, APIInPlayEvent, APIMatchSet, APIPlayer, APISeason, APITeam, APITrait, APITournament, APITournamentMatch, APISetStatistics, initModels, BlockId, BlockModel, RallyModel, RallyId, EventId, EventModel, MatchSetId, MatchSetModel, PerformanceStatsModel, PerformanceStatsId, BlockAttributes, LiberoReplacementId, LiberoReplacementModel, BlockPk, MatchSetStatsId, MatchSetStatsModel, BlockCreationAttributes, ReceptionId, ReceptionModel, BlockOptionalAttributes, CoachAttributes, CoachId, CountryId, CountryModel, CoachCreationAttributes, CoachPk, ScoreId, ScoreModel, CoachModel, RallyPositionId, RallyPositionModel, CoachOptionalAttributes, CountryAttributes, CountryCreationAttributes, CountryPk, EventAttributes, EventPk, EventCreationAttributes, LeagueAttributes, LeagueId, LeagueCreationAttributes, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementPk, MatchAttributes, MatchId, MatchPk, MatchCreationAttributes, MatchModel, MatchSetAttributes, MatchSetCreationAttributes, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsOptionalAttributes, transformToAPICoach, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerCreationAttributes, PlayerAttributes, PlayerId, PlayerPk, RallyCreationAttributes, RallyAttributes, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPk, RallyPositionPk, ReceptionCreationAttributes, ReceptionAttributes, ReceptionPk, ScoreCreationAttributes, ScoreAttributes, ScorePk, SeasonCreationAttributes, SeasonAttributes, SeasonId, SeasonTeamsAttributes, PlayerModel, SeasonPk, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonModel, SeasonTeamsPk, ServeCreationAttributes, ServeAttributes, ServeId, ServeModel, SetAttributes, ServePk, SetId, SetModel, SetPk, SetCreationAttributes, SpikeCreationAttributes, SpikeAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionCreationAttributes, SubstitutionAttributes, TeamAttributes, TeamId, TeamModel, TeamPk, transformToStage, transformFromStage, SubstitutionId, SubstitutionModel, TeamCreationAttributes, SubstitutionPk, RoleType, TraitType, TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk, TournamentMatchAttributes, TournamentMatchModel, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentStage, transformFromBlock, transformToAPIBlock, transformToBlock, transformFromCoach, transformFromCountry, transformFromRally, transformToAPIReception, transformToReception, transformToAPIScore, transformToScore, transformFromFormation, transformFromMatch, transformToAPISet, transformToSet, transformFromMatchSet, transformFromMatchSetStats, transformFromLeague, transformFromPlayer, transformFromPlayerPosition, transformToPlayerPosition, transformFromCourtPosition, transformFromCourtTarget, transformFromPerformanceStats, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromEventType, transformFromServe, transformToAPIServe, transformToServe, transformFromSet, transformFromSpike, transformToAPISpike, transformToSpike, transformFromSubstitution, transformToAPISubstitution, transformToSubstitution, transformFromTeam, transformFromTrait, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, Stage, TournamentStageOpts, TournamentMatch, Tournament, TournamentOpts, };
|
|
3
|
+
import { BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, initModels, 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, 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 './data';
|
|
4
|
+
export { League, Standing, LeagueOpts, CountryOpts, SeasonOpts, Season, StandingOpts, Country, CoachOpts, Coach, Role, SubPriority, GeneralStat, PerformanceStats, Formation, Stat, PerformanceStatsOpts, Block, EventType, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockType, LiberoReplacementType, BlockFailure, MatchSetState, MatchSetOpts, LiberoReplacementOpts, RallyEventOpts, InPlayEventOpts, EventStat, Match, InPlayEvent, CourtRow, CourtPosition, CourtTarget, formatNumber, generateModifier, getKeys, MatchTeam, Name, PlayerOpts, Player, RallyState, PlayerPosition, randomNumber, ReceptionType, ServeFailure, ServeType, SetFailure, SetStatistics, SetType, ReceptionFailure, SpikeFailure, SpikeType, SubstitutionOpts, Team, shuffle, TeamOpts, Trait, getRandomEnumValue, validateUUID, APIBlock, APICoach, APIEvent, APILiberoReplacement, APIRally, APIReception, APIScore, APIServe, APISet, APISpike, APISubstitution, APILeague, APIMatch, APIInPlayEvent, APIMatchSet, APIPlayer, APISeason, APITeam, APITrait, APITournament, APITournamentMatch, APISetStatistics, initModels, BlockId, BlockModel, RallyModel, RallyId, EventId, EventModel, MatchSetId, MatchSetModel, PerformanceStatsModel, PerformanceStatsId, BlockAttributes, LiberoReplacementId, LiberoReplacementModel, BlockPk, MatchSetStatsId, MatchSetStatsModel, BlockCreationAttributes, ReceptionId, ReceptionModel, BlockOptionalAttributes, CoachAttributes, CoachId, CountryId, CountryModel, CoachCreationAttributes, CoachPk, ScoreId, ScoreModel, CoachModel, RallyPositionId, RallyPositionModel, CoachOptionalAttributes, CountryAttributes, CountryCreationAttributes, CountryPk, EventAttributes, EventPk, EventCreationAttributes, LeagueAttributes, LeagueId, LeagueCreationAttributes, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementPk, MatchAttributes, MatchId, MatchPk, MatchCreationAttributes, MatchModel, MatchSetAttributes, MatchSetCreationAttributes, MatchSetOptionalAttributes, MatchSetPk, MatchSetStatsAttributes, MatchSetStatsCreationAttributes, MatchSetStatsOptionalAttributes, transformToAPICoach, MatchSetStatsPk, PerformanceStatsAttributes, PerformanceStatsCreationAttributes, PerformanceStatsOptionalAttributes, PerformanceStatsPk, PlayerCreationAttributes, PlayerAttributes, PlayerId, PlayerPk, RallyCreationAttributes, RallyAttributes, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPk, RallyPositionPk, ReceptionCreationAttributes, ReceptionAttributes, ReceptionPk, ScoreCreationAttributes, ScoreAttributes, ScorePk, SeasonCreationAttributes, SeasonAttributes, SeasonId, SeasonTeamsAttributes, PlayerModel, SeasonPk, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonModel, SeasonTeamsPk, ServeCreationAttributes, ServeAttributes, ServeId, ServeModel, SetAttributes, ServePk, SetId, SetModel, SetPk, SetCreationAttributes, SpikeCreationAttributes, SpikeAttributes, SpikeId, SpikeModel, SpikePk, SubstitutionCreationAttributes, SubstitutionAttributes, TeamAttributes, TeamId, TeamModel, TeamPk, transformToStage, transformFromStage, SubstitutionId, SubstitutionModel, TeamCreationAttributes, SubstitutionPk, RoleType, TraitType, TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk, TournamentMatchAttributes, TournamentMatchModel, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentStage, SeasonMatchesModel, SeasonMatchesAttributes, SeasonMatchesCreationAttributes, SeasonMatchesId, SeasonMatchesPk, transformFromBlock, transformToAPIBlock, transformToBlock, transformFromCoach, transformFromCountry, transformFromRally, transformToAPIReception, transformToReception, transformToAPIScore, transformToScore, transformFromFormation, transformFromMatch, transformToAPISet, transformToSet, transformFromMatchSet, transformFromMatchSetStats, transformFromLeague, transformFromPlayer, transformFromPlayerPosition, transformToPlayerPosition, transformFromCourtPosition, transformFromCourtTarget, transformFromPerformanceStats, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromEventType, transformFromServe, transformToAPIServe, transformToServe, transformFromSet, transformFromSpike, transformToAPISpike, transformToSpike, transformFromSubstitution, transformToAPISubstitution, transformToSubstitution, transformFromTeam, transformFromTrait, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, Stage, TournamentStageOpts, TournamentMatch, Tournament, TournamentOpts, };
|
package/dist/esm/src/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Block, BlockFailure, BlockType, Coach, Country, CourtPosition, CourtRow, CourtTarget, EventType, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, League, LiberoReplacement, LiberoReplacementType, Match, MatchSet, MatchSetState, MatchTeam, PerformanceStats, Player, Rally, RallyEvent, RallyState, randomNumber, Reception, ReceptionFailure, ReceptionType, Role, Score, Season, Serve, ServeFailure, ServeType, Set, SetFailure, SetType, shuffle, Spike, SpikeFailure, SpikeType, Stage, Standing, Substitution, Team, Tournament, TournamentMatch, Trait, validateUUID } from './service';
|
|
2
2
|
import { APITrait } from './routing';
|
|
3
|
-
import { BlockModel, CoachModel, CountryModel, EventModel, initModels, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentMatchModel, TournamentModel, 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 './data';
|
|
4
|
-
export { League, Standing, Season, Country, Coach, Role, GeneralStat, PerformanceStats, Formation, Block, EventType, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockType, LiberoReplacementType, BlockFailure, MatchSetState, Match, InPlayEvent, CourtRow, CourtPosition, CourtTarget, formatNumber, generateModifier, getKeys, MatchTeam, Player, RallyState, randomNumber, ReceptionType, ServeFailure, ServeType, SetFailure, SetType, ReceptionFailure, SpikeFailure, SpikeType, Team, shuffle, Trait, getRandomEnumValue, validateUUID, APITrait, initModels, BlockModel, RallyModel, EventModel, MatchSetModel, PerformanceStatsModel, LiberoReplacementModel, MatchSetStatsModel, ReceptionModel, CountryModel, ScoreModel, CoachModel, RallyPositionModel, LeagueModel, MatchModel, transformToAPICoach, PlayerModel, SeasonTeamsModel, SeasonModel, ServeModel, SetModel, SpikeModel, TeamModel, transformToStage, transformFromStage, SubstitutionModel, TournamentModel, TournamentMatchModel, transformFromBlock, transformToAPIBlock, transformToBlock, transformFromCoach, transformFromCountry, transformFromRally, transformToAPIReception, transformToReception, transformToAPIScore, transformToScore, transformFromFormation, transformFromMatch, transformToAPISet, transformToSet, transformFromMatchSet, transformFromMatchSetStats, transformFromLeague, transformFromPlayer, transformFromPlayerPosition, transformToPlayerPosition, transformFromCourtPosition, transformFromCourtTarget, transformFromPerformanceStats, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromEventType, transformFromServe, transformToAPIServe, transformToServe, transformFromSet, transformFromSpike, transformToAPISpike, transformToSpike, transformFromSubstitution, transformToAPISubstitution, transformToSubstitution, transformFromTeam, transformFromTrait, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, Stage, TournamentMatch, Tournament, };
|
|
3
|
+
import { BlockModel, CoachModel, CountryModel, EventModel, initModels, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonMatchesModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentMatchModel, TournamentModel, 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 './data';
|
|
4
|
+
export { League, Standing, Season, Country, Coach, Role, GeneralStat, PerformanceStats, Formation, Block, EventType, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockType, LiberoReplacementType, BlockFailure, MatchSetState, Match, InPlayEvent, CourtRow, CourtPosition, CourtTarget, formatNumber, generateModifier, getKeys, MatchTeam, Player, RallyState, randomNumber, ReceptionType, ServeFailure, ServeType, SetFailure, SetType, ReceptionFailure, SpikeFailure, SpikeType, Team, shuffle, Trait, getRandomEnumValue, validateUUID, APITrait, initModels, BlockModel, RallyModel, EventModel, MatchSetModel, PerformanceStatsModel, LiberoReplacementModel, MatchSetStatsModel, ReceptionModel, CountryModel, ScoreModel, CoachModel, RallyPositionModel, LeagueModel, MatchModel, transformToAPICoach, PlayerModel, SeasonTeamsModel, SeasonModel, ServeModel, SetModel, SpikeModel, TeamModel, transformToStage, transformFromStage, SubstitutionModel, TournamentModel, TournamentMatchModel, SeasonMatchesModel, transformFromBlock, transformToAPIBlock, transformToBlock, transformFromCoach, transformFromCountry, transformFromRally, transformToAPIReception, transformToReception, transformToAPIScore, transformToScore, transformFromFormation, transformFromMatch, transformToAPISet, transformToSet, transformFromMatchSet, transformFromMatchSetStats, transformFromLeague, transformFromPlayer, transformFromPlayerPosition, transformToPlayerPosition, transformFromCourtPosition, transformFromCourtTarget, transformFromPerformanceStats, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromEventType, transformFromServe, transformToAPIServe, transformToServe, transformFromSet, transformFromSpike, transformToAPISpike, transformToSpike, transformFromSubstitution, transformToAPISubstitution, transformToSubstitution, transformFromTeam, transformFromTrait, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPISeason, transformToAPITeam, transformToAPITrait, transformFromLiberoReplacement, transformToAPILiberoReplacement, transformToLiberoReplacement, transformToCoach, transformToCountry, transformToEventType, transformToMatchSet, transformToCourtPosition, transformToCourtTarget, transformToFormation, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToRally, transformToMatch, transformToSeason, transformToTeam, transformToTrait, transformToLeague, transformToRole, transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, Stage, TournamentMatch, Tournament, };
|
|
@@ -5,8 +5,8 @@ export class Season {
|
|
|
5
5
|
this.teams = teams;
|
|
6
6
|
this.matches = matches;
|
|
7
7
|
this.iteration = iteration;
|
|
8
|
-
this.standings = this.calculateStandings();
|
|
9
8
|
this.champion = champion;
|
|
9
|
+
this.standings = this.calculateStandings();
|
|
10
10
|
}
|
|
11
11
|
calculateStandings() {
|
|
12
12
|
return this.teams.map(team => {
|
|
@@ -16,6 +16,8 @@ export class Season {
|
|
|
16
16
|
}).sort(Standing.sortFn);
|
|
17
17
|
}
|
|
18
18
|
updateStandings() {
|
|
19
|
+
if (this.matches == null || this.matches.length < 1)
|
|
20
|
+
throw new Error('NO_MATCHES');
|
|
19
21
|
this.standings.length = 0;
|
|
20
22
|
this.standings.push(...this.calculateStandings());
|
|
21
23
|
if (this.matches.every((match) => match.isSimulated)) {
|