@natrave/shared-entities 7.21.0 → 7.22.0
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-penalty-shootouts/tournament-penalty-shootout.entity.d.ts +2 -0
- package/dist/tournaments/tournament-penalty-shootouts/tournament-penalty-shootout.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-penalty-shootouts/tournament-penalty-shootout.entity.js +18 -1
- package/package.json +1 -1
package/dist/tournaments/tournament-penalty-shootouts/tournament-penalty-shootout.entity.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-penalty-shootout.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-penalty-shootouts/tournament-penalty-shootout.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tournament-penalty-shootout.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-penalty-shootouts/tournament-penalty-shootout.entity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,qBAca,yBAAyB;IAEpC,EAAE,EAAE,MAAM,CAAC;IAGX,OAAO,EAAE,MAAM,CAAC;IAIhB,KAAK,EAAE,eAAe,CAAC;IAGvB,YAAY,EAAE,MAAM,CAAC;IAIrB,UAAU,EAAE,cAAc,CAAC;IAQ3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAI3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAG1B,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;CACjB"}
|
|
@@ -9,6 +9,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
9
9
|
return result;
|
|
10
10
|
};
|
|
11
11
|
import {
|
|
12
|
+
Check,
|
|
12
13
|
Column,
|
|
13
14
|
CreateDateColumn,
|
|
14
15
|
Entity,
|
|
@@ -40,6 +41,12 @@ __decorateClass([
|
|
|
40
41
|
ManyToOne(() => TournamentTeam, { onDelete: "RESTRICT", nullable: false }),
|
|
41
42
|
JoinColumn({ name: "winner_team_id" })
|
|
42
43
|
], TournamentPenaltyShootout.prototype, "winnerTeam", 2);
|
|
44
|
+
__decorateClass([
|
|
45
|
+
Column("int", { name: "winner_score", nullable: true, default: null })
|
|
46
|
+
], TournamentPenaltyShootout.prototype, "winnerScore", 2);
|
|
47
|
+
__decorateClass([
|
|
48
|
+
Column("int", { name: "loser_score", nullable: true, default: null })
|
|
49
|
+
], TournamentPenaltyShootout.prototype, "loserScore", 2);
|
|
43
50
|
__decorateClass([
|
|
44
51
|
CreateDateColumn({ name: "created_at", type: "timestamptz" })
|
|
45
52
|
], TournamentPenaltyShootout.prototype, "createdAt", 2);
|
|
@@ -50,7 +57,17 @@ TournamentPenaltyShootout = __decorateClass([
|
|
|
50
57
|
Entity("tournament_penalty_shootouts"),
|
|
51
58
|
Index("idx_penalty_shootout_winner_team", ["winnerTeamId"]),
|
|
52
59
|
Index("UQ_penalty_shootout_match", ["matchId"], { unique: true }),
|
|
53
|
-
Index("idx_tournament_penalty_shootouts_standings", ["matchId", "winnerTeamId"])
|
|
60
|
+
Index("idx_tournament_penalty_shootouts_standings", ["matchId", "winnerTeamId"]),
|
|
61
|
+
Check(`
|
|
62
|
+
(
|
|
63
|
+
(winner_score IS NULL AND loser_score IS NULL)
|
|
64
|
+
OR
|
|
65
|
+
(winner_score IS NOT NULL AND loser_score IS NOT NULL AND winner_score > loser_score)
|
|
66
|
+
)
|
|
67
|
+
`),
|
|
68
|
+
Check(`
|
|
69
|
+
(winner_score IS NULL OR winner_score >= 0) AND (loser_score IS NULL OR loser_score >= 0)
|
|
70
|
+
`)
|
|
54
71
|
], TournamentPenaltyShootout);
|
|
55
72
|
export {
|
|
56
73
|
TournamentPenaltyShootout
|