volleyballsimtypes 0.0.46 → 0.0.48
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 +5 -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 -6
- package/dist/cjs/src/data/models/coach.d.ts +3 -3
- package/dist/cjs/src/data/models/index.d.ts +50 -25
- 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/formation.d.ts +1 -1
- 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 +4 -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 +5 -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 -7
- package/dist/esm/src/data/models/coach.d.ts +3 -3
- package/dist/esm/src/data/models/index.d.ts +50 -25
- 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/formation.d.ts +1 -1
- 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 +4 -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
|
@@ -4,20 +4,24 @@ exports.transformFromSeason = exports.transformToAPISeason = exports.transformTo
|
|
|
4
4
|
const _1 = require(".");
|
|
5
5
|
const service_1 = require("../../service");
|
|
6
6
|
function transformToAttributes(season, leagueId) {
|
|
7
|
+
const seasonMatches = season.matches != null ?
|
|
8
|
+
season.matches.map(match => (0, _1.transformFromSeasonMatch)(season.id, match)) : [];
|
|
7
9
|
return {
|
|
8
10
|
season_id: season.id,
|
|
9
11
|
iteration: season.iteration,
|
|
10
12
|
league_id: leagueId,
|
|
11
13
|
champion: season.champion != null ? season.champion.id : undefined,
|
|
12
14
|
seasonTeams: season.teams != null ? season.teams.map(_1.transformFromTeam) : [],
|
|
13
|
-
|
|
15
|
+
SeasonMatches: seasonMatches
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
18
|
exports.transformFromSeason = transformToAttributes;
|
|
17
19
|
function transformToObject(model) {
|
|
20
|
+
const matches = model.SeasonMatches != null ?
|
|
21
|
+
model.SeasonMatches.map(matches => (0, _1.transformToMatch)(matches.match)) : [];
|
|
18
22
|
return new service_1.Season({
|
|
19
23
|
id: model.season_id,
|
|
20
|
-
matches
|
|
24
|
+
matches,
|
|
21
25
|
iteration: model.iteration,
|
|
22
26
|
teams: model.seasonTeams != null ? model.seasonTeams.map(_1.transformToTeam) : [],
|
|
23
27
|
champion: model.Champion != null ? (0, _1.transformToTeam)(model.Champion) : undefined
|
|
@@ -26,8 +30,8 @@ function transformToObject(model) {
|
|
|
26
30
|
exports.transformToSeason = transformToObject;
|
|
27
31
|
function transformToAPIObject(model) {
|
|
28
32
|
const season = transformToObject(model);
|
|
29
|
-
const matches = model.
|
|
30
|
-
model.
|
|
33
|
+
const matches = model.SeasonMatches != null ?
|
|
34
|
+
model.SeasonMatches.map(seasonMatch => (0, _1.transformToAPIMatch)(seasonMatch.match, model.league)) : [];
|
|
31
35
|
return {
|
|
32
36
|
id: model.season_id,
|
|
33
37
|
matches: matches,
|
package/dist/cjs/src/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Block, BlockFailure as BlockFailureEnum, BlockType as BlockTypeEnum, Coach, CoachOpts, Country, CountryOpts, CourtPosition, CourtRow, CourtTarget as CourtTargetEnum, EventStat, EventType as EventTypeEnum, Formation, formatNumber, GeneralStat, generateModifier, getKeys, getRandomEnumValue, InPlayEvent, InPlayEventOpts, League, LeagueOpts, LiberoReplacement, LiberoReplacementOpts, LiberoReplacementType as LiberoReplacementTypeEnum, Match, MatchSet, MatchSetOpts, MatchSetState, MatchTeam, Name, PerformanceStats, PerformanceStatsOpts, Player, PlayerOpts, PlayerPosition, Rally, RallyEvent, RallyEventOpts, RallyState, randomNumber, Reception, ReceptionFailure as ReceptionFailureEnum, ReceptionType as ReceptionTypeEnum, Role, Score, Season, SeasonOpts, Serve, ServeFailure as ServeFailureEnum, ServeType as ServeTypeEnum, Set, SetFailure as SetFailureEnum, SetStatistics, SetType as SetTypeEnum, shuffle, Spike, SpikeFailure as SpikeFailureEnum, SpikeType as SpikeTypeEnum, 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 './api';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import type { BlockCreationAttributes, BlockFailure, BlockId, BlockPk, BlockType, CoachCreationAttributes, CoachId, CoachPk, CountryCreationAttributes, CountryId, CountryPk, CourtPositionType, CourtTarget, EventCreationAttributes, EventId, EventPk, EventType, FormationType, LeagueCreationAttributes, LeagueId, LeaguePk, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementPk, LiberoReplacementType, MatchCreationAttributes, MatchId, MatchPk, MatchSetCreationAttributes, MatchSetId, MatchSetPk, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsPk, PlayerCreationAttributes, PlayerId, PlayerPk, RallyCreationAttributes, RallyId, RallyPk, RallyPositionCreationAttributes, RallyPositionId, RallyPositionPk, ReceptionCreationAttributes, ReceptionFailure, ReceptionId, ReceptionPk, ReceptionType, RoleType, ScoreCreationAttributes, ScoreId, ScorePk, SeasonCreationAttributes, SeasonId, SeasonMatchCreationAttributes, SeasonMatchId, SeasonMatchPk, SeasonPk, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsPk, ServeCreationAttributes, ServeFailure, ServeId, ServePk, ServeType, SetCreationAttributes, SetFailure, SetId, SetPk, SetType, Side, SpikeCreationAttributes, SpikeFailure, SpikeId, SpikePk, SpikeType, SubstitutionCreationAttributes, SubstitutionId, SubstitutionPk, TeamCreationAttributes, TeamId, TeamPk, TournamentCreationAttributes, TournamentId, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentPk, TournamentStage, TournamentTeamsCreationAttributes, TournamentTeamsId, TournamentTeamsPk, TraitType } from './data';
|
|
4
|
+
import { BlockAttributes, BlockModel, BlockOptionalAttributes, CoachAttributes, CoachModel, CoachOptionalAttributes, CountryAttributes, CountryModel, EventAttributes, EventModel, FormationType as FormationOpts, initModels, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, LiberoReplacementModel, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetModel, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsModel, MatchSetStatsOptionalAttributes, PerformanceStatsAttributes, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PlayerAttributes, PlayerModel, RallyAttributes, RallyModel, RallyPositionAttributes, RallyPositionModel, ReceptionAttributes, ReceptionModel, ScoreAttributes, ScoreModel, SeasonAttributes, SeasonMatchAttributes, SeasonMatchModel, SeasonModel, SeasonTeamsAttributes, SeasonTeamsModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, SubstitutionModel, TeamAttributes, TeamModel, TournamentAttributes, TournamentMatchAttributes, TournamentMatchModel, TournamentModel, TournamentOptionalAttributes, TournamentTeamsAttributes, TournamentTeamsModel, transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromSeasonMatch, 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 './data';
|
|
5
|
+
export { League, Standing, LeagueOpts, CountryOpts, SeasonOpts, Season, StandingOpts, Country, CoachOpts, Coach, Role, SubPriority, GeneralStat, PerformanceStats, Formation, Stat, PerformanceStatsOpts, Block, EventTypeEnum, LiberoReplacement, MatchSet, Rally, RallyEvent, Reception, Score, Serve, Set, Spike, Substitution, BlockTypeEnum, LiberoReplacementTypeEnum, BlockFailureEnum, MatchSetState, MatchSetOpts, LiberoReplacementOpts, RallyEventOpts, InPlayEventOpts, EventStat, Match, InPlayEvent, CourtRow, CourtPosition, CourtTargetEnum, formatNumber, generateModifier, getKeys, MatchTeam, Name, PlayerOpts, Player, RallyState, PlayerPosition, randomNumber, ReceptionTypeEnum, ServeFailureEnum, ServeTypeEnum, SetFailureEnum, SetStatistics, SetTypeEnum, ReceptionFailureEnum, SpikeFailureEnum, SpikeTypeEnum, SubstitutionOpts, Team, shuffle, TeamOpts, Trait, getRandomEnumValue, validateUUID, APIBlock, APICoach, APIEvent, APILiberoReplacement, APIRally, APIReception, transformToAPILeague, APIScore, APIServe, APISet, APISpike, APISubstitution, APILeague, APIMatch, APIInPlayEvent, APIMatchSet, APIPlayer, APISeason, APITeam, APITrait, APITournament, APITournamentMatch, APISetStatistics, initModels, BlockModel, RallyModel, EventModel, MatchSetModel, PerformanceStatsModel, BlockAttributes, LiberoReplacementModel, MatchSetStatsModel, ReceptionModel, BlockOptionalAttributes, CoachAttributes, CountryModel, ScoreModel, CoachModel, RallyPositionModel, CoachOptionalAttributes, CountryAttributes, EventAttributes, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsOptionalAttributes, transformToAPICoach, PerformanceStatsAttributes, PerformanceStatsOptionalAttributes, PlayerAttributes, RallyAttributes, RallyPositionAttributes, ReceptionAttributes, ScoreAttributes, SeasonAttributes, SeasonTeamsAttributes, PlayerModel, SeasonTeamsModel, SeasonModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, TeamAttributes, TeamModel, transformToStage, transformFromStage, SubstitutionModel, TournamentAttributes, TournamentModel, TournamentMatchAttributes, TournamentMatchModel, SeasonMatchModel, SeasonMatchAttributes, 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, transformFromSeasonMatch, 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, FormationOpts, TournamentOptionalAttributes, TournamentTeamsModel, TournamentTeamsAttributes };
|
|
6
|
+
export type { TournamentId, TournamentPk, TournamentMatchId, TournamentMatchPk, TournamentStage, BlockId, BlockPk, CoachId, CoachPk, CountryId, CountryPk, SeasonMatchId, SeasonMatchPk, EventId, EventPk, LeagueId, LeaguePk, LiberoReplacementId, LiberoReplacementPk, MatchId, MatchPk, MatchSetId, MatchSetPk, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsId, PerformanceStatsPk, PlayerId, PlayerPk, RallyId, RallyPk, RallyPositionId, RallyPositionPk, ReceptionId, ReceptionPk, RoleType, ScoreId, ScorePk, SeasonId, SeasonPk, SeasonTeamsId, SeasonTeamsPk, ServeId, ServePk, SetId, SetPk, SpikeId, SpikePk, SubstitutionId, SubstitutionPk, TeamId, TeamPk, TraitType, EventType, BlockFailure, BlockType, FormationType, ServeFailure, SpikeFailure, SpikeType, SetType, ReceptionFailure, SetFailure, ServeType, ReceptionType, CourtPositionType, Side, CourtTarget, LiberoReplacementType, TournamentTeamsId, TournamentTeamsPk, TournamentCreationAttributes, TournamentMatchCreationAttributes, BlockCreationAttributes, CoachCreationAttributes, CountryCreationAttributes, SeasonMatchCreationAttributes, EventCreationAttributes, LeagueCreationAttributes, LiberoReplacementCreationAttributes, MatchCreationAttributes, MatchSetCreationAttributes, MatchSetStatsCreationAttributes, PerformanceStatsCreationAttributes, PlayerCreationAttributes, RallyCreationAttributes, RallyPositionCreationAttributes, ReceptionCreationAttributes, ScoreCreationAttributes, SeasonCreationAttributes, SeasonTeamsCreationAttributes, ServeCreationAttributes, SetCreationAttributes, SpikeCreationAttributes, SubstitutionCreationAttributes, TeamCreationAttributes, TournamentTeamsCreationAttributes, };
|
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,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { BlockCreationAttributes, BlockFailure, BlockId, BlockPk, BlockType, CoachCreationAttributes, CoachId, CoachPk, CountryCreationAttributes, CountryId, CountryPk, CourtPositionType, CourtTarget, EventCreationAttributes, EventId, EventPk, EventType, FormationType, LeagueCreationAttributes, LeagueId, LeaguePk, LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementPk, LiberoReplacementType, MatchCreationAttributes, MatchId, MatchPk, MatchSetCreationAttributes, MatchSetId, MatchSetPk, MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsPk, PlayerCreationAttributes, PlayerId, PlayerPk, RallyCreationAttributes, RallyId, RallyPk, RallyPositionCreationAttributes, RallyPositionId, RallyPositionPk, ReceptionCreationAttributes, ReceptionFailure, ReceptionId, ReceptionPk, ReceptionType, RoleType, ScoreCreationAttributes, ScoreId, ScorePk, SeasonCreationAttributes, SeasonId, SeasonMatchCreationAttributes, SeasonMatchId, SeasonMatchPk, SeasonPk, SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsPk, ServeCreationAttributes, ServeFailure, ServeId, ServePk, ServeType, SetCreationAttributes, SetFailure, SetId, SetPk, SetType, Side, SpikeCreationAttributes, SpikeFailure, SpikeId, SpikePk, SpikeType, SubstitutionCreationAttributes, SubstitutionId, SubstitutionPk, TeamCreationAttributes, TeamId, TeamPk, TournamentCreationAttributes, TournamentId, TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentPk, TournamentStage, TournamentTeamsCreationAttributes, TournamentTeamsId, TournamentTeamsPk, TraitType } from './models';
|
|
2
|
+
import { BlockAttributes, BlockModel, BlockOptionalAttributes, CoachAttributes, CoachModel, CoachOptionalAttributes, CountryAttributes, CountryModel, EventAttributes, EventModel, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, LiberoReplacementModel, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetModel, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsModel, MatchSetStatsOptionalAttributes, PerformanceStatsAttributes, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PlayerAttributes, PlayerModel, RallyAttributes, RallyModel, RallyPositionAttributes, RallyPositionModel, ReceptionAttributes, ReceptionModel, ScoreAttributes, ScoreModel, SeasonAttributes, SeasonMatchAttributes, SeasonMatchModel, SeasonModel, SeasonTeamsAttributes, SeasonTeamsModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, SubstitutionModel, TeamAttributes, TeamModel, TournamentAttributes, TournamentMatchAttributes, TournamentMatchModel, TournamentModel, TournamentOptionalAttributes, TournamentTeamsAttributes, TournamentTeamsModel } from './models';
|
|
3
|
+
import { transformFromBlock, transformFromCoach, transformFromCountry, transformFromCourtPosition, transformFromCourtTarget, transformFromEventType, transformFromFormation, transformFromLeague, transformFromLiberoReplacement, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromSeasonMatch, 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
4
|
import { initModels } from './init-models';
|
|
4
|
-
export { initModels, transformToStage, transformFromStage,
|
|
5
|
+
export { initModels, transformToStage, transformFromStage, SeasonMatchModel, SeasonMatchAttributes, TournamentAttributes, TournamentModel, TournamentMatchAttributes, TournamentMatchModel, BlockAttributes, BlockModel, BlockOptionalAttributes, CoachAttributes, CoachModel, CoachOptionalAttributes, CountryAttributes, CountryModel, EventAttributes, EventModel, LeagueAttributes, LeagueModel, LiberoReplacementAttributes, LiberoReplacementModel, MatchAttributes, MatchModel, MatchSetAttributes, MatchSetModel, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsModel, MatchSetStatsOptionalAttributes, PerformanceStatsAttributes, PerformanceStatsModel, PerformanceStatsOptionalAttributes, PlayerAttributes, PlayerModel, RallyAttributes, RallyModel, RallyPositionAttributes, RallyPositionModel, ReceptionAttributes, ReceptionModel, ScoreAttributes, ScoreModel, SeasonAttributes, SeasonModel, SeasonTeamsAttributes, SeasonTeamsModel, ServeAttributes, ServeModel, SetAttributes, SetModel, SpikeAttributes, SpikeModel, SubstitutionAttributes, SubstitutionModel, TeamAttributes, 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, TournamentOptionalAttributes, TournamentTeamsAttributes, TournamentTeamsModel, };
|
|
6
|
+
export type { TournamentId, TournamentPk, TournamentMatchId, TournamentMatchPk, TournamentStage, BlockId, BlockPk, CoachId, CoachPk, CountryId, CountryPk, SeasonMatchId, SeasonMatchPk, EventId, EventPk, LeagueId, LeaguePk, LiberoReplacementId, LiberoReplacementPk, MatchId, MatchPk, MatchSetId, MatchSetPk, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsId, PerformanceStatsPk, PlayerId, PlayerPk, RallyId, RallyPk, RallyPositionId, RallyPositionPk, ReceptionId, ReceptionPk, RoleType, ScoreId, ScorePk, SeasonId, SeasonPk, SeasonTeamsId, SeasonTeamsPk, ServeId, ServePk, SetId, SetPk, SpikeId, SpikePk, SubstitutionId, SubstitutionPk, TeamId, TeamPk, TraitType, EventType, BlockFailure, BlockType, FormationType, ServeFailure, SpikeFailure, SpikeType, SetType, ReceptionFailure, SetFailure, ServeType, ReceptionType, CourtPositionType, Side, CourtTarget, LiberoReplacementType, TournamentTeamsId, TournamentTeamsPk, TournamentCreationAttributes, TournamentMatchCreationAttributes, BlockCreationAttributes, CoachCreationAttributes, CountryCreationAttributes, SeasonMatchCreationAttributes, EventCreationAttributes, LeagueCreationAttributes, LiberoReplacementCreationAttributes, MatchCreationAttributes, MatchSetCreationAttributes, MatchSetStatsCreationAttributes, PerformanceStatsCreationAttributes, PlayerCreationAttributes, RallyCreationAttributes, RallyPositionCreationAttributes, ReceptionCreationAttributes, ScoreCreationAttributes, SeasonCreationAttributes, SeasonTeamsCreationAttributes, ServeCreationAttributes, SetCreationAttributes, SpikeCreationAttributes, SubstitutionCreationAttributes, TeamCreationAttributes, TournamentTeamsCreationAttributes, };
|
|
@@ -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, transformFromMatch, transformFromMatchSet, transformFromMatchSetStats, transformFromPerformanceStats, transformFromPlayer, transformFromPlayerPosition, transformFromRally, transformFromReception, transformFromRole, transformFromScore, transformFromSeason, transformFromSeasonMatch, 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,7 +48,7 @@ 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.hasOne(
|
|
51
|
+
Match.hasOne(SeasonMatch, { as: 'SeasonMatch', foreignKey: 'match_id' });
|
|
52
52
|
Match.hasOne(TournamentMatch, { as: 'TournamentMatch', foreignKey: 'match_id' });
|
|
53
53
|
MatchSet.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
|
|
54
54
|
MatchSet.belongsTo(Player, { as: 'away_libero_Player', foreignKey: 'away_libero' });
|
|
@@ -124,7 +124,7 @@ export function initModels(sequelize) {
|
|
|
124
124
|
Score.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
|
|
125
125
|
Season.belongsTo(League, { as: 'league', foreignKey: 'league_id' });
|
|
126
126
|
Season.belongsTo(Team, { as: 'Champion', foreignKey: 'champion' });
|
|
127
|
-
Season.hasMany(
|
|
127
|
+
Season.hasMany(SeasonMatch, { as: 'SeasonMatches', foreignKey: 'season_id' });
|
|
128
128
|
Season.hasMany(SeasonTeams, { as: 'SeasonTeams', foreignKey: 'season_id' });
|
|
129
129
|
Season.belongsToMany(Team, {
|
|
130
130
|
as: 'seasonTeams',
|
|
@@ -132,8 +132,8 @@ export function initModels(sequelize) {
|
|
|
132
132
|
foreignKey: 'season_id',
|
|
133
133
|
otherKey: 'team_id'
|
|
134
134
|
});
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
SeasonMatch.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
|
|
136
|
+
SeasonMatch.belongsTo(Season, { as: 'season', foreignKey: 'season_id' });
|
|
137
137
|
SeasonTeams.belongsTo(Season, { as: 'season', foreignKey: 'season_id' });
|
|
138
138
|
SeasonTeams.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
|
|
139
139
|
Serve.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
|
|
@@ -198,7 +198,7 @@ export function initModels(sequelize) {
|
|
|
198
198
|
Score,
|
|
199
199
|
Season,
|
|
200
200
|
SeasonTeams,
|
|
201
|
-
|
|
201
|
+
SeasonMatch,
|
|
202
202
|
Serve,
|
|
203
203
|
Set,
|
|
204
204
|
Spike,
|
|
@@ -3,7 +3,7 @@ import { Model, Optional } from 'sequelize';
|
|
|
3
3
|
import type { CountryId, CountryModel, TeamId, TeamModel } from '.';
|
|
4
4
|
export interface CoachAttributes {
|
|
5
5
|
coach_id: string;
|
|
6
|
-
formation:
|
|
6
|
+
formation: FormationType;
|
|
7
7
|
substitution_tolerance: number;
|
|
8
8
|
first_name: string;
|
|
9
9
|
last_name: string;
|
|
@@ -11,12 +11,12 @@ export interface CoachAttributes {
|
|
|
11
11
|
}
|
|
12
12
|
export type CoachPk = 'coach_id';
|
|
13
13
|
export type CoachId = CoachModel[CoachPk];
|
|
14
|
-
export type
|
|
14
|
+
export type FormationType = '4-2' | '6-2' | '5-1';
|
|
15
15
|
export type CoachOptionalAttributes = 'substitution_tolerance';
|
|
16
16
|
export type CoachCreationAttributes = Optional<CoachAttributes, CoachOptionalAttributes>;
|
|
17
17
|
export declare class CoachModel extends Model<CoachAttributes, CoachCreationAttributes> implements CoachAttributes {
|
|
18
18
|
coach_id: string;
|
|
19
|
-
formation:
|
|
19
|
+
formation: FormationType;
|
|
20
20
|
substitution_tolerance: number;
|
|
21
21
|
first_name: string;
|
|
22
22
|
last_name: string;
|
|
@@ -1,27 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import type { BlockCreationAttributes, BlockFailure, BlockId, BlockOptionalAttributes, BlockPk, BlockType } from './block';
|
|
2
|
+
import { BlockAttributes, BlockModel } from './block';
|
|
3
|
+
import type { CoachCreationAttributes, CoachId, CoachOptionalAttributes, CoachPk, FormationType } from './coach';
|
|
4
|
+
import { CoachAttributes, CoachModel } from './coach';
|
|
5
|
+
import type { CountryCreationAttributes, CountryId, CountryPk } from './country';
|
|
6
|
+
import { CountryAttributes, CountryModel } from './country';
|
|
7
|
+
import type { CourtTarget, EventCreationAttributes, EventId, EventPk, EventType } from './event';
|
|
8
|
+
import { EventAttributes, EventModel } from './event';
|
|
9
|
+
import type { LeagueCreationAttributes, LeagueId, LeaguePk } from './league';
|
|
10
|
+
import { LeagueAttributes, LeagueModel } from './league';
|
|
11
|
+
import type { LiberoReplacementCreationAttributes, LiberoReplacementId, LiberoReplacementPk, LiberoReplacementType } from './libero-replacement';
|
|
12
|
+
import { LiberoReplacementAttributes, LiberoReplacementModel } from './libero-replacement';
|
|
13
|
+
import type { MatchCreationAttributes, MatchId, MatchPk } from './match';
|
|
14
|
+
import { MatchAttributes, MatchModel } from './match';
|
|
15
|
+
import type { MatchSetCreationAttributes, MatchSetId, MatchSetOptionalAttributes, MatchSetPk } from './match-set';
|
|
16
|
+
import { MatchSetAttributes, MatchSetModel } from './match-set';
|
|
17
|
+
import type { MatchSetStatsCreationAttributes, MatchSetStatsId, MatchSetStatsOptionalAttributes, MatchSetStatsPk } from './match-set-stats';
|
|
18
|
+
import { MatchSetStatsAttributes, MatchSetStatsModel } from './match-set-stats';
|
|
19
|
+
import type { PerformanceStatsCreationAttributes, PerformanceStatsId, PerformanceStatsOptionalAttributes, PerformanceStatsPk } from './performance-stats';
|
|
20
|
+
import { PerformanceStatsAttributes, PerformanceStatsModel } from './performance-stats';
|
|
21
|
+
import type { PlayerCreationAttributes, PlayerId, PlayerPk, RoleType, TraitType } from './player';
|
|
22
|
+
import { PlayerAttributes, PlayerModel } from './player';
|
|
12
23
|
import { RallyAttributes, RallyCreationAttributes, RallyId, RallyModel, RallyPk } from './rally';
|
|
13
24
|
import { CourtPositionType, RallyPositionAttributes, RallyPositionCreationAttributes, RallyPositionId, RallyPositionModel, RallyPositionPk, Side } from './rally-position';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
|
|
25
|
+
import type { ReceptionCreationAttributes, ReceptionFailure, ReceptionId, ReceptionPk, ReceptionType } from './reception';
|
|
26
|
+
import { ReceptionAttributes, ReceptionModel } from './reception';
|
|
27
|
+
import type { ScoreCreationAttributes, ScoreId, ScorePk } from './score';
|
|
28
|
+
import { ScoreAttributes, ScoreModel } from './score';
|
|
29
|
+
import type { SeasonCreationAttributes, SeasonId, SeasonPk } from './season';
|
|
30
|
+
import { SeasonAttributes, SeasonModel } from './season';
|
|
31
|
+
import type { SeasonTeamsCreationAttributes, SeasonTeamsId, SeasonTeamsPk } from './season-teams';
|
|
32
|
+
import { SeasonTeamsAttributes, SeasonTeamsModel } from './season-teams';
|
|
33
|
+
import type { SeasonMatchCreationAttributes, SeasonMatchId, SeasonMatchPk } from './season-match';
|
|
34
|
+
import { SeasonMatchAttributes, SeasonMatchModel } from './season-match';
|
|
35
|
+
import type { ServeCreationAttributes, ServeFailure, ServeId, ServePk, ServeType } from './serve';
|
|
36
|
+
import { ServeAttributes, ServeModel } from './serve';
|
|
37
|
+
import type { SetCreationAttributes, SetFailure, SetId, SetPk, SetType } from './set';
|
|
38
|
+
import { SetAttributes, SetModel } from './set';
|
|
39
|
+
import type { SpikeCreationAttributes, SpikeFailure, SpikeId, SpikePk, SpikeType } from './spike';
|
|
40
|
+
import { SpikeAttributes, SpikeModel } from './spike';
|
|
41
|
+
import type { SubstitutionCreationAttributes, SubstitutionId, SubstitutionPk } from './substitution';
|
|
42
|
+
import { SubstitutionAttributes, SubstitutionModel } from './substitution';
|
|
43
|
+
import type { TeamCreationAttributes, TeamId, TeamPk } from './team';
|
|
44
|
+
import { TeamAttributes, TeamModel } from './team';
|
|
45
|
+
import type { TournamentCreationAttributes, TournamentId, TournamentOptionalAttributes, TournamentPk } from './tournament';
|
|
46
|
+
import { TournamentAttributes, TournamentModel } from './tournament';
|
|
47
|
+
import type { TournamentMatchCreationAttributes, TournamentMatchId, TournamentMatchPk, TournamentStage } from './tournament-match';
|
|
48
|
+
import { TournamentMatchAttributes, TournamentMatchModel } from './tournament-match';
|
|
49
|
+
import type { TournamentTeamsCreationAttributes, TournamentTeamsId, TournamentTeamsPk } from './tournament-teams';
|
|
50
|
+
import { TournamentTeamsAttributes, TournamentTeamsModel } from './tournament-teams';
|
|
51
|
+
export type { TournamentId, TournamentPk, TournamentMatchId, TournamentMatchPk, TournamentStage, BlockId, BlockPk, CoachId, CoachPk, CountryId, CountryPk, SeasonMatchId, SeasonMatchPk, EventId, EventPk, LeagueId, LeaguePk, LiberoReplacementId, LiberoReplacementPk, MatchId, MatchPk, MatchSetId, MatchSetPk, MatchSetStatsId, MatchSetStatsPk, PerformanceStatsId, PerformanceStatsPk, PlayerId, PlayerPk, RallyId, RallyPk, RallyPositionId, RallyPositionPk, ReceptionId, ReceptionPk, RoleType, ScoreId, ScorePk, SeasonId, SeasonPk, SeasonTeamsId, SeasonTeamsPk, ServeId, ServePk, SetId, SetPk, SpikeId, SpikePk, SubstitutionId, SubstitutionPk, TeamId, TeamPk, TraitType, EventType, BlockFailure, BlockType, FormationType, ServeFailure, SpikeFailure, SpikeType, SetType, ReceptionFailure, SetFailure, ServeType, ReceptionType, CourtPositionType, Side, CourtTarget, LiberoReplacementType, TournamentTeamsId, TournamentTeamsPk, TournamentCreationAttributes, TournamentMatchCreationAttributes, BlockCreationAttributes, CoachCreationAttributes, CountryCreationAttributes, SeasonMatchCreationAttributes, EventCreationAttributes, LeagueCreationAttributes, LiberoReplacementCreationAttributes, MatchCreationAttributes, MatchSetCreationAttributes, MatchSetStatsCreationAttributes, PerformanceStatsCreationAttributes, PlayerCreationAttributes, RallyCreationAttributes, RallyPositionCreationAttributes, ReceptionCreationAttributes, ScoreCreationAttributes, SeasonCreationAttributes, SeasonTeamsCreationAttributes, ServeCreationAttributes, SetCreationAttributes, SpikeCreationAttributes, SubstitutionCreationAttributes, TeamCreationAttributes, TournamentTeamsCreationAttributes, };
|
|
52
|
+
export { TournamentAttributes, TournamentMatchAttributes, BlockAttributes, BlockOptionalAttributes, CoachAttributes, CoachOptionalAttributes, CountryAttributes, SeasonMatchAttributes, EventAttributes, LeagueAttributes, LiberoReplacementAttributes, MatchAttributes, MatchSetAttributes, MatchSetOptionalAttributes, MatchSetStatsAttributes, MatchSetStatsOptionalAttributes, PerformanceStatsAttributes, PerformanceStatsOptionalAttributes, PlayerAttributes, RallyAttributes, RallyPositionAttributes, ReceptionAttributes, ScoreAttributes, SeasonAttributes, SeasonTeamsAttributes, ServeAttributes, SetAttributes, SpikeAttributes, SubstitutionAttributes, TeamAttributes, TournamentOptionalAttributes, TournamentTeamsAttributes, 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, };
|
|
@@ -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
|
}
|