volleyballsimtypes 0.0.41 → 0.0.42
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/tournament.d.ts +26 -1
- package/dist/cjs/src/data/transformers/tournament.js +2 -0
- package/dist/cjs/src/service/tournament/tournament.d.ts +3 -1
- package/dist/cjs/src/service/tournament/tournament.js +2 -1
- package/dist/esm/src/data/models/tournament.d.ts +26 -1
- package/dist/esm/src/data/transformers/tournament.js +3 -1
- package/dist/esm/src/service/tournament/tournament.d.ts +3 -1
- package/dist/esm/src/service/tournament/tournament.js +2 -1
- package/package.json +1 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { Model, Optional } from 'sequelize';
|
|
3
|
-
import type { TeamId, TeamModel, TournamentMatchAttributes, TournamentMatchId, TournamentMatchModel } from '.';
|
|
3
|
+
import type { TeamId, TeamModel, TournamentMatchAttributes, TournamentMatchId, TournamentMatchModel, TournamentTeamsId } from '.';
|
|
4
|
+
import { TeamAttributes, TournamentTeamsModel } from '.';
|
|
4
5
|
export interface TournamentAttributes {
|
|
5
6
|
tournament_id: string;
|
|
6
7
|
iteration: number;
|
|
7
8
|
champion?: string;
|
|
8
9
|
tournamentMatches?: TournamentMatchAttributes[];
|
|
10
|
+
tournamentTeams?: TeamAttributes[];
|
|
9
11
|
}
|
|
10
12
|
export type TournamentPk = 'tournament_id';
|
|
11
13
|
export type TournamentId = TournamentModel[TournamentPk];
|
|
@@ -15,6 +17,8 @@ export declare class TournamentModel extends Model<TournamentAttributes, Tournam
|
|
|
15
17
|
tournament_id: string;
|
|
16
18
|
iteration: number;
|
|
17
19
|
champion?: string;
|
|
20
|
+
tournamentTeams: TeamModel[];
|
|
21
|
+
tournamentMatches: TournamentMatchModel[];
|
|
18
22
|
champion_Team: TeamModel;
|
|
19
23
|
getChampion_Team: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
|
|
20
24
|
setChampion_Team: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
|
|
@@ -30,5 +34,26 @@ export declare class TournamentModel extends Model<TournamentAttributes, Tournam
|
|
|
30
34
|
hasTournamentMatch: Sequelize.HasManyHasAssociationMixin<TournamentMatchModel, TournamentMatchId>;
|
|
31
35
|
hasTournamentMatches: Sequelize.HasManyHasAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
|
|
32
36
|
countTournamentMatches: Sequelize.HasManyCountAssociationsMixin;
|
|
37
|
+
TournamentTeams: TournamentTeamsModel[];
|
|
38
|
+
getTournamentTeams: Sequelize.HasManyGetAssociationsMixin<TournamentTeamsModel>;
|
|
39
|
+
setTournamentTeams: Sequelize.HasManySetAssociationsMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
40
|
+
addTournamentTeam: Sequelize.HasManyAddAssociationMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
41
|
+
addTournamentTeams: Sequelize.HasManyAddAssociationsMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
42
|
+
createTournamentTeam: Sequelize.HasManyCreateAssociationMixin<TournamentTeamsModel>;
|
|
43
|
+
removeTournamentTeam: Sequelize.HasManyRemoveAssociationMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
44
|
+
removeTournamentTeams: Sequelize.HasManyRemoveAssociationsMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
45
|
+
hasTournamentTeam: Sequelize.HasManyHasAssociationMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
46
|
+
hasTournamentTeams: Sequelize.HasManyHasAssociationsMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
47
|
+
countTournamentTeams: Sequelize.HasManyCountAssociationsMixin;
|
|
48
|
+
gettournamentTeams: Sequelize.BelongsToManyGetAssociationsMixin<TeamModel>;
|
|
49
|
+
settournamentTeams: Sequelize.BelongsToManySetAssociationsMixin<TeamModel, TeamId>;
|
|
50
|
+
addTeam_id_Team: Sequelize.BelongsToManyAddAssociationMixin<TeamModel, TeamId>;
|
|
51
|
+
addtournamentTeams: Sequelize.BelongsToManyAddAssociationsMixin<TeamModel, TeamId>;
|
|
52
|
+
createTeam_id_Team: Sequelize.BelongsToManyCreateAssociationMixin<TeamModel>;
|
|
53
|
+
removeTeam_id_Team: Sequelize.BelongsToManyRemoveAssociationMixin<TeamModel, TeamId>;
|
|
54
|
+
removetournamentTeams: Sequelize.BelongsToManyRemoveAssociationsMixin<TeamModel, TeamId>;
|
|
55
|
+
hasTeam_id_Team: Sequelize.BelongsToManyHasAssociationMixin<TeamModel, TeamId>;
|
|
56
|
+
hastournamentTeams: Sequelize.BelongsToManyHasAssociationsMixin<TeamModel, TeamId>;
|
|
57
|
+
counttournamentTeams: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
33
58
|
static initModel(sequelize: Sequelize.Sequelize): typeof TournamentModel;
|
|
34
59
|
}
|
|
@@ -10,6 +10,7 @@ function transformToAttributes(tournament) {
|
|
|
10
10
|
tournament_id: tournament.id,
|
|
11
11
|
iteration: tournament.iteration,
|
|
12
12
|
champion: tournament.champion != null ? tournament.champion.id : undefined,
|
|
13
|
+
tournamentTeams: tournament.teams != null ? tournament.teams.map(_1.transformFromTeam) : [],
|
|
13
14
|
tournamentMatches
|
|
14
15
|
};
|
|
15
16
|
}
|
|
@@ -19,6 +20,7 @@ function transformToObject(model) {
|
|
|
19
20
|
id: model.tournament_id,
|
|
20
21
|
iteration: model.iteration,
|
|
21
22
|
matches: model.TournamentMatches.map(_1.transformToTournamentMatch),
|
|
23
|
+
teams: model.tournamentTeams != null ? model.tournamentTeams.map(_1.transformToTeam) : [],
|
|
22
24
|
champion: model.champion_Team != null ? (0, _1.transformToTeam)(model.champion_Team) : undefined
|
|
23
25
|
});
|
|
24
26
|
}
|
|
@@ -4,13 +4,15 @@ export interface TournamentOpts {
|
|
|
4
4
|
readonly id: string;
|
|
5
5
|
readonly iteration: number;
|
|
6
6
|
readonly matches: TournamentMatch[];
|
|
7
|
+
readonly teams: Team[];
|
|
7
8
|
readonly champion?: Team;
|
|
8
9
|
}
|
|
9
10
|
export declare class Tournament {
|
|
10
11
|
readonly id: string;
|
|
11
12
|
readonly iteration: number;
|
|
12
13
|
readonly matches: TournamentMatch[];
|
|
14
|
+
readonly teams: Team[];
|
|
13
15
|
champion?: Team;
|
|
14
|
-
constructor({ id, iteration, matches, champion }: TournamentOpts);
|
|
16
|
+
constructor({ id, iteration, matches, teams, champion }: TournamentOpts);
|
|
15
17
|
static sortMatchesFn(m1: TournamentMatch, m2: TournamentMatch): number;
|
|
16
18
|
}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Tournament = void 0;
|
|
4
4
|
class Tournament {
|
|
5
|
-
constructor({ id, iteration, matches, champion }) {
|
|
5
|
+
constructor({ id, iteration, matches, teams, champion }) {
|
|
6
6
|
this.id = id;
|
|
7
7
|
this.iteration = iteration;
|
|
8
8
|
this.matches = matches;
|
|
9
|
+
this.teams = teams;
|
|
9
10
|
this.champion = champion;
|
|
10
11
|
this.matches.sort(Tournament.sortMatchesFn);
|
|
11
12
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { Model, Optional } from 'sequelize';
|
|
3
|
-
import type { TeamId, TeamModel, TournamentMatchAttributes, TournamentMatchId, TournamentMatchModel } from '.';
|
|
3
|
+
import type { TeamId, TeamModel, TournamentMatchAttributes, TournamentMatchId, TournamentMatchModel, TournamentTeamsId } from '.';
|
|
4
|
+
import { TeamAttributes, TournamentTeamsModel } from '.';
|
|
4
5
|
export interface TournamentAttributes {
|
|
5
6
|
tournament_id: string;
|
|
6
7
|
iteration: number;
|
|
7
8
|
champion?: string;
|
|
8
9
|
tournamentMatches?: TournamentMatchAttributes[];
|
|
10
|
+
tournamentTeams?: TeamAttributes[];
|
|
9
11
|
}
|
|
10
12
|
export type TournamentPk = 'tournament_id';
|
|
11
13
|
export type TournamentId = TournamentModel[TournamentPk];
|
|
@@ -15,6 +17,8 @@ export declare class TournamentModel extends Model<TournamentAttributes, Tournam
|
|
|
15
17
|
tournament_id: string;
|
|
16
18
|
iteration: number;
|
|
17
19
|
champion?: string;
|
|
20
|
+
tournamentTeams: TeamModel[];
|
|
21
|
+
tournamentMatches: TournamentMatchModel[];
|
|
18
22
|
champion_Team: TeamModel;
|
|
19
23
|
getChampion_Team: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
|
|
20
24
|
setChampion_Team: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
|
|
@@ -30,5 +34,26 @@ export declare class TournamentModel extends Model<TournamentAttributes, Tournam
|
|
|
30
34
|
hasTournamentMatch: Sequelize.HasManyHasAssociationMixin<TournamentMatchModel, TournamentMatchId>;
|
|
31
35
|
hasTournamentMatches: Sequelize.HasManyHasAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
|
|
32
36
|
countTournamentMatches: Sequelize.HasManyCountAssociationsMixin;
|
|
37
|
+
TournamentTeams: TournamentTeamsModel[];
|
|
38
|
+
getTournamentTeams: Sequelize.HasManyGetAssociationsMixin<TournamentTeamsModel>;
|
|
39
|
+
setTournamentTeams: Sequelize.HasManySetAssociationsMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
40
|
+
addTournamentTeam: Sequelize.HasManyAddAssociationMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
41
|
+
addTournamentTeams: Sequelize.HasManyAddAssociationsMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
42
|
+
createTournamentTeam: Sequelize.HasManyCreateAssociationMixin<TournamentTeamsModel>;
|
|
43
|
+
removeTournamentTeam: Sequelize.HasManyRemoveAssociationMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
44
|
+
removeTournamentTeams: Sequelize.HasManyRemoveAssociationsMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
45
|
+
hasTournamentTeam: Sequelize.HasManyHasAssociationMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
46
|
+
hasTournamentTeams: Sequelize.HasManyHasAssociationsMixin<TournamentTeamsModel, TournamentTeamsId>;
|
|
47
|
+
countTournamentTeams: Sequelize.HasManyCountAssociationsMixin;
|
|
48
|
+
gettournamentTeams: Sequelize.BelongsToManyGetAssociationsMixin<TeamModel>;
|
|
49
|
+
settournamentTeams: Sequelize.BelongsToManySetAssociationsMixin<TeamModel, TeamId>;
|
|
50
|
+
addTeam_id_Team: Sequelize.BelongsToManyAddAssociationMixin<TeamModel, TeamId>;
|
|
51
|
+
addtournamentTeams: Sequelize.BelongsToManyAddAssociationsMixin<TeamModel, TeamId>;
|
|
52
|
+
createTeam_id_Team: Sequelize.BelongsToManyCreateAssociationMixin<TeamModel>;
|
|
53
|
+
removeTeam_id_Team: Sequelize.BelongsToManyRemoveAssociationMixin<TeamModel, TeamId>;
|
|
54
|
+
removetournamentTeams: Sequelize.BelongsToManyRemoveAssociationsMixin<TeamModel, TeamId>;
|
|
55
|
+
hasTeam_id_Team: Sequelize.BelongsToManyHasAssociationMixin<TeamModel, TeamId>;
|
|
56
|
+
hastournamentTeams: Sequelize.BelongsToManyHasAssociationsMixin<TeamModel, TeamId>;
|
|
57
|
+
counttournamentTeams: Sequelize.BelongsToManyCountAssociationsMixin;
|
|
33
58
|
static initModel(sequelize: Sequelize.Sequelize): typeof TournamentModel;
|
|
34
59
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { transformFromTournamentMatch, transformToTeam, transformToTournamentMatch } from '.';
|
|
1
|
+
import { transformFromTeam, transformFromTournamentMatch, transformToTeam, transformToTournamentMatch } from '.';
|
|
2
2
|
import { Tournament } from '../../service';
|
|
3
3
|
function transformToAttributes(tournament) {
|
|
4
4
|
const tournamentMatches = tournament.matches != null ?
|
|
@@ -7,6 +7,7 @@ function transformToAttributes(tournament) {
|
|
|
7
7
|
tournament_id: tournament.id,
|
|
8
8
|
iteration: tournament.iteration,
|
|
9
9
|
champion: tournament.champion != null ? tournament.champion.id : undefined,
|
|
10
|
+
tournamentTeams: tournament.teams != null ? tournament.teams.map(transformFromTeam) : [],
|
|
10
11
|
tournamentMatches
|
|
11
12
|
};
|
|
12
13
|
}
|
|
@@ -15,6 +16,7 @@ function transformToObject(model) {
|
|
|
15
16
|
id: model.tournament_id,
|
|
16
17
|
iteration: model.iteration,
|
|
17
18
|
matches: model.TournamentMatches.map(transformToTournamentMatch),
|
|
19
|
+
teams: model.tournamentTeams != null ? model.tournamentTeams.map(transformToTeam) : [],
|
|
18
20
|
champion: model.champion_Team != null ? transformToTeam(model.champion_Team) : undefined
|
|
19
21
|
});
|
|
20
22
|
}
|
|
@@ -4,13 +4,15 @@ export interface TournamentOpts {
|
|
|
4
4
|
readonly id: string;
|
|
5
5
|
readonly iteration: number;
|
|
6
6
|
readonly matches: TournamentMatch[];
|
|
7
|
+
readonly teams: Team[];
|
|
7
8
|
readonly champion?: Team;
|
|
8
9
|
}
|
|
9
10
|
export declare class Tournament {
|
|
10
11
|
readonly id: string;
|
|
11
12
|
readonly iteration: number;
|
|
12
13
|
readonly matches: TournamentMatch[];
|
|
14
|
+
readonly teams: Team[];
|
|
13
15
|
champion?: Team;
|
|
14
|
-
constructor({ id, iteration, matches, champion }: TournamentOpts);
|
|
16
|
+
constructor({ id, iteration, matches, teams, champion }: TournamentOpts);
|
|
15
17
|
static sortMatchesFn(m1: TournamentMatch, m2: TournamentMatch): number;
|
|
16
18
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export class Tournament {
|
|
2
|
-
constructor({ id, iteration, matches, champion }) {
|
|
2
|
+
constructor({ id, iteration, matches, teams, champion }) {
|
|
3
3
|
this.id = id;
|
|
4
4
|
this.iteration = iteration;
|
|
5
5
|
this.matches = matches;
|
|
6
|
+
this.teams = teams;
|
|
6
7
|
this.champion = champion;
|
|
7
8
|
this.matches.sort(Tournament.sortMatchesFn);
|
|
8
9
|
}
|