volleyballsimtypes 0.0.32 → 0.0.33
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/models/team.d.ts +1 -1
- package/dist/cjs/src/data/transformers/player.js +2 -1
- package/dist/cjs/src/data/transformers/season.js +3 -1
- package/dist/cjs/src/data/transformers/team.js +2 -1
- package/dist/esm/src/data/models/team.d.ts +1 -1
- package/dist/esm/src/data/transformers/player.js +3 -2
- package/dist/esm/src/data/transformers/season.js +5 -3
- package/dist/esm/src/data/transformers/team.js +3 -2
- package/package.json +1 -1
|
@@ -32,6 +32,7 @@ export declare class TeamModel extends Model<TeamAttributes, TeamCreationAttribu
|
|
|
32
32
|
country_id: string;
|
|
33
33
|
coach: CoachModel;
|
|
34
34
|
league: LeagueModel;
|
|
35
|
+
Players: PlayerModel[];
|
|
35
36
|
getCoach: Sequelize.BelongsToGetAssociationMixin<CoachModel>;
|
|
36
37
|
setCoach: Sequelize.BelongsToSetAssociationMixin<CoachModel, CoachId>;
|
|
37
38
|
createCoach: Sequelize.BelongsToCreateAssociationMixin<CoachModel>;
|
|
@@ -64,7 +65,6 @@ export declare class TeamModel extends Model<TeamAttributes, TeamCreationAttribu
|
|
|
64
65
|
hasAway_team_Match: Sequelize.HasManyHasAssociationMixin<MatchModel, MatchId>;
|
|
65
66
|
hasAway_team_Matches: Sequelize.HasManyHasAssociationsMixin<MatchModel, MatchId>;
|
|
66
67
|
countAway_team_Matches: Sequelize.HasManyCountAssociationsMixin;
|
|
67
|
-
Players: PlayerModel[];
|
|
68
68
|
getPlayers: Sequelize.HasManyGetAssociationsMixin<PlayerModel>;
|
|
69
69
|
setPlayers: Sequelize.HasManySetAssociationsMixin<PlayerModel, PlayerId>;
|
|
70
70
|
addPlayer: Sequelize.HasManyAddAssociationMixin<PlayerModel, PlayerId>;
|
|
@@ -16,7 +16,8 @@ function transformToAttributes(player, teamId) {
|
|
|
16
16
|
first_name: player.name.first,
|
|
17
17
|
last_name: player.name.last,
|
|
18
18
|
traits: player.traits.map(trait_1.transformFromTrait),
|
|
19
|
-
roles: player.roles.map(role_1.transformFromRole)
|
|
19
|
+
roles: player.roles.map(role_1.transformFromRole),
|
|
20
|
+
PerformanceStat: (0, performance_stats_1.transformFromPerformanceStats)(player)
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
23
|
exports.transformFromPlayer = transformToAttributes;
|
|
@@ -10,7 +10,9 @@ function transformToAttributes(season, leagueId) {
|
|
|
10
10
|
season_id: season.id,
|
|
11
11
|
iteration: season.iteration,
|
|
12
12
|
league_id: leagueId,
|
|
13
|
-
champion: season.champion != null ? season.champion.id : undefined
|
|
13
|
+
champion: season.champion != null ? season.champion.id : undefined,
|
|
14
|
+
seasonTeams: season.teams.map(team_1.transformFromTeam),
|
|
15
|
+
seasonMatches: season.matches.map(match_1.transformFromMatch)
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
18
|
exports.transformFromSeason = transformToAttributes;
|
|
@@ -12,7 +12,8 @@ function transformToAttributes(team) {
|
|
|
12
12
|
short_name: team.shortName,
|
|
13
13
|
coach_id: team.coach.id,
|
|
14
14
|
country_id: team.country.id,
|
|
15
|
-
league_id: team.league.id
|
|
15
|
+
league_id: team.league.id,
|
|
16
|
+
coach: team.coach != null ? (0, coach_1.transformFromCoach)(team.coach) : undefined
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
19
|
exports.transformFromTeam = transformToAttributes;
|
|
@@ -32,6 +32,7 @@ export declare class TeamModel extends Model<TeamAttributes, TeamCreationAttribu
|
|
|
32
32
|
country_id: string;
|
|
33
33
|
coach: CoachModel;
|
|
34
34
|
league: LeagueModel;
|
|
35
|
+
Players: PlayerModel[];
|
|
35
36
|
getCoach: Sequelize.BelongsToGetAssociationMixin<CoachModel>;
|
|
36
37
|
setCoach: Sequelize.BelongsToSetAssociationMixin<CoachModel, CoachId>;
|
|
37
38
|
createCoach: Sequelize.BelongsToCreateAssociationMixin<CoachModel>;
|
|
@@ -64,7 +65,6 @@ export declare class TeamModel extends Model<TeamAttributes, TeamCreationAttribu
|
|
|
64
65
|
hasAway_team_Match: Sequelize.HasManyHasAssociationMixin<MatchModel, MatchId>;
|
|
65
66
|
hasAway_team_Matches: Sequelize.HasManyHasAssociationsMixin<MatchModel, MatchId>;
|
|
66
67
|
countAway_team_Matches: Sequelize.HasManyCountAssociationsMixin;
|
|
67
|
-
Players: PlayerModel[];
|
|
68
68
|
getPlayers: Sequelize.HasManyGetAssociationsMixin<PlayerModel>;
|
|
69
69
|
setPlayers: Sequelize.HasManySetAssociationsMixin<PlayerModel, PlayerId>;
|
|
70
70
|
addPlayer: Sequelize.HasManyAddAssociationMixin<PlayerModel, PlayerId>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GeneralStat, Player } from '../../service';
|
|
2
2
|
import { transformFromTrait, transformToAPITrait, transformToTrait } from './trait';
|
|
3
3
|
import { transformFromRole, transformToRole } from './role';
|
|
4
|
-
import { transformToPerformanceStats } from './performance-stats';
|
|
4
|
+
import { transformFromPerformanceStats, transformToPerformanceStats } from './performance-stats';
|
|
5
5
|
import { transformToCountry } from './country';
|
|
6
6
|
import { transformToAPIMatchSetStats } from './match-set-stats';
|
|
7
7
|
function transformToAttributes(player, teamId) {
|
|
@@ -13,7 +13,8 @@ function transformToAttributes(player, teamId) {
|
|
|
13
13
|
first_name: player.name.first,
|
|
14
14
|
last_name: player.name.last,
|
|
15
15
|
traits: player.traits.map(transformFromTrait),
|
|
16
|
-
roles: player.roles.map(transformFromRole)
|
|
16
|
+
roles: player.roles.map(transformFromRole),
|
|
17
|
+
PerformanceStat: transformFromPerformanceStats(player)
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
function transformToObject(model) {
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { transformToAPITeam, transformToTeam } from './team';
|
|
1
|
+
import { transformFromTeam, transformToAPITeam, transformToTeam } from './team';
|
|
2
2
|
import { Season } from '../../service';
|
|
3
|
-
import { transformToAPIMatch, transformToMatch } from './match';
|
|
3
|
+
import { transformFromMatch, transformToAPIMatch, transformToMatch } from './match';
|
|
4
4
|
import { transformToLeague } from './league';
|
|
5
5
|
function transformToAttributes(season, leagueId) {
|
|
6
6
|
return {
|
|
7
7
|
season_id: season.id,
|
|
8
8
|
iteration: season.iteration,
|
|
9
9
|
league_id: leagueId,
|
|
10
|
-
champion: season.champion != null ? season.champion.id : undefined
|
|
10
|
+
champion: season.champion != null ? season.champion.id : undefined,
|
|
11
|
+
seasonTeams: season.teams.map(transformFromTeam),
|
|
12
|
+
seasonMatches: season.matches.map(transformFromMatch)
|
|
11
13
|
};
|
|
12
14
|
}
|
|
13
15
|
function transformToObject(model) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Team } from '../../service';
|
|
2
2
|
import { transformToCountry } from './country';
|
|
3
|
-
import { transformToAPICoach, transformToCoach } from './coach';
|
|
3
|
+
import { transformFromCoach, transformToAPICoach, transformToCoach } from './coach';
|
|
4
4
|
import { transformToAPIPlayer, transformToPlayer } from './player';
|
|
5
5
|
function transformToAttributes(team) {
|
|
6
6
|
return {
|
|
@@ -9,7 +9,8 @@ function transformToAttributes(team) {
|
|
|
9
9
|
short_name: team.shortName,
|
|
10
10
|
coach_id: team.coach.id,
|
|
11
11
|
country_id: team.country.id,
|
|
12
|
-
league_id: team.league.id
|
|
12
|
+
league_id: team.league.id,
|
|
13
|
+
coach: team.coach != null ? transformFromCoach(team.coach) : undefined
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
16
|
function transformToObject(team) {
|