volleyballsimtypes 0.0.45 → 0.0.47
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 +3 -3
- package/dist/cjs/src/data/index.js +5 -4
- package/dist/cjs/src/data/init-models.d.ts +2 -2
- package/dist/cjs/src/data/init-models.js +6 -18
- package/dist/cjs/src/data/models/index.d.ts +2 -2
- package/dist/cjs/src/data/models/index.js +3 -3
- package/dist/cjs/src/data/models/match.d.ts +10 -13
- package/dist/cjs/src/data/models/{season-matches.d.ts → season-match.d.ts} +9 -8
- package/dist/cjs/src/data/models/{season-matches.js → season-match.js} +9 -14
- package/dist/cjs/src/data/models/season.d.ts +14 -35
- package/dist/cjs/src/data/models/tournament-match.js +3 -7
- package/dist/cjs/src/data/transformers/index.d.ts +2 -1
- package/dist/cjs/src/data/transformers/index.js +4 -2
- package/dist/cjs/src/data/transformers/season-match.d.ts +4 -0
- package/dist/cjs/src/data/transformers/season-match.js +12 -0
- package/dist/cjs/src/data/transformers/season.js +8 -4
- package/dist/cjs/src/index.d.ts +2 -2
- package/dist/cjs/src/index.js +5 -4
- package/dist/cjs/src/service/tournament/tournament.d.ts +1 -1
- package/dist/esm/src/data/index.d.ts +3 -3
- package/dist/esm/src/data/index.js +3 -3
- package/dist/esm/src/data/init-models.d.ts +2 -2
- package/dist/esm/src/data/init-models.js +7 -19
- package/dist/esm/src/data/models/index.d.ts +2 -2
- package/dist/esm/src/data/models/index.js +2 -2
- package/dist/esm/src/data/models/match.d.ts +10 -13
- package/dist/esm/src/data/models/{season-matches.d.ts → season-match.d.ts} +9 -8
- package/dist/esm/src/data/models/{season-matches.js → season-match.js} +7 -12
- package/dist/esm/src/data/models/season.d.ts +14 -35
- package/dist/esm/src/data/models/tournament-match.js +3 -7
- package/dist/esm/src/data/transformers/index.d.ts +2 -1
- package/dist/esm/src/data/transformers/index.js +2 -1
- package/dist/esm/src/data/transformers/season-match.d.ts +4 -0
- package/dist/esm/src/data/transformers/season-match.js +9 -0
- package/dist/esm/src/data/transformers/season.js +9 -5
- package/dist/esm/src/index.d.ts +2 -2
- package/dist/esm/src/index.js +2 -2
- package/dist/esm/src/service/tournament/tournament.d.ts +1 -1
- package/package.json +1 -1
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.SpikeTypeEnum = exports.SpikeFailureEnum = exports.ReceptionFailureEnum = exports.SetTypeEnum = exports.SetFailureEnum = exports.ServeTypeEnum = exports.ServeFailureEnum = exports.ReceptionTypeEnum = exports.randomNumber = exports.RallyState = exports.Player = exports.MatchTeam = exports.getKeys = exports.generateModifier = exports.formatNumber = exports.CourtTargetEnum = exports.CourtPosition = exports.CourtRow = exports.InPlayEvent = exports.Match = exports.MatchSetState = exports.BlockFailureEnum = exports.LiberoReplacementTypeEnum = exports.BlockTypeEnum = exports.Substitution = exports.Spike = exports.Set = exports.Serve = exports.Score = exports.Reception = exports.RallyEvent = exports.Rally = exports.MatchSet = exports.LiberoReplacement = exports.EventTypeEnum = exports.Block = exports.Formation = exports.PerformanceStats = exports.GeneralStat = exports.Role = exports.Coach = exports.Country = exports.Season = exports.Standing = exports.League = void 0;
|
|
4
|
-
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.
|
|
5
|
-
exports.
|
|
6
|
-
exports.TournamentTeamsModel = exports.Tournament = exports.TournamentMatch = exports.Stage = exports.transformToTournamentMatch = exports.transformToAPITournamentMatch = exports.transformFromTournamentMatch = exports.transformToTournament = exports.transformToAPITournament = void 0;
|
|
4
|
+
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.SeasonMatchModel = 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 = exports.transformToAPILeague = void 0;
|
|
5
|
+
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.transformFromSeasonMatch = 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 = exports.transformToPlayerPosition = void 0;
|
|
6
|
+
exports.TournamentTeamsModel = exports.Tournament = exports.TournamentMatch = exports.Stage = exports.transformToTournamentMatch = exports.transformToAPITournamentMatch = exports.transformFromTournamentMatch = exports.transformToTournament = exports.transformToAPITournament = exports.transformFromTournament = 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, "BlockFailureEnum", { enumerable: true, get: function () { return service_1.BlockFailure; } });
|
|
@@ -77,7 +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, "
|
|
80
|
+
Object.defineProperty(exports, "SeasonMatchModel", { enumerable: true, get: function () { return data_1.SeasonMatchModel; } });
|
|
81
81
|
Object.defineProperty(exports, "SeasonModel", { enumerable: true, get: function () { return data_1.SeasonModel; } });
|
|
82
82
|
Object.defineProperty(exports, "SeasonTeamsModel", { enumerable: true, get: function () { return data_1.SeasonTeamsModel; } });
|
|
83
83
|
Object.defineProperty(exports, "ServeModel", { enumerable: true, get: function () { return data_1.ServeModel; } });
|
|
@@ -108,6 +108,7 @@ Object.defineProperty(exports, "transformFromReception", { enumerable: true, get
|
|
|
108
108
|
Object.defineProperty(exports, "transformFromRole", { enumerable: true, get: function () { return data_1.transformFromRole; } });
|
|
109
109
|
Object.defineProperty(exports, "transformFromScore", { enumerable: true, get: function () { return data_1.transformFromScore; } });
|
|
110
110
|
Object.defineProperty(exports, "transformFromSeason", { enumerable: true, get: function () { return data_1.transformFromSeason; } });
|
|
111
|
+
Object.defineProperty(exports, "transformFromSeasonMatch", { enumerable: true, get: function () { return data_1.transformFromSeasonMatch; } });
|
|
111
112
|
Object.defineProperty(exports, "transformFromServe", { enumerable: true, get: function () { return data_1.transformFromServe; } });
|
|
112
113
|
Object.defineProperty(exports, "transformFromSet", { enumerable: true, get: function () { return data_1.transformFromSet; } });
|
|
113
114
|
Object.defineProperty(exports, "transformFromSpike", { enumerable: true, get: function () { return data_1.transformFromSpike; } });
|
|
@@ -12,7 +12,7 @@ export declare class Tournament {
|
|
|
12
12
|
readonly iteration: number;
|
|
13
13
|
readonly matches: TournamentMatch[];
|
|
14
14
|
readonly teams: Team[];
|
|
15
|
-
|
|
15
|
+
champion?: Team;
|
|
16
16
|
constructor({ id, iteration, matches, teams, champion }: TournamentOpts);
|
|
17
17
|
static sortMatchesFn(m1: TournamentMatch, m2: TournamentMatch): number;
|
|
18
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockAttributes, BlockCreationAttributes, BlockFailure, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, BlockType, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, CourtPositionType, CourtTarget, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, EventType, Formation, LeagueAttributes, LeagueCreationAttributes, LeagueId, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementModel, LiberoReplacementPk, LiberoReplacementType, 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, ReceptionFailure, ReceptionId, ReceptionModel, ReceptionPk, ReceptionType, RoleType, ScoreAttributes, ScoreCreationAttributes, ScoreId, ScoreModel, ScorePk, SeasonAttributes, SeasonCreationAttributes, SeasonId,
|
|
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, transformToAPILeague, 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';
|
|
1
|
+
import { BlockAttributes, BlockCreationAttributes, BlockFailure, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, BlockType, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, CourtPositionType, CourtTarget, EventAttributes, EventCreationAttributes, EventId, EventModel, EventPk, EventType, Formation, LeagueAttributes, LeagueCreationAttributes, LeagueId, LeagueModel, LeaguePk, LiberoReplacementAttributes, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementModel, LiberoReplacementPk, LiberoReplacementType, 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, ReceptionFailure, ReceptionId, ReceptionModel, ReceptionPk, ReceptionType, RoleType, ScoreAttributes, ScoreCreationAttributes, ScoreId, ScoreModel, ScorePk, SeasonAttributes, SeasonCreationAttributes, SeasonId, SeasonMatchAttributes, SeasonMatchCreationAttributes, SeasonMatchId, SeasonMatchModel, SeasonMatchPk, SeasonModel, SeasonPk, SeasonTeamsAttributes, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsModel, SeasonTeamsPk, ServeAttributes, ServeCreationAttributes, ServeFailure, ServeId, ServeModel, ServePk, ServeType, SetAttributes, SetCreationAttributes, SetFailure, SetId, SetModel, SetPk, SetType, Side, SpikeAttributes, SpikeCreationAttributes, SpikeFailure, SpikeId, SpikeModel, SpikePk, SpikeType, SubstitutionAttributes, SubstitutionCreationAttributes, SubstitutionId, SubstitutionModel, SubstitutionPk, TeamAttributes, TeamCreationAttributes, TeamId, TeamModel, TeamPk, TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentMatchAttributes, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchModel, TournamentMatchPk, TournamentModel, TournamentOptionalAttributes, TournamentPk, TournamentStage, TournamentTeamsAttributes, TournamentTeamsCreationAttributes, TournamentTeamsId, TournamentTeamsModel, TournamentTeamsPk, TraitType } from './models';
|
|
2
|
+
import { transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromSeasonMatch, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromStage, transformFromSubstitution, transformFromTeam, transformFromTournament, transformFromTournamentMatch, transformFromTrait, transformToAPIBlock, transformToAPICoach, transformToAPILeague, 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,
|
|
4
|
+
export { initModels, transformToStage, transformFromStage, SeasonMatchModel, SeasonMatchAttributes, SeasonMatchCreationAttributes, SeasonMatchId, SeasonMatchPk, 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, transformFromSeasonMatch, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPILeague, 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, SpikeFailure, SetFailure, EventType, CourtTarget, ServeFailure, TournamentOptionalAttributes, LiberoReplacementType, CourtPositionType, SpikeType, SetType, BlockType, BlockFailure, ReceptionFailure, ServeType, ReceptionType, Side, Formation, TournamentTeamsAttributes, TournamentTeamsCreationAttributes, TournamentTeamsId, TournamentTeamsModel, TournamentTeamsPk };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockModel, CoachModel, CountryModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel,
|
|
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, transformToAPILeague, 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';
|
|
1
|
+
import { BlockModel, CoachModel, CountryModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonMatchModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentMatchModel, TournamentModel, TournamentTeamsModel } from './models';
|
|
2
|
+
import { transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromSeasonMatch, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromServe, transformFromSet, transformFromSpike, transformFromStage, transformFromSubstitution, transformFromTeam, transformFromTournament, transformFromTournamentMatch, transformFromTrait, transformToAPIBlock, transformToAPICoach, transformToAPILeague, 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,
|
|
4
|
+
export { initModels, transformToStage, transformFromStage, SeasonMatchModel, 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, transformFromSeasonMatch, transformToAPILiberoReplacement, transformToAPIMatch, transformToAPIMatchSet, transformToAPIMatchSetStats, transformToAPIPlayer, transformToAPIRally, transformToAPIReception, transformToAPIScore, transformToAPISeason, transformToAPIServe, transformToAPISet, transformToAPISpike, transformToAPILeague, 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, TournamentTeamsModel };
|
|
@@ -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,
|
|
2
|
+
import { BlockModel, CoachModel, CountryModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonMatchModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentMatchModel, TournamentModel, TournamentTeamsModel } from './models';
|
|
3
3
|
export declare function initModels(sequelize: Sequelize): {
|
|
4
4
|
Block: typeof BlockModel;
|
|
5
5
|
Coach: typeof CoachModel;
|
|
@@ -18,7 +18,7 @@ export declare function initModels(sequelize: Sequelize): {
|
|
|
18
18
|
Score: typeof ScoreModel;
|
|
19
19
|
Season: typeof SeasonModel;
|
|
20
20
|
SeasonTeams: typeof SeasonTeamsModel;
|
|
21
|
-
|
|
21
|
+
SeasonMatch: typeof SeasonMatchModel;
|
|
22
22
|
Serve: typeof ServeModel;
|
|
23
23
|
Set: typeof SetModel;
|
|
24
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,
|
|
1
|
+
import { BlockModel, CoachModel, CountryModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonMatchModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentMatchModel, TournamentModel, TournamentTeamsModel } from './models';
|
|
2
2
|
export function initModels(sequelize) {
|
|
3
3
|
const Block = BlockModel.initModel(sequelize);
|
|
4
4
|
const Coach = CoachModel.initModel(sequelize);
|
|
@@ -16,7 +16,7 @@ export function initModels(sequelize) {
|
|
|
16
16
|
const Reception = ReceptionModel.initModel(sequelize);
|
|
17
17
|
const Score = ScoreModel.initModel(sequelize);
|
|
18
18
|
const Season = SeasonModel.initModel(sequelize);
|
|
19
|
-
const
|
|
19
|
+
const SeasonMatch = SeasonMatchModel.initModel(sequelize);
|
|
20
20
|
const SeasonTeams = SeasonTeamsModel.initModel(sequelize);
|
|
21
21
|
const Serve = ServeModel.initModel(sequelize);
|
|
22
22
|
const Set = SetModel.initModel(sequelize);
|
|
@@ -48,14 +48,8 @@ export function initModels(sequelize) {
|
|
|
48
48
|
Match.belongsTo(Team, { as: 'awayTeam', foreignKey: 'away_team' });
|
|
49
49
|
Match.belongsTo(Team, { as: 'homeTeam', foreignKey: 'home_team' });
|
|
50
50
|
Match.hasMany(MatchSet, { as: 'MatchSets', foreignKey: 'match_id' });
|
|
51
|
-
Match.
|
|
51
|
+
Match.hasOne(SeasonMatch, { as: 'SeasonMatch', foreignKey: 'match_id' });
|
|
52
52
|
Match.hasOne(TournamentMatch, { as: 'TournamentMatch', foreignKey: 'match_id' });
|
|
53
|
-
Match.belongsToMany(Season, {
|
|
54
|
-
as: 'season_id_Seasons',
|
|
55
|
-
through: SeasonMatches,
|
|
56
|
-
foreignKey: 'match_id',
|
|
57
|
-
otherKey: 'season_id'
|
|
58
|
-
});
|
|
59
53
|
MatchSet.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
|
|
60
54
|
MatchSet.belongsTo(Player, { as: 'away_libero_Player', foreignKey: 'away_libero' });
|
|
61
55
|
MatchSet.belongsTo(Player, { as: 'home_libero_Player', foreignKey: 'home_libero' });
|
|
@@ -130,7 +124,7 @@ export function initModels(sequelize) {
|
|
|
130
124
|
Score.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
|
|
131
125
|
Season.belongsTo(League, { as: 'league', foreignKey: 'league_id' });
|
|
132
126
|
Season.belongsTo(Team, { as: 'Champion', foreignKey: 'champion' });
|
|
133
|
-
Season.hasMany(
|
|
127
|
+
Season.hasMany(SeasonMatch, { as: 'SeasonMatch', foreignKey: 'season_id' });
|
|
134
128
|
Season.hasMany(SeasonTeams, { as: 'SeasonTeams', foreignKey: 'season_id' });
|
|
135
129
|
Season.belongsToMany(Team, {
|
|
136
130
|
as: 'seasonTeams',
|
|
@@ -138,14 +132,8 @@ export function initModels(sequelize) {
|
|
|
138
132
|
foreignKey: 'season_id',
|
|
139
133
|
otherKey: 'team_id'
|
|
140
134
|
});
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
through: SeasonMatches,
|
|
144
|
-
foreignKey: 'season_id',
|
|
145
|
-
otherKey: 'match_id'
|
|
146
|
-
});
|
|
147
|
-
SeasonMatches.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
|
|
148
|
-
SeasonMatches.belongsTo(Season, { as: 'season', foreignKey: 'season_id' });
|
|
135
|
+
SeasonMatch.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
|
|
136
|
+
SeasonMatch.belongsTo(Season, { as: 'season', foreignKey: 'season_id' });
|
|
149
137
|
SeasonTeams.belongsTo(Season, { as: 'season', foreignKey: 'season_id' });
|
|
150
138
|
SeasonTeams.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
|
|
151
139
|
Serve.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
|
|
@@ -210,7 +198,7 @@ export function initModels(sequelize) {
|
|
|
210
198
|
Score,
|
|
211
199
|
Season,
|
|
212
200
|
SeasonTeams,
|
|
213
|
-
|
|
201
|
+
SeasonMatch,
|
|
214
202
|
Serve,
|
|
215
203
|
Set,
|
|
216
204
|
Spike,
|
|
@@ -15,7 +15,7 @@ import { ReceptionAttributes, ReceptionCreationAttributes, ReceptionFailure, Rec
|
|
|
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 {
|
|
18
|
+
import { SeasonMatchAttributes, SeasonMatchCreationAttributes, SeasonMatchId, SeasonMatchModel, SeasonMatchPk } from './season-match';
|
|
19
19
|
import { ServeAttributes, ServeCreationAttributes, ServeFailure, ServeId, ServeModel, ServePk, ServeType } from './serve';
|
|
20
20
|
import { SetAttributes, SetCreationAttributes, SetFailure, SetId, SetModel, SetPk, SetType } from './set';
|
|
21
21
|
import { SpikeAttributes, SpikeCreationAttributes, SpikeFailure, SpikeId, SpikeModel, SpikePk, SpikeType } from './spike';
|
|
@@ -24,4 +24,4 @@ import { TeamAttributes, TeamCreationAttributes, TeamId, TeamModel, TeamPk } fro
|
|
|
24
24
|
import { TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentOptionalAttributes, TournamentPk } from './tournament';
|
|
25
25
|
import { TournamentMatchAttributes, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchModel, TournamentMatchPk, TournamentStage } from './tournament-match';
|
|
26
26
|
import { TournamentTeamsAttributes, TournamentTeamsCreationAttributes, TournamentTeamsId, TournamentTeamsModel, TournamentTeamsPk } from './tournament-teams';
|
|
27
|
-
export { TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk, TournamentMatchAttributes, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchModel, TournamentMatchPk, TournamentStage, BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk,
|
|
27
|
+
export { TournamentAttributes, TournamentCreationAttributes, TournamentId, TournamentModel, TournamentPk, TournamentMatchAttributes, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchModel, TournamentMatchPk, TournamentStage, BlockAttributes, BlockCreationAttributes, BlockId, BlockModel, BlockOptionalAttributes, BlockPk, CoachAttributes, CoachCreationAttributes, CoachId, CoachModel, CoachOptionalAttributes, CoachPk, CountryAttributes, CountryCreationAttributes, CountryId, CountryModel, CountryPk, SeasonMatchAttributes, SeasonMatchCreationAttributes, SeasonMatchId, SeasonMatchModel, SeasonMatchPk, 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, EventType, BlockFailure, BlockType, Formation, ServeFailure, SpikeFailure, SpikeType, SetType, ReceptionFailure, SetFailure, ServeType, ReceptionType, CourtPositionType, TournamentOptionalAttributes, Side, CourtTarget, LiberoReplacementType, TournamentTeamsAttributes, TournamentTeamsCreationAttributes, TournamentTeamsId, TournamentTeamsModel, TournamentTeamsPk };
|
|
@@ -15,7 +15,7 @@ import { ReceptionModel } from './reception';
|
|
|
15
15
|
import { ScoreModel } from './score';
|
|
16
16
|
import { SeasonModel } from './season';
|
|
17
17
|
import { SeasonTeamsModel } from './season-teams';
|
|
18
|
-
import {
|
|
18
|
+
import { SeasonMatchModel } from './season-match';
|
|
19
19
|
import { ServeModel } from './serve';
|
|
20
20
|
import { SetModel } from './set';
|
|
21
21
|
import { SpikeModel } from './spike';
|
|
@@ -24,4 +24,4 @@ import { TeamModel } from './team';
|
|
|
24
24
|
import { TournamentModel } from './tournament';
|
|
25
25
|
import { TournamentMatchModel } from './tournament-match';
|
|
26
26
|
import { TournamentTeamsModel } from './tournament-teams';
|
|
27
|
-
export { TournamentModel, TournamentMatchModel, BlockModel, CoachModel, CountryModel,
|
|
27
|
+
export { TournamentModel, TournamentMatchModel, BlockModel, CoachModel, CountryModel, SeasonMatchModel, EventModel, LeagueModel, LiberoReplacementModel, MatchModel, MatchSetModel, MatchSetStatsModel, PerformanceStatsModel, PlayerModel, RallyModel, RallyPositionModel, ReceptionModel, ScoreModel, SeasonModel, SeasonTeamsModel, ServeModel, SetModel, SpikeModel, SubstitutionModel, TeamModel, TournamentTeamsModel };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { Model } from 'sequelize';
|
|
3
|
-
import type { MatchSetAttributes, MatchSetId, MatchSetModel, SeasonId, SeasonModel, TeamId, TeamModel } from '.';
|
|
4
|
-
import {
|
|
3
|
+
import type { MatchSetAttributes, MatchSetId, MatchSetModel, SeasonId, SeasonModel, TeamId, TeamModel, TournamentMatchId } from '.';
|
|
4
|
+
import { SeasonMatchId, SeasonMatchModel, TournamentMatchModel } from '.';
|
|
5
5
|
export interface MatchAttributes {
|
|
6
6
|
match_id: string;
|
|
7
7
|
home_team: string;
|
|
@@ -50,16 +50,13 @@ export declare class MatchModel extends Model<MatchAttributes, MatchCreationAttr
|
|
|
50
50
|
hasSeason_id_Season: Sequelize.BelongsToManyHasAssociationMixin<SeasonModel, SeasonId>;
|
|
51
51
|
hasSeason_id_Seasons: Sequelize.BelongsToManyHasAssociationsMixin<SeasonModel, SeasonId>;
|
|
52
52
|
countSeason_id_Seasons: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
hasSeasonMatch: Sequelize.HasManyHasAssociationMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
62
|
-
hasSeasonMatches: Sequelize.HasManyHasAssociationsMixin<SeasonMatchesModel, SeasonMatchesId>;
|
|
63
|
-
countSeasonMatches: Sequelize.HasManyCountAssociationsMixin;
|
|
53
|
+
SeasonMatch: SeasonMatchModel;
|
|
54
|
+
getSeasonMatch: Sequelize.HasOneGetAssociationMixin<SeasonMatchModel>;
|
|
55
|
+
setSeasonMatch: Sequelize.HasOneSetAssociationMixin<SeasonMatchModel, SeasonMatchId>;
|
|
56
|
+
createSeasonMatch: Sequelize.HasOneCreateAssociationMixin<SeasonMatchModel>;
|
|
57
|
+
TournamentMatch: TournamentMatchModel;
|
|
58
|
+
getTournamentMatch: Sequelize.HasOneGetAssociationMixin<TournamentMatchModel>;
|
|
59
|
+
setTournamentMatch: Sequelize.HasOneSetAssociationMixin<TournamentMatchModel, TournamentMatchId>;
|
|
60
|
+
createTournamentMatch: Sequelize.HasOneCreateAssociationMixin<TournamentMatchModel>;
|
|
64
61
|
static initModel(sequelize: Sequelize.Sequelize): typeof MatchModel;
|
|
65
62
|
}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { Model } from 'sequelize';
|
|
3
|
-
import type { MatchId, MatchModel, SeasonId, SeasonModel } from '.';
|
|
4
|
-
export interface
|
|
3
|
+
import type { MatchAttributes, MatchId, MatchModel, SeasonId, SeasonModel } from '.';
|
|
4
|
+
export interface SeasonMatchAttributes {
|
|
5
5
|
season_id: string;
|
|
6
6
|
match_id: string;
|
|
7
|
+
match?: MatchAttributes;
|
|
7
8
|
}
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
export type
|
|
11
|
-
export declare class
|
|
9
|
+
export type SeasonMatchPk = 'match_id';
|
|
10
|
+
export type SeasonMatchId = SeasonMatchModel[SeasonMatchPk];
|
|
11
|
+
export type SeasonMatchCreationAttributes = SeasonMatchAttributes;
|
|
12
|
+
export declare class SeasonMatchModel extends Model<SeasonMatchAttributes, SeasonMatchCreationAttributes> implements SeasonMatchAttributes {
|
|
12
13
|
season_id: string;
|
|
13
14
|
match_id: string;
|
|
14
15
|
season: SeasonModel;
|
|
15
16
|
getSeason: Sequelize.BelongsToGetAssociationMixin<SeasonModel>;
|
|
16
17
|
setSeason: Sequelize.BelongsToSetAssociationMixin<SeasonModel, SeasonId>;
|
|
17
18
|
createSeason: Sequelize.BelongsToCreateAssociationMixin<SeasonModel>;
|
|
18
|
-
|
|
19
|
+
match: MatchModel;
|
|
19
20
|
getMatch: Sequelize.BelongsToGetAssociationMixin<MatchModel>;
|
|
20
21
|
setMatch: Sequelize.BelongsToSetAssociationMixin<MatchModel, MatchId>;
|
|
21
22
|
createMatch: Sequelize.BelongsToCreateAssociationMixin<MatchModel>;
|
|
22
|
-
static initModel(sequelize: Sequelize.Sequelize): typeof
|
|
23
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof SeasonMatchModel;
|
|
23
24
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataTypes, Model } from 'sequelize';
|
|
2
|
-
export class
|
|
2
|
+
export class SeasonMatchModel extends Model {
|
|
3
3
|
static initModel(sequelize) {
|
|
4
|
-
return
|
|
4
|
+
return SeasonMatchModel.init({
|
|
5
5
|
season_id: {
|
|
6
6
|
type: DataTypes.UUID,
|
|
7
7
|
allowNull: false,
|
|
@@ -22,19 +22,14 @@ export class SeasonMatchesModel extends Model {
|
|
|
22
22
|
}
|
|
23
23
|
}, {
|
|
24
24
|
sequelize,
|
|
25
|
-
tableName: '
|
|
25
|
+
tableName: 'SeasonMatch',
|
|
26
26
|
schema: 'public',
|
|
27
27
|
timestamps: false,
|
|
28
|
-
indexes: [
|
|
29
|
-
|
|
30
|
-
name: 'SeasonMatches_pk',
|
|
28
|
+
indexes: [{
|
|
29
|
+
name: 'SeasonMatch_pk',
|
|
31
30
|
unique: true,
|
|
32
|
-
fields: [
|
|
33
|
-
|
|
34
|
-
{ name: 'match_id' }
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
]
|
|
31
|
+
fields: [{ name: 'match_id' }]
|
|
32
|
+
}]
|
|
38
33
|
});
|
|
39
34
|
}
|
|
40
35
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { Model } from 'sequelize';
|
|
3
|
-
import type { LeagueAttributes, LeagueId, LeagueModel,
|
|
4
|
-
import {
|
|
3
|
+
import type { LeagueAttributes, LeagueId, LeagueModel, SeasonMatchAttributes, SeasonTeamsId, SeasonTeamsModel, TeamAttributes, TeamId, TeamModel } from '.';
|
|
4
|
+
import { SeasonMatchId, SeasonMatchModel } from '.';
|
|
5
5
|
export interface SeasonAttributes {
|
|
6
6
|
season_id: string;
|
|
7
7
|
iteration: number;
|
|
8
8
|
league_id: string;
|
|
9
9
|
seasonTeams?: TeamAttributes[];
|
|
10
|
-
|
|
10
|
+
SeasonMatches?: SeasonMatchAttributes[];
|
|
11
11
|
league?: LeagueAttributes;
|
|
12
12
|
champion?: string;
|
|
13
13
|
}
|
|
@@ -18,22 +18,10 @@ export declare class SeasonModel extends Model<SeasonAttributes, SeasonCreationA
|
|
|
18
18
|
season_id: string;
|
|
19
19
|
iteration: number;
|
|
20
20
|
league_id: string;
|
|
21
|
-
seasonTeams: TeamModel[];
|
|
22
|
-
seasonMatches: MatchModel[];
|
|
23
21
|
league: LeagueModel;
|
|
24
22
|
getLeague: Sequelize.BelongsToGetAssociationMixin<LeagueModel>;
|
|
25
23
|
setLeague: Sequelize.BelongsToSetAssociationMixin<LeagueModel, LeagueId>;
|
|
26
24
|
createLeague: Sequelize.BelongsToCreateAssociationMixin<LeagueModel>;
|
|
27
|
-
getMatches: Sequelize.HasManyGetAssociationsMixin<MatchModel>;
|
|
28
|
-
setMatches: Sequelize.HasManySetAssociationsMixin<MatchModel, MatchId>;
|
|
29
|
-
addMatch: Sequelize.HasManyAddAssociationMixin<MatchModel, MatchId>;
|
|
30
|
-
addMatches: Sequelize.HasManyAddAssociationsMixin<MatchModel, MatchId>;
|
|
31
|
-
createMatch: Sequelize.HasManyCreateAssociationMixin<MatchModel>;
|
|
32
|
-
removeMatch: Sequelize.HasManyRemoveAssociationMixin<MatchModel, MatchId>;
|
|
33
|
-
removeMatches: Sequelize.HasManyRemoveAssociationsMixin<MatchModel, MatchId>;
|
|
34
|
-
hasMatch: Sequelize.HasManyHasAssociationMixin<MatchModel, MatchId>;
|
|
35
|
-
hasMatches: Sequelize.HasManyHasAssociationsMixin<MatchModel, MatchId>;
|
|
36
|
-
countMatches: Sequelize.HasManyCountAssociationsMixin;
|
|
37
25
|
SeasonTeams: SeasonTeamsModel[];
|
|
38
26
|
getSeasonTeams: Sequelize.HasManyGetAssociationsMixin<SeasonTeamsModel>;
|
|
39
27
|
setSeasonTeams: Sequelize.HasManySetAssociationsMixin<SeasonTeamsModel, SeasonTeamsId>;
|
|
@@ -45,6 +33,7 @@ export declare class SeasonModel extends Model<SeasonAttributes, SeasonCreationA
|
|
|
45
33
|
hasSeasonTeam: Sequelize.HasManyHasAssociationMixin<SeasonTeamsModel, SeasonTeamsId>;
|
|
46
34
|
hasSeasonTeams: Sequelize.HasManyHasAssociationsMixin<SeasonTeamsModel, SeasonTeamsId>;
|
|
47
35
|
countSeasonTeams: Sequelize.HasManyCountAssociationsMixin;
|
|
36
|
+
seasonTeams: TeamModel[];
|
|
48
37
|
getseasonTeams: Sequelize.BelongsToManyGetAssociationsMixin<TeamModel>;
|
|
49
38
|
setseasonTeams: Sequelize.BelongsToManySetAssociationsMixin<TeamModel, TeamId>;
|
|
50
39
|
addTeam_id_Team: Sequelize.BelongsToManyAddAssociationMixin<TeamModel, TeamId>;
|
|
@@ -55,27 +44,17 @@ export declare class SeasonModel extends Model<SeasonAttributes, SeasonCreationA
|
|
|
55
44
|
hasTeam_id_Team: Sequelize.BelongsToManyHasAssociationMixin<TeamModel, TeamId>;
|
|
56
45
|
hasseasonTeams: Sequelize.BelongsToManyHasAssociationsMixin<TeamModel, TeamId>;
|
|
57
46
|
countseasonTeams: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
58
|
-
SeasonMatches:
|
|
59
|
-
getSeasonMatches: Sequelize.HasManyGetAssociationsMixin<
|
|
60
|
-
setSeasonMatches: Sequelize.HasManySetAssociationsMixin<
|
|
61
|
-
addSeasonMatch: Sequelize.HasManyAddAssociationMixin<
|
|
62
|
-
addSeasonMatches: Sequelize.HasManyAddAssociationsMixin<
|
|
63
|
-
createSeasonMatch: Sequelize.HasManyCreateAssociationMixin<
|
|
64
|
-
removeSeasonMatch: Sequelize.HasManyRemoveAssociationMixin<
|
|
65
|
-
removeSeasonMatches: Sequelize.HasManyRemoveAssociationsMixin<
|
|
66
|
-
hasSeasonMatch: Sequelize.HasManyHasAssociationMixin<
|
|
67
|
-
hasSeasonMatches: Sequelize.HasManyHasAssociationsMixin<
|
|
47
|
+
SeasonMatches: SeasonMatchModel[];
|
|
48
|
+
getSeasonMatches: Sequelize.HasManyGetAssociationsMixin<SeasonMatchModel>;
|
|
49
|
+
setSeasonMatches: Sequelize.HasManySetAssociationsMixin<SeasonMatchModel, SeasonMatchId>;
|
|
50
|
+
addSeasonMatch: Sequelize.HasManyAddAssociationMixin<SeasonMatchModel, SeasonMatchId>;
|
|
51
|
+
addSeasonMatches: Sequelize.HasManyAddAssociationsMixin<SeasonMatchModel, SeasonMatchId>;
|
|
52
|
+
createSeasonMatch: Sequelize.HasManyCreateAssociationMixin<SeasonMatchModel>;
|
|
53
|
+
removeSeasonMatch: Sequelize.HasManyRemoveAssociationMixin<SeasonMatchModel, SeasonMatchId>;
|
|
54
|
+
removeSeasonMatches: Sequelize.HasManyRemoveAssociationsMixin<SeasonMatchModel, SeasonMatchId>;
|
|
55
|
+
hasSeasonMatch: Sequelize.HasManyHasAssociationMixin<SeasonMatchModel, SeasonMatchId>;
|
|
56
|
+
hasSeasonMatches: Sequelize.HasManyHasAssociationsMixin<SeasonMatchModel, SeasonMatchId>;
|
|
68
57
|
countSeasonMatches: Sequelize.HasManyCountAssociationsMixin;
|
|
69
|
-
getseasonMatches: Sequelize.BelongsToManyGetAssociationsMixin<MatchModel>;
|
|
70
|
-
setseasonMatches: Sequelize.BelongsToManySetAssociationsMixin<MatchModel, MatchId>;
|
|
71
|
-
addMatch_id_Match: Sequelize.BelongsToManyAddAssociationMixin<MatchModel, MatchId>;
|
|
72
|
-
addseasonMatches: Sequelize.BelongsToManyAddAssociationsMixin<MatchModel, MatchId>;
|
|
73
|
-
createMatch_id_Match: Sequelize.BelongsToManyCreateAssociationMixin<MatchModel>;
|
|
74
|
-
removeMatch_id_Match: Sequelize.BelongsToManyRemoveAssociationMixin<MatchModel, MatchId>;
|
|
75
|
-
removeseasonMatches: Sequelize.BelongsToManyRemoveAssociationsMixin<MatchModel, MatchId>;
|
|
76
|
-
hasMatch_id_Match: Sequelize.BelongsToManyHasAssociationMixin<MatchModel, MatchId>;
|
|
77
|
-
hasseasonMatches: Sequelize.BelongsToManyHasAssociationsMixin<MatchModel, MatchId>;
|
|
78
|
-
countseasonMatches: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
79
58
|
Champion: TeamModel;
|
|
80
59
|
getChampion: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
|
|
81
60
|
setChampion: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
|
|
@@ -32,15 +32,11 @@ export class TournamentMatchModel extends Model {
|
|
|
32
32
|
tableName: 'TournamentMatch',
|
|
33
33
|
schema: 'public',
|
|
34
34
|
timestamps: false,
|
|
35
|
-
indexes: [
|
|
36
|
-
{
|
|
35
|
+
indexes: [{
|
|
37
36
|
name: 'TournamentMatch_match_id_uindex',
|
|
38
37
|
unique: true,
|
|
39
|
-
fields: [
|
|
40
|
-
|
|
41
|
-
]
|
|
42
|
-
},
|
|
43
|
-
]
|
|
38
|
+
fields: [{ name: 'match_id' }]
|
|
39
|
+
}]
|
|
44
40
|
});
|
|
45
41
|
}
|
|
46
42
|
}
|
|
@@ -21,10 +21,11 @@ import { transformFromReception, transformToAPIReception, transformToReception }
|
|
|
21
21
|
import { transformFromRole, transformToRole } from './role';
|
|
22
22
|
import { transformFromScore, transformToAPIScore, transformToScore } from './score';
|
|
23
23
|
import { transformFromSeason, transformToAPISeason, transformToSeason } from './season';
|
|
24
|
+
import { transformFromSeasonMatch } from './season-match';
|
|
24
25
|
import { transformFromServe, transformToAPIServe, transformToServe } from './serve';
|
|
25
26
|
import { transformFromSet, transformToAPISet, transformToSet } from './set';
|
|
26
27
|
import { transformFromSpike, transformToAPISpike, transformToSpike } from './spike';
|
|
27
28
|
import { transformFromSubstitution, transformToAPISubstitution, transformToSubstitution } from './substitution';
|
|
28
29
|
import { transformFromTeam, transformToAPITeam, transformToTeam } from './team';
|
|
29
30
|
import { transformFromTrait, transformToAPITrait, transformToTrait } from './trait';
|
|
30
|
-
export { transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, transformFromBlock, transformToAPICoach, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformToStage, transformFromStage, transformFromScore, transformFromSeason, transformFromServe, transformToAPILeague, 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, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait };
|
|
31
|
+
export { transformFromTournament, transformFromSeasonMatch, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, transformFromBlock, transformToAPICoach, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformToStage, transformFromStage, transformFromScore, transformFromSeason, transformFromServe, transformToAPILeague, 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, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait };
|
|
@@ -21,10 +21,11 @@ import { transformFromReception, transformToAPIReception, transformToReception }
|
|
|
21
21
|
import { transformFromRole, transformToRole } from './role';
|
|
22
22
|
import { transformFromScore, transformToAPIScore, transformToScore } from './score';
|
|
23
23
|
import { transformFromSeason, transformToAPISeason, transformToSeason } from './season';
|
|
24
|
+
import { transformFromSeasonMatch } from './season-match';
|
|
24
25
|
import { transformFromServe, transformToAPIServe, transformToServe } from './serve';
|
|
25
26
|
import { transformFromSet, transformToAPISet, transformToSet } from './set';
|
|
26
27
|
import { transformFromSpike, transformToAPISpike, transformToSpike } from './spike';
|
|
27
28
|
import { transformFromSubstitution, transformToAPISubstitution, transformToSubstitution } from './substitution';
|
|
28
29
|
import { transformFromTeam, transformToAPITeam, transformToTeam } from './team';
|
|
29
30
|
import { transformFromTrait, transformToAPITrait, transformToTrait } from './trait';
|
|
30
|
-
export { transformFromTournament, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, transformFromBlock, transformToAPICoach, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformToStage, transformFromStage, transformFromScore, transformFromSeason, transformFromServe, transformToAPILeague, 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, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait };
|
|
31
|
+
export { transformFromTournament, transformFromSeasonMatch, transformToAPITournament, transformToTournament, transformFromTournamentMatch, transformToAPITournamentMatch, transformToTournamentMatch, transformFromBlock, transformToAPICoach, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformToStage, transformFromStage, transformFromScore, transformFromSeason, transformFromServe, transformToAPILeague, 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, transformToMatch, transformToMatchSet, transformToMatchSetStats, transformToPerformanceStats, transformToPlayer, transformToPlayerPosition, transformToRally, transformToReception, transformToRole, transformToScore, transformToSeason, transformToServe, transformToSet, transformToSpike, transformToSubstitution, transformToTeam, transformToTrait };
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { transformFromSeasonMatch, transformFromTeam, transformToAPIMatch, transformToAPITeam, transformToLeague, transformToMatch, transformToTeam } from '.';
|
|
2
2
|
import { Season } from '../../service';
|
|
3
3
|
function transformToAttributes(season, leagueId) {
|
|
4
|
+
const seasonMatches = season.matches != null ?
|
|
5
|
+
season.matches.map(match => transformFromSeasonMatch(season.id, match)) : [];
|
|
4
6
|
return {
|
|
5
7
|
season_id: season.id,
|
|
6
8
|
iteration: season.iteration,
|
|
7
9
|
league_id: leagueId,
|
|
8
10
|
champion: season.champion != null ? season.champion.id : undefined,
|
|
9
11
|
seasonTeams: season.teams != null ? season.teams.map(transformFromTeam) : [],
|
|
10
|
-
|
|
12
|
+
SeasonMatches: seasonMatches
|
|
11
13
|
};
|
|
12
14
|
}
|
|
13
15
|
function transformToObject(model) {
|
|
16
|
+
const matches = model.SeasonMatches != null ?
|
|
17
|
+
model.SeasonMatches.map(matches => transformToMatch(matches.match)) : [];
|
|
14
18
|
return new Season({
|
|
15
19
|
id: model.season_id,
|
|
16
|
-
matches
|
|
20
|
+
matches,
|
|
17
21
|
iteration: model.iteration,
|
|
18
22
|
teams: model.seasonTeams != null ? model.seasonTeams.map(transformToTeam) : [],
|
|
19
23
|
champion: model.Champion != null ? transformToTeam(model.Champion) : undefined
|
|
@@ -21,8 +25,8 @@ function transformToObject(model) {
|
|
|
21
25
|
}
|
|
22
26
|
function transformToAPIObject(model) {
|
|
23
27
|
const season = transformToObject(model);
|
|
24
|
-
const matches = model.
|
|
25
|
-
model.
|
|
28
|
+
const matches = model.SeasonMatches != null ?
|
|
29
|
+
model.SeasonMatches.map(seasonMatch => transformToAPIMatch(seasonMatch.match, model.league)) : [];
|
|
26
30
|
return {
|
|
27
31
|
id: model.season_id,
|
|
28
32
|
matches: matches,
|