@natrave/shared-entities 1.3.5 → 1.3.7
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 +3 -0
- package/dist/tournaments/tournament-brackets/tournament-bracket.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-brackets/tournament-bracket.entity.js +12 -1
- package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts +5 -1
- package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-matches/tournament-match.entity.js +19 -1
- package/package.json +5 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ITournamentBracket, KnockoutPhase } from '@natrave/tournaments-service-types';
|
|
2
|
+
import { TournamentMatch } from '../tournament-matches';
|
|
2
3
|
import { Tournament } from '../tournaments';
|
|
3
4
|
export declare class TournamentBracket implements ITournamentBracket {
|
|
4
5
|
id: number;
|
|
@@ -12,5 +13,7 @@ export declare class TournamentBracket implements ITournamentBracket {
|
|
|
12
13
|
tournament: Tournament;
|
|
13
14
|
parent?: TournamentBracket;
|
|
14
15
|
children: TournamentBracket[];
|
|
16
|
+
firstLegMatch?: TournamentMatch | null;
|
|
17
|
+
secondLegMatch?: TournamentMatch | null;
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=tournament-bracket.entity.d.ts.map
|
|
@@ -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,kBAAkB,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"tournament-bracket.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-brackets/tournament-bracket.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAavF,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAqB5C,qBAEa,iBAAkB,YAAW,kBAAkB;IAE1D,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,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAOzB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAOhB,UAAU,EAAE,UAAU,CAAC;IAQvB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAI3B,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAI9B,aAAa,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAIvC,cAAc,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CACzC"}
|
|
@@ -13,12 +13,14 @@ import {
|
|
|
13
13
|
Column,
|
|
14
14
|
CreateDateColumn,
|
|
15
15
|
Entity,
|
|
16
|
+
Index,
|
|
16
17
|
JoinColumn,
|
|
17
18
|
ManyToOne,
|
|
18
19
|
OneToMany,
|
|
19
20
|
PrimaryGeneratedColumn,
|
|
20
21
|
UpdateDateColumn
|
|
21
22
|
} from "typeorm";
|
|
23
|
+
import { TournamentMatch } from "../tournament-matches/index.js";
|
|
22
24
|
import { Tournament } from "../tournaments/index.js";
|
|
23
25
|
let TournamentBracket = class {
|
|
24
26
|
};
|
|
@@ -81,8 +83,17 @@ __decorateClass([
|
|
|
81
83
|
__decorateClass([
|
|
82
84
|
OneToMany(() => TournamentBracket, (bracket) => bracket.parent)
|
|
83
85
|
], TournamentBracket.prototype, "children", 2);
|
|
86
|
+
__decorateClass([
|
|
87
|
+
ManyToOne(() => TournamentMatch, { nullable: true, onDelete: "SET NULL" }),
|
|
88
|
+
JoinColumn({ name: "first_leg_match_id" })
|
|
89
|
+
], TournamentBracket.prototype, "firstLegMatch", 2);
|
|
90
|
+
__decorateClass([
|
|
91
|
+
ManyToOne(() => TournamentMatch, { nullable: true, onDelete: "SET NULL" }),
|
|
92
|
+
JoinColumn({ name: "second_leg_match_id" })
|
|
93
|
+
], TournamentBracket.prototype, "secondLegMatch", 2);
|
|
84
94
|
TournamentBracket = __decorateClass([
|
|
85
|
-
Entity("tournament_brackets")
|
|
95
|
+
Entity("tournament_brackets"),
|
|
96
|
+
Index(["tournamentId", "knockoutPhase"])
|
|
86
97
|
], TournamentBracket);
|
|
87
98
|
export {
|
|
88
99
|
TournamentBracket
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ITournamentMatch, TournamentMatchPhase } from '@natrave/tournaments-service-types';
|
|
1
|
+
import { ITournamentMatch, MatchStatus, TournamentMatchPhase } from '@natrave/tournaments-service-types';
|
|
2
|
+
import { TournamentBracket } from '../tournament-brackets';
|
|
2
3
|
import { TournamentFacility } from '../tournament-facilities';
|
|
3
4
|
import { TournamentMatchCard } from '../tournament-match-cards';
|
|
4
5
|
import { TournamentMatchGoal } from '../tournament-match-goals';
|
|
@@ -13,6 +14,7 @@ export declare class TournamentMatch implements ITournamentMatch {
|
|
|
13
14
|
matchDate: string | null;
|
|
14
15
|
leg: number;
|
|
15
16
|
time: string | null;
|
|
17
|
+
status: MatchStatus;
|
|
16
18
|
phase: TournamentMatchPhase;
|
|
17
19
|
roundIndicator: number;
|
|
18
20
|
createdAt: Date;
|
|
@@ -23,5 +25,7 @@ export declare class TournamentMatch implements ITournamentMatch {
|
|
|
23
25
|
awayTeam: TournamentTeam;
|
|
24
26
|
goals: TournamentMatchGoal[];
|
|
25
27
|
cards: TournamentMatchCard[];
|
|
28
|
+
firstLegBrackets: TournamentBracket[];
|
|
29
|
+
secondLegBrackets: TournamentBracket[];
|
|
26
30
|
}
|
|
27
31
|
//# sourceMappingURL=tournament-match.entity.d.ts.map
|
|
@@ -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,
|
|
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;AAa5C,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,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAO5C,qBAKa,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,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAM9B,UAAU,EAAE,UAAU,CAAC;IAMvB,QAAQ,EAAE,cAAc,CAAC;IAMzB,QAAQ,EAAE,cAAc,CAAC;IAGzB,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAG7B,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAG7B,gBAAgB,EAAE,iBAAiB,EAAE,CAAC;IAGtC,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;CACxC"}
|
|
@@ -8,7 +8,10 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
8
8
|
if (kind && result) __defProp(target, key, result);
|
|
9
9
|
return result;
|
|
10
10
|
};
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
MatchStatus,
|
|
13
|
+
TournamentMatchPhase
|
|
14
|
+
} from "@natrave/tournaments-service-types";
|
|
12
15
|
import {
|
|
13
16
|
Column,
|
|
14
17
|
CreateDateColumn,
|
|
@@ -20,6 +23,7 @@ import {
|
|
|
20
23
|
PrimaryGeneratedColumn,
|
|
21
24
|
UpdateDateColumn
|
|
22
25
|
} from "typeorm";
|
|
26
|
+
import { TournamentBracket } from "../tournament-brackets/index.js";
|
|
23
27
|
import { TournamentFacility } from "../tournament-facilities/index.js";
|
|
24
28
|
import { TournamentMatchCard } from "../tournament-match-cards/index.js";
|
|
25
29
|
import { TournamentMatchGoal } from "../tournament-match-goals/index.js";
|
|
@@ -90,6 +94,14 @@ __decorateClass([
|
|
|
90
94
|
comment: "Hor\xE1rio previsto para o in\xEDcio da partida (HH:MM:SS)."
|
|
91
95
|
})
|
|
92
96
|
], TournamentMatch.prototype, "time", 2);
|
|
97
|
+
__decorateClass([
|
|
98
|
+
Column({
|
|
99
|
+
type: "enum",
|
|
100
|
+
enum: MatchStatus,
|
|
101
|
+
default: MatchStatus.SCHEDULED,
|
|
102
|
+
comment: "Situa\xE7\xE3o da partida."
|
|
103
|
+
})
|
|
104
|
+
], TournamentMatch.prototype, "status", 2);
|
|
93
105
|
__decorateClass([
|
|
94
106
|
Column({
|
|
95
107
|
type: "enum",
|
|
@@ -149,6 +161,12 @@ __decorateClass([
|
|
|
149
161
|
__decorateClass([
|
|
150
162
|
OneToMany(() => TournamentMatchCard, (card) => card.match)
|
|
151
163
|
], TournamentMatch.prototype, "cards", 2);
|
|
164
|
+
__decorateClass([
|
|
165
|
+
OneToMany(() => TournamentBracket, (bracket) => bracket.firstLegMatch)
|
|
166
|
+
], TournamentMatch.prototype, "firstLegBrackets", 2);
|
|
167
|
+
__decorateClass([
|
|
168
|
+
OneToMany(() => TournamentBracket, (bracket) => bracket.secondLegMatch)
|
|
169
|
+
], TournamentMatch.prototype, "secondLegBrackets", 2);
|
|
152
170
|
TournamentMatch = __decorateClass([
|
|
153
171
|
Index("idx_tournament_phase_round", ["tournamentId", "phase", "roundIndicator"]),
|
|
154
172
|
Index("idx_tournament_id", ["tournamentId"]),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@natrave/shared-entities",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"description": "Entidades compartilhadass da NaTrave",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@changesets/cli": "^2.29.4",
|
|
29
29
|
"@eslint/js": "^9.29.0",
|
|
30
|
-
"@typescript-eslint/eslint-plugin": "^8.34.
|
|
31
|
-
"@typescript-eslint/parser": "^8.34.
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
|
31
|
+
"@typescript-eslint/parser": "^8.34.1",
|
|
32
32
|
"esbuild": "^0.25.5",
|
|
33
33
|
"eslint": "^9.29.0",
|
|
34
34
|
"eslint-config-prettier": "^10.1.5",
|
|
35
35
|
"eslint-import-resolver-typescript": "^4.4.3",
|
|
36
36
|
"eslint-plugin-import": "^2.31.0",
|
|
37
|
-
"eslint-plugin-prettier": "^5.
|
|
37
|
+
"eslint-plugin-prettier": "^5.5.0",
|
|
38
38
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
39
39
|
"glob": "^11.0.3",
|
|
40
40
|
"husky": "^9.1.7",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@natrave/auth-service-types": "^1.1.63",
|
|
47
47
|
"@natrave/facility-service-types": "^0.0.9",
|
|
48
48
|
"@natrave/notification-service-types": "^1.1.65",
|
|
49
|
-
"@natrave/tournaments-service-types": "^1.2.
|
|
49
|
+
"@natrave/tournaments-service-types": "^1.2.18",
|
|
50
50
|
"reflect-metadata": "^0.2.2",
|
|
51
51
|
"typeorm": "^0.3.24"
|
|
52
52
|
},
|