volleyballsimtypes 0.0.105 → 0.0.107

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.
@@ -5,7 +5,7 @@ export interface CompetitionAttributes {
5
5
  competition_id: string;
6
6
  iteration: number;
7
7
  type: CompetitionType;
8
- leagueSeason?: LeagueSeasonAttributes;
8
+ LeagueSeason?: LeagueSeasonAttributes;
9
9
  CompetitionChampion?: CompetitionChampionAttributes;
10
10
  CompetitionMatches?: CompetitionMatchAttributes[];
11
11
  CompetitionTeams?: CompetitionTeamsAttributes[];
@@ -1,10 +1,11 @@
1
1
  import * as Sequelize from 'sequelize';
2
2
  import { Model } from 'sequelize';
3
- import { CountryId, CountryModel, LeagueSeasonId, LeagueSeasonModel, TeamId, TeamModel } from '.';
3
+ import { CountryId, CountryModel, LeagueSeasonAttributes, LeagueSeasonId, LeagueSeasonModel, TeamId, TeamModel } from '.';
4
4
  export interface LeagueAttributes {
5
5
  league_id: string;
6
6
  country_id: string;
7
7
  name: string;
8
+ LeagueSeasons?: LeagueSeasonAttributes[];
8
9
  }
9
10
  export type LeaguePk = 'league_id';
10
11
  export type LeagueId = LeagueModel[LeaguePk];
@@ -4,10 +4,15 @@ exports.transformFromLeague = exports.transformToAPILeague = exports.transformTo
4
4
  const service_1 = require("../../service");
5
5
  const _1 = require(".");
6
6
  function transformToAttributes(league) {
7
+ const LeagueSeasons = league.seasons != null ? league.seasons.map(season => ({
8
+ league_id: league.id,
9
+ competition_id: season.id
10
+ })) : undefined;
7
11
  return {
8
12
  league_id: league.id,
9
13
  country_id: league.country.id,
10
- name: league.name
14
+ name: league.name,
15
+ LeagueSeasons
11
16
  };
12
17
  }
13
18
  exports.transformFromLeague = transformToAttributes;
@@ -18,7 +18,7 @@ function transformToAttributes(season, leagueId) {
18
18
  competition_id: season.id,
19
19
  type: 'LEAGUE',
20
20
  iteration: season.iteration.id,
21
- leagueSeason: { league_id: leagueId, competition_id: season.id },
21
+ LeagueSeason: { league_id: leagueId, competition_id: season.id },
22
22
  CompetitionChampion: champion,
23
23
  CompetitionMatches: matches,
24
24
  CompetitionTeams: teams
@@ -5,7 +5,7 @@ export interface CompetitionAttributes {
5
5
  competition_id: string;
6
6
  iteration: number;
7
7
  type: CompetitionType;
8
- leagueSeason?: LeagueSeasonAttributes;
8
+ LeagueSeason?: LeagueSeasonAttributes;
9
9
  CompetitionChampion?: CompetitionChampionAttributes;
10
10
  CompetitionMatches?: CompetitionMatchAttributes[];
11
11
  CompetitionTeams?: CompetitionTeamsAttributes[];
@@ -1,10 +1,11 @@
1
1
  import * as Sequelize from 'sequelize';
2
2
  import { Model } from 'sequelize';
3
- import { CountryId, CountryModel, LeagueSeasonId, LeagueSeasonModel, TeamId, TeamModel } from '.';
3
+ import { CountryId, CountryModel, LeagueSeasonAttributes, LeagueSeasonId, LeagueSeasonModel, TeamId, TeamModel } from '.';
4
4
  export interface LeagueAttributes {
5
5
  league_id: string;
6
6
  country_id: string;
7
7
  name: string;
8
+ LeagueSeasons?: LeagueSeasonAttributes[];
8
9
  }
9
10
  export type LeaguePk = 'league_id';
10
11
  export type LeagueId = LeagueModel[LeaguePk];
@@ -1,10 +1,15 @@
1
1
  import { League } from '../../service';
2
2
  import { transformToCountry, transformToSeason } from '.';
3
3
  function transformToAttributes(league) {
4
+ const LeagueSeasons = league.seasons != null ? league.seasons.map(season => ({
5
+ league_id: league.id,
6
+ competition_id: season.id
7
+ })) : undefined;
4
8
  return {
5
9
  league_id: league.id,
6
10
  country_id: league.country.id,
7
- name: league.name
11
+ name: league.name,
12
+ LeagueSeasons
8
13
  };
9
14
  }
10
15
  function transformToObject(model) {
@@ -15,7 +15,7 @@ function transformToAttributes(season, leagueId) {
15
15
  competition_id: season.id,
16
16
  type: 'LEAGUE',
17
17
  iteration: season.iteration.id,
18
- leagueSeason: { league_id: leagueId, competition_id: season.id },
18
+ LeagueSeason: { league_id: leagueId, competition_id: season.id },
19
19
  CompetitionChampion: champion,
20
20
  CompetitionMatches: matches,
21
21
  CompetitionTeams: teams
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.105",
3
+ "version": "0.0.107",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",