volleyballsimtypes 0.0.193 → 0.0.194
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/division.d.ts +2 -0
- package/dist/cjs/src/data/models/division.js +4 -0
- package/dist/cjs/src/data/transformers/division.js +2 -0
- package/dist/cjs/src/service/competition/division.d.ts +3 -1
- package/dist/cjs/src/service/competition/division.js +2 -1
- package/dist/esm/src/data/models/division.d.ts +2 -0
- package/dist/esm/src/data/models/division.js +4 -0
- package/dist/esm/src/data/transformers/division.js +2 -0
- package/dist/esm/src/service/competition/division.d.ts +3 -1
- package/dist/esm/src/service/competition/division.js +2 -1
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ export interface DivisionAttributes {
|
|
|
5
5
|
division_id: string;
|
|
6
6
|
league_id: string;
|
|
7
7
|
tier: number;
|
|
8
|
+
subdivision: number;
|
|
8
9
|
name: string;
|
|
9
10
|
DivisionSeasons?: DivisionSeasonAttributes[];
|
|
10
11
|
Teams?: TeamAttributes[];
|
|
@@ -16,6 +17,7 @@ export declare class DivisionModel extends Model<DivisionAttributes, DivisionCre
|
|
|
16
17
|
division_id: string;
|
|
17
18
|
league_id: string;
|
|
18
19
|
tier: number;
|
|
20
|
+
subdivision: number;
|
|
19
21
|
name: string;
|
|
20
22
|
league: LeagueModel;
|
|
21
23
|
getLeague: Sequelize.BelongsToGetAssociationMixin<LeagueModel>;
|
|
@@ -22,6 +22,10 @@ class DivisionModel extends sequelize_1.Model {
|
|
|
22
22
|
type: sequelize_1.DataTypes.INTEGER,
|
|
23
23
|
allowNull: false
|
|
24
24
|
},
|
|
25
|
+
subdivision: {
|
|
26
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
27
|
+
allowNull: false
|
|
28
|
+
},
|
|
25
29
|
name: {
|
|
26
30
|
type: sequelize_1.DataTypes.STRING,
|
|
27
31
|
allowNull: false,
|
|
@@ -14,6 +14,7 @@ function transformToAttributes(division) {
|
|
|
14
14
|
division_id: division.id,
|
|
15
15
|
league_id: division.leagueId,
|
|
16
16
|
tier: division.tier,
|
|
17
|
+
subdivision: division.subdivision,
|
|
17
18
|
name: division.name,
|
|
18
19
|
DivisionSeasons,
|
|
19
20
|
Teams
|
|
@@ -25,6 +26,7 @@ function transformToObject(model) {
|
|
|
25
26
|
id: model.division_id,
|
|
26
27
|
name: model.name,
|
|
27
28
|
tier: model.tier,
|
|
29
|
+
subdivision: model.subdivision,
|
|
28
30
|
leagueId: model.league_id,
|
|
29
31
|
seasons: (model.DivisionSeasons ?? []).map((ds) => (0, season_1.transformToSeason)(ds.competition)),
|
|
30
32
|
teams: model.Teams != null ? model.Teams.map(team_1.transformToTeam) : undefined
|
|
@@ -4,6 +4,7 @@ interface DivisionOpts {
|
|
|
4
4
|
readonly id: string;
|
|
5
5
|
readonly name: string;
|
|
6
6
|
readonly tier: number;
|
|
7
|
+
readonly subdivision: number;
|
|
7
8
|
readonly leagueId: string;
|
|
8
9
|
readonly seasons: Season[];
|
|
9
10
|
readonly teams?: Team[];
|
|
@@ -12,9 +13,10 @@ export declare class Division {
|
|
|
12
13
|
readonly id: string;
|
|
13
14
|
readonly name: string;
|
|
14
15
|
readonly tier: number;
|
|
16
|
+
readonly subdivision: number;
|
|
15
17
|
readonly leagueId: string;
|
|
16
18
|
readonly seasons: Season[];
|
|
17
19
|
readonly teams?: Team[];
|
|
18
|
-
constructor({ id, name, tier, seasons, teams, leagueId }: DivisionOpts);
|
|
20
|
+
constructor({ id, name, tier, subdivision, seasons, teams, leagueId }: DivisionOpts);
|
|
19
21
|
}
|
|
20
22
|
export {};
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Division = void 0;
|
|
4
4
|
class Division {
|
|
5
|
-
constructor({ id, name, tier, seasons, teams, leagueId }) {
|
|
5
|
+
constructor({ id, name, tier, subdivision, seasons, teams, leagueId }) {
|
|
6
6
|
this.id = id;
|
|
7
7
|
this.name = name;
|
|
8
8
|
this.tier = tier;
|
|
9
|
+
this.subdivision = subdivision;
|
|
9
10
|
this.leagueId = leagueId;
|
|
10
11
|
this.seasons = seasons;
|
|
11
12
|
this.teams = teams;
|
|
@@ -5,6 +5,7 @@ export interface DivisionAttributes {
|
|
|
5
5
|
division_id: string;
|
|
6
6
|
league_id: string;
|
|
7
7
|
tier: number;
|
|
8
|
+
subdivision: number;
|
|
8
9
|
name: string;
|
|
9
10
|
DivisionSeasons?: DivisionSeasonAttributes[];
|
|
10
11
|
Teams?: TeamAttributes[];
|
|
@@ -16,6 +17,7 @@ export declare class DivisionModel extends Model<DivisionAttributes, DivisionCre
|
|
|
16
17
|
division_id: string;
|
|
17
18
|
league_id: string;
|
|
18
19
|
tier: number;
|
|
20
|
+
subdivision: number;
|
|
19
21
|
name: string;
|
|
20
22
|
league: LeagueModel;
|
|
21
23
|
getLeague: Sequelize.BelongsToGetAssociationMixin<LeagueModel>;
|
|
@@ -11,6 +11,7 @@ function transformToAttributes(division) {
|
|
|
11
11
|
division_id: division.id,
|
|
12
12
|
league_id: division.leagueId,
|
|
13
13
|
tier: division.tier,
|
|
14
|
+
subdivision: division.subdivision,
|
|
14
15
|
name: division.name,
|
|
15
16
|
DivisionSeasons,
|
|
16
17
|
Teams
|
|
@@ -21,6 +22,7 @@ function transformToObject(model) {
|
|
|
21
22
|
id: model.division_id,
|
|
22
23
|
name: model.name,
|
|
23
24
|
tier: model.tier,
|
|
25
|
+
subdivision: model.subdivision,
|
|
24
26
|
leagueId: model.league_id,
|
|
25
27
|
seasons: (model.DivisionSeasons ?? []).map((ds) => transformToSeason(ds.competition)),
|
|
26
28
|
teams: model.Teams != null ? model.Teams.map(transformToTeam) : undefined
|
|
@@ -4,6 +4,7 @@ interface DivisionOpts {
|
|
|
4
4
|
readonly id: string;
|
|
5
5
|
readonly name: string;
|
|
6
6
|
readonly tier: number;
|
|
7
|
+
readonly subdivision: number;
|
|
7
8
|
readonly leagueId: string;
|
|
8
9
|
readonly seasons: Season[];
|
|
9
10
|
readonly teams?: Team[];
|
|
@@ -12,9 +13,10 @@ export declare class Division {
|
|
|
12
13
|
readonly id: string;
|
|
13
14
|
readonly name: string;
|
|
14
15
|
readonly tier: number;
|
|
16
|
+
readonly subdivision: number;
|
|
15
17
|
readonly leagueId: string;
|
|
16
18
|
readonly seasons: Season[];
|
|
17
19
|
readonly teams?: Team[];
|
|
18
|
-
constructor({ id, name, tier, seasons, teams, leagueId }: DivisionOpts);
|
|
20
|
+
constructor({ id, name, tier, subdivision, seasons, teams, leagueId }: DivisionOpts);
|
|
19
21
|
}
|
|
20
22
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export class Division {
|
|
2
|
-
constructor({ id, name, tier, seasons, teams, leagueId }) {
|
|
2
|
+
constructor({ id, name, tier, subdivision, seasons, teams, leagueId }) {
|
|
3
3
|
this.id = id;
|
|
4
4
|
this.name = name;
|
|
5
5
|
this.tier = tier;
|
|
6
|
+
this.subdivision = subdivision;
|
|
6
7
|
this.leagueId = leagueId;
|
|
7
8
|
this.seasons = seasons;
|
|
8
9
|
this.teams = teams;
|