volleyballsimtypes 0.0.105 → 0.0.106

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.
@@ -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;
@@ -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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.105",
3
+ "version": "0.0.106",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",