@natrave/shared-entities 1.4.48 → 1.4.50
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/tournaments/tournament-brackets/tournament-bracket.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-brackets/tournament-bracket.entity.js +4 -1
- package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.js +7 -1
- package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.js +7 -1
- package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts +4 -0
- package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-matches/tournament-match.entity.js +49 -0
- package/dist/tournaments/tournament-teams/tournament-team.entity.d.ts +1 -0
- package/dist/tournaments/tournament-teams/tournament-team.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-teams/tournament-team.entity.js +10 -1
- package/dist/tournaments/tournaments/tournament.entity.d.ts.map +1 -1
- package/dist/tournaments/tournaments/tournament.entity.js +6 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-bracket.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-brackets/tournament-bracket.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAanE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAsB5C,
|
|
1
|
+
{"version":3,"file":"tournament-bracket.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-brackets/tournament-bracket.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAanE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAsB5C,qBASa,iBAAiB;IAE5B,EAAE,EAAE,MAAM,CAAC;IAOX,YAAY,EAAE,MAAM,CAAC;IAOrB,aAAa,EAAE,aAAa,CAAC;IAG7B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGhC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQjC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAOxB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAOhB,UAAU,EAAE,UAAU,CAAC;IAQvB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAI1B,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAI7B,aAAa,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAIvC,cAAc,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CACzC"}
|
|
@@ -97,7 +97,10 @@ TournamentBracket = __decorateClass([
|
|
|
97
97
|
Index("IDX_tournament_bracket_first_leg_match_id", ["firstLegMatchId"]),
|
|
98
98
|
Index("IDX_tournament_bracket_second_leg_match_id", ["secondLegMatchId"]),
|
|
99
99
|
Index("IDX_tournament_brackets_standings", ["tournamentId", "knockoutPhase"]),
|
|
100
|
-
Index("IDX_tournament_brackets_matches", ["firstLegMatchId", "secondLegMatchId"])
|
|
100
|
+
Index("IDX_tournament_brackets_matches", ["firstLegMatchId", "secondLegMatchId"]),
|
|
101
|
+
Index("idx_tournament_brackets_with_matches", ["tournamentId", "knockoutPhase"], {
|
|
102
|
+
where: '"first_leg_match_id" IS NOT NULL OR "second_leg_match_id" IS NOT NULL'
|
|
103
|
+
})
|
|
101
104
|
], TournamentBracket);
|
|
102
105
|
export {
|
|
103
106
|
TournamentBracket
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-match-card.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-match-cards/tournament-match-card.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,KAAK,oBAAoB,EAC1B,MAAM,oCAAoC,CAAC;AAa5C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAarD,
|
|
1
|
+
{"version":3,"file":"tournament-match-card.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-match-cards/tournament-match-card.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,KAAK,oBAAoB,EAC1B,MAAM,oCAAoC,CAAC;AAa5C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAarD,qBAca,mBAAoB,YAAW,oBAAoB;IAI9D,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,MAAM,CAAC,EAAE,WAAW,CAAC;IAOrB,QAAQ,EAAE,MAAM,CAAC;IAOjB,MAAM,EAAE,MAAM,CAAC;IAOf,OAAO,EAAE,MAAM,CAAC;IAOhB,QAAQ,EAAE,QAAQ,CAAC;IAQnB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAOvB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,IAAI,EAAE,cAAc,CAAC;IAOrB,KAAK,EAAE,eAAe,CAAC;IAOvB,MAAM,EAAE,gBAAgB,CAAC;CAC1B"}
|
|
@@ -116,7 +116,13 @@ TournamentMatchCard = __decorateClass([
|
|
|
116
116
|
Index(["teamId"]),
|
|
117
117
|
Index(["playerId"]),
|
|
118
118
|
Index("IDX_tournament_match_cards_standings", ["matchId", "teamId", "deletedAt"]),
|
|
119
|
-
Index("IDX_tournament_match_cards_player", ["playerId", "deletedAt"])
|
|
119
|
+
Index("IDX_tournament_match_cards_player", ["playerId", "deletedAt"]),
|
|
120
|
+
Index("idx_tournament_cards_active_only", ["matchId", "teamId"], {
|
|
121
|
+
where: '"deleted_at" IS NULL'
|
|
122
|
+
}),
|
|
123
|
+
Index("idx_tournament_cards_red_only", ["matchId", "teamId"], {
|
|
124
|
+
where: `"cardType" = 'red'`
|
|
125
|
+
})
|
|
120
126
|
], TournamentMatchCard);
|
|
121
127
|
export {
|
|
122
128
|
TournamentMatchCard
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-match-goal.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-match-goals/tournament-match-goal.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAavF,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAOrD,
|
|
1
|
+
{"version":3,"file":"tournament-match-goal.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-match-goals/tournament-match-goal.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAavF,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAOrD,qBAaa,mBAAoB,YAAW,oBAAoB;IAI9D,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,EAAE,MAAM,CAAC;IAOf,OAAO,EAAE,MAAM,CAAC;IAOhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,MAAM,CAAC,EAAE,WAAW,CAAC;IAQrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,OAAO,EAAE,OAAO,CAAC;IAQjB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAOvB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAMhB,IAAI,CAAC,EAAE,cAAc,CAAC;IAItB,KAAK,CAAC,EAAE,eAAe,CAAC;IAIxB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAI1B,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B"}
|
|
@@ -127,7 +127,13 @@ TournamentMatchGoal = __decorateClass([
|
|
|
127
127
|
Index(["matchId"]),
|
|
128
128
|
Index("IDX_tournament_match_goals_standings", ["matchId", "teamId", "deletedAt"]),
|
|
129
129
|
Index("IDX_tournament_match_goals_team", ["teamId", "deletedAt"]),
|
|
130
|
-
Index("IDX_tournament_match_goals_match", ["matchId", "deletedAt"])
|
|
130
|
+
Index("IDX_tournament_match_goals_match", ["matchId", "deletedAt"]),
|
|
131
|
+
Index("idx_tournament_goals_active_only", ["matchId", "teamId"], {
|
|
132
|
+
where: '"deleted_at" IS NULL'
|
|
133
|
+
}),
|
|
134
|
+
Index("idx_tournament_goals_normal_only", ["matchId", "teamId"], {
|
|
135
|
+
where: '"own_goal" = false'
|
|
136
|
+
})
|
|
131
137
|
], TournamentMatchGoal);
|
|
132
138
|
export {
|
|
133
139
|
TournamentMatchGoal
|
|
@@ -20,10 +20,14 @@ export declare class TournamentMatch implements ITournamentMatch {
|
|
|
20
20
|
roundIndicator: number;
|
|
21
21
|
createdAt: Date;
|
|
22
22
|
updatedAt: Date;
|
|
23
|
+
forfeitedByTeamId: number | null;
|
|
24
|
+
adjudicatedAt: Date | null;
|
|
25
|
+
walkoverReason: string | null;
|
|
23
26
|
facility?: TournamentFacility;
|
|
24
27
|
tournament: Tournament;
|
|
25
28
|
homeTeam: TournamentTeam;
|
|
26
29
|
awayTeam: TournamentTeam;
|
|
30
|
+
forfeitedByTeam?: TournamentTeam;
|
|
27
31
|
goals: TournamentMatchGoal[];
|
|
28
32
|
cards: TournamentMatchCard[];
|
|
29
33
|
firstLegBrackets: TournamentBracket[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-match.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches/tournament-match.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"tournament-match.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches/tournament-match.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAe5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,qBAsCa,eAAgB,YAAW,gBAAgB;IAItD,EAAE,EAAE,MAAM,CAAC;IAOX,YAAY,EAAE,MAAM,CAAC;IAQrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,UAAU,CAAC,EAAE,MAAM,CAAC;IASpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAQzB,GAAG,EAAE,MAAM,CAAC;IASZ,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAQpB,MAAM,EAAE,WAAW,CAAC;IAOpB,KAAK,EAAE,oBAAoB,CAAC;IAQ5B,cAAc,EAAE,MAAM,CAAC;IAOvB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAGjC,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;IAG3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ9B,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAM9B,UAAU,EAAE,UAAU,CAAC;IAMvB,QAAQ,EAAE,cAAc,CAAC;IAMzB,QAAQ,EAAE,cAAc,CAAC;IAIzB,eAAe,CAAC,EAAE,cAAc,CAAC;IAGjC,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAG7B,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAG7B,gBAAgB,EAAE,iBAAiB,EAAE,CAAC;IAGtC,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IAGvC,eAAe,EAAE,yBAAyB,CAAC;CAC5C"}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
TournamentMatchPhase
|
|
14
14
|
} from "@natrave/tournaments-service-types";
|
|
15
15
|
import {
|
|
16
|
+
Check,
|
|
16
17
|
Column,
|
|
17
18
|
CreateDateColumn,
|
|
18
19
|
Entity,
|
|
@@ -133,6 +134,20 @@ __decorateClass([
|
|
|
133
134
|
comment: "Data da \xFAltima atualiza\xE7\xE3o do registro da partida."
|
|
134
135
|
})
|
|
135
136
|
], TournamentMatch.prototype, "updatedAt", 2);
|
|
137
|
+
__decorateClass([
|
|
138
|
+
Column({
|
|
139
|
+
name: "forfeited_by_team_id",
|
|
140
|
+
type: "int",
|
|
141
|
+
nullable: true,
|
|
142
|
+
comment: "Time que perdeu por WO (forfeit)."
|
|
143
|
+
})
|
|
144
|
+
], TournamentMatch.prototype, "forfeitedByTeamId", 2);
|
|
145
|
+
__decorateClass([
|
|
146
|
+
Column({ name: "adjudicated_at", type: "timestamptz", nullable: true })
|
|
147
|
+
], TournamentMatch.prototype, "adjudicatedAt", 2);
|
|
148
|
+
__decorateClass([
|
|
149
|
+
Column({ name: "walkover_reason", type: "text", nullable: true })
|
|
150
|
+
], TournamentMatch.prototype, "walkoverReason", 2);
|
|
136
151
|
__decorateClass([
|
|
137
152
|
ManyToOne(() => TournamentFacility, (facility) => facility.matches, {
|
|
138
153
|
onDelete: "SET NULL"
|
|
@@ -157,6 +172,10 @@ __decorateClass([
|
|
|
157
172
|
}),
|
|
158
173
|
JoinColumn({ name: "away_team_id" })
|
|
159
174
|
], TournamentMatch.prototype, "awayTeam", 2);
|
|
175
|
+
__decorateClass([
|
|
176
|
+
ManyToOne(() => TournamentTeam, (team) => team.forfeitedMatches, { onDelete: "SET NULL" }),
|
|
177
|
+
JoinColumn({ name: "forfeited_by_team_id" })
|
|
178
|
+
], TournamentMatch.prototype, "forfeitedByTeam", 2);
|
|
160
179
|
__decorateClass([
|
|
161
180
|
OneToMany(() => TournamentMatchGoal, (goal) => goal.match)
|
|
162
181
|
], TournamentMatch.prototype, "goals", 2);
|
|
@@ -180,6 +199,36 @@ TournamentMatch = __decorateClass([
|
|
|
180
199
|
Index("idx_tournament_matches_completed", ["tournamentId", "status"]),
|
|
181
200
|
Index("idx_tournament_matches_phase_round", ["tournamentId", "phase", "roundIndicator"]),
|
|
182
201
|
Index("idx_tournament_matches_teams", ["tournamentId", "homeTeamId", "awayTeamId"]),
|
|
202
|
+
Index("idx_tournament_matches_completed_only", ["tournamentId", "phase"], {
|
|
203
|
+
where: `"status" = 'COMPLETED'`
|
|
204
|
+
}),
|
|
205
|
+
Index("idx_tournament_matches_group_stage_only", ["tournamentId", "roundIndicator"], {
|
|
206
|
+
where: `"phase" = 'group_stage'`
|
|
207
|
+
}),
|
|
208
|
+
Index(
|
|
209
|
+
"idx_tournament_matches_walkover_only",
|
|
210
|
+
["tournamentId", "phase", "roundIndicator", "forfeitedByTeamId"],
|
|
211
|
+
{
|
|
212
|
+
where: `"status" = 'WALKOVER'`
|
|
213
|
+
}
|
|
214
|
+
),
|
|
215
|
+
Index("idx_tournament_matches_forfeited_by_team", ["tournamentId", "forfeitedByTeamId"], {
|
|
216
|
+
where: `"status" = 'WALKOVER'`
|
|
217
|
+
}),
|
|
218
|
+
Check(`
|
|
219
|
+
(
|
|
220
|
+
(status = 'WALKOVER' AND forfeited_by_team_id IS NOT NULL)
|
|
221
|
+
OR
|
|
222
|
+
(status <> 'WALKOVER' AND forfeited_by_team_id IS NULL)
|
|
223
|
+
)
|
|
224
|
+
`),
|
|
225
|
+
Check(`
|
|
226
|
+
CASE
|
|
227
|
+
WHEN status = 'WALKOVER' AND forfeited_by_team_id IS NOT NULL
|
|
228
|
+
THEN (forfeited_by_team_id = home_team_id OR forfeited_by_team_id = away_team_id)
|
|
229
|
+
ELSE TRUE
|
|
230
|
+
END
|
|
231
|
+
`),
|
|
183
232
|
Entity("tournament_matches")
|
|
184
233
|
], TournamentMatch);
|
|
185
234
|
export {
|
|
@@ -21,6 +21,7 @@ export declare class TournamentTeam {
|
|
|
21
21
|
players: TournamentPlayer[];
|
|
22
22
|
homeMatches: TournamentMatch[];
|
|
23
23
|
awayMatches: TournamentMatch[];
|
|
24
|
+
forfeitedMatches: TournamentMatch[];
|
|
24
25
|
goals: TournamentMatchGoal[];
|
|
25
26
|
cards: TournamentMatchCard[];
|
|
26
27
|
wonShootouts: TournamentPenaltyShootout[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-team.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-teams/tournament-team.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAa1E,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,
|
|
1
|
+
{"version":3,"file":"tournament-team.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-teams/tournament-team.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAa1E,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,qBAgBa,cAAc;IAEzB,EAAE,EAAE,MAAM,CAAC;IAGX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtB,YAAY,EAAE,MAAM,CAAC;IAGrB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAOxB,MAAM,EAAE,oBAAoB,CAAC;IAG7B,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAKhB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAInB,UAAU,EAAE,UAAU,CAAC;IAIvB,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAGzC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAG5B,WAAW,EAAE,eAAe,EAAE,CAAC;IAG/B,WAAW,EAAE,eAAe,EAAE,CAAC;IAG/B,gBAAgB,EAAE,eAAe,EAAE,CAAC;IAGpC,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAG7B,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAG7B,YAAY,EAAE,yBAAyB,EAAE,CAAC;CAC3C"}
|
|
@@ -76,6 +76,9 @@ __decorateClass([
|
|
|
76
76
|
__decorateClass([
|
|
77
77
|
OneToMany(() => TournamentMatch, (m) => m.awayTeam)
|
|
78
78
|
], TournamentTeam.prototype, "awayMatches", 2);
|
|
79
|
+
__decorateClass([
|
|
80
|
+
OneToMany(() => TournamentMatch, (m) => m.forfeitedByTeam)
|
|
81
|
+
], TournamentTeam.prototype, "forfeitedMatches", 2);
|
|
79
82
|
__decorateClass([
|
|
80
83
|
OneToMany(() => TournamentMatchGoal, (g) => g.team)
|
|
81
84
|
], TournamentTeam.prototype, "goals", 2);
|
|
@@ -95,7 +98,13 @@ TournamentTeam = __decorateClass([
|
|
|
95
98
|
Index("IDX_tournament_team_team_id", ["teamId"]),
|
|
96
99
|
Index("IDX_tournament_teams_standings", ["tournamentId", "groupId", "status"]),
|
|
97
100
|
Index("IDX_tournament_teams_group", ["tournamentId", "groupId"]),
|
|
98
|
-
Index("IDX_tournament_teams_status", ["tournamentId", "status"])
|
|
101
|
+
Index("IDX_tournament_teams_status", ["tournamentId", "status"]),
|
|
102
|
+
Index("idx_tournament_teams_registered_only", ["tournamentId", "groupId"], {
|
|
103
|
+
where: `"status" = 'registered'`
|
|
104
|
+
}),
|
|
105
|
+
Index("idx_tournament_teams_with_group", ["tournamentId", "groupId"], {
|
|
106
|
+
where: '"group_id" IS NOT NULL'
|
|
107
|
+
})
|
|
99
108
|
], TournamentTeam);
|
|
100
109
|
export {
|
|
101
110
|
TournamentTeam
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournaments/tournament.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC5B,MAAM,oCAAoC,CAAC;AAgB5C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAWrD,
|
|
1
|
+
{"version":3,"file":"tournament.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournaments/tournament.entity.ts"],"names":[],"mappings":"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"}
|
|
@@ -281,6 +281,12 @@ Tournament = __decorateClass([
|
|
|
281
281
|
Index("idx_tournaments_deleted_at", ["deletedAt"]),
|
|
282
282
|
Index("idx_tournaments_org_status_active", ["organizationId", "publicationStatus", "deletedAt"]),
|
|
283
283
|
Index("idx_tournaments_standings_active", ["id", "deletedAt"]),
|
|
284
|
+
Index("idx_tournaments_active_only", ["id"], {
|
|
285
|
+
where: '"deleted_at" IS NULL'
|
|
286
|
+
}),
|
|
287
|
+
Index("idx_tournaments_published_only", ["id"], {
|
|
288
|
+
where: `"publication_status" = 'published'`
|
|
289
|
+
}),
|
|
284
290
|
Check("CHK_TOURNAMENT_END_DATE", '"end_date" >= "initial_date"'),
|
|
285
291
|
Check("CHK_TOURNAMENT_REGISTRATION_DEADLINE", '"registration_deadline" <= "initial_date"')
|
|
286
292
|
], Tournament);
|