@natrave/shared-entities 1.2.56 → 1.2.57
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/facilities/fields/field.entity.d.ts +0 -2
- package/dist/facilities/fields/field.entity.d.ts.map +1 -1
- package/dist/facilities/fields/field.entity.js +0 -4
- package/dist/tournaments/tournament-facilities/tournament-facility.entity.d.ts +2 -0
- package/dist/tournaments/tournament-facilities/tournament-facility.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-facilities/tournament-facility.entity.js +5 -0
- package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts +5 -4
- package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-matches/tournament-match.entity.js +25 -8
- package/dist/tournaments/tournament-matches-availability/tournament-match-availability.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-matches-availability/tournament-match-availability.entity.js +3 -1
- package/package.json +8 -8
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TournamentMatch } from '../../tournaments';
|
|
2
1
|
import { Facility } from '../facilities';
|
|
3
2
|
import { FieldImage } from '../field-images/field-image.entity';
|
|
4
3
|
import { FieldSurfaceType } from './enums/surface-type.enum';
|
|
@@ -14,7 +13,6 @@ export declare class Field {
|
|
|
14
13
|
width: number;
|
|
15
14
|
isIndoor: boolean;
|
|
16
15
|
recommendedPlayersPerTeam: number;
|
|
17
|
-
tournamentMatches: TournamentMatch[];
|
|
18
16
|
images: FieldImage[];
|
|
19
17
|
}
|
|
20
18
|
//# sourceMappingURL=field.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/fields/field.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"field.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/fields/field.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAY7D,qBAEa,KAAK;IAIhB,EAAE,EAAE,MAAM,CAAC;IAOX,UAAU,EAAE,MAAM,CAAC;IAMnB,QAAQ,EAAE,QAAQ,CAAC;IAOnB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAOhB,IAAI,EAAE,MAAM,CAAC;IAQb,WAAW,EAAE,gBAAgB,CAAC;IAQ9B,MAAM,EAAE,MAAM,CAAC;IAQf,KAAK,EAAE,MAAM,CAAC;IAQd,QAAQ,EAAE,OAAO,CAAC;IAOlB,yBAAyB,EAAE,MAAM,CAAC;IAQlC,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB"}
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
Unique,
|
|
20
20
|
UpdateDateColumn
|
|
21
21
|
} from "typeorm";
|
|
22
|
-
import { TournamentMatch } from "../../tournaments/index.js";
|
|
23
22
|
import { Facility } from "../facilities/index.js";
|
|
24
23
|
import { FieldImage } from "../field-images/field-image.entity.js";
|
|
25
24
|
import { FieldSurfaceType } from "./enums/surface-type.enum.js";
|
|
@@ -103,9 +102,6 @@ __decorateClass([
|
|
|
103
102
|
comment: "N\xFAmero recomendado de jogadores por time para este campo."
|
|
104
103
|
})
|
|
105
104
|
], Field.prototype, "recommendedPlayersPerTeam", 2);
|
|
106
|
-
__decorateClass([
|
|
107
|
-
OneToMany(() => TournamentMatch, (tournamentMatch) => tournamentMatch.field)
|
|
108
|
-
], Field.prototype, "tournamentMatches", 2);
|
|
109
105
|
__decorateClass([
|
|
110
106
|
OneToMany(() => FieldImage, (fieldImage) => fieldImage.field)
|
|
111
107
|
], Field.prototype, "images", 2);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ITournamentFacility } from '@natrave/tournaments-service-types';
|
|
2
2
|
import { Facility } from '../../facilities';
|
|
3
|
+
import { TournamentMatch } from '../tournament-matches';
|
|
3
4
|
import { Tournament } from '../tournaments';
|
|
4
5
|
export declare class TournamentFacility implements ITournamentFacility {
|
|
5
6
|
id: number;
|
|
@@ -9,5 +10,6 @@ export declare class TournamentFacility implements ITournamentFacility {
|
|
|
9
10
|
updatedAt: Date;
|
|
10
11
|
tournament: Tournament;
|
|
11
12
|
facility: Facility;
|
|
13
|
+
matches: TournamentMatch[];
|
|
12
14
|
}
|
|
13
15
|
//# sourceMappingURL=tournament-facility.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-facility.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-facilities/tournament-facility.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"tournament-facility.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-facilities/tournament-facility.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAczE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,qBAGa,kBAAmB,YAAW,mBAAmB;IAI5D,EAAE,EAAE,MAAM,CAAC;IAOX,UAAU,EAAE,MAAM,CAAC;IAOnB,YAAY,EAAE,MAAM,CAAC;IAOrB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,UAAU,EAAE,UAAU,CAAC;IAOvB,QAAQ,EAAE,QAAQ,CAAC;IAMnB,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B"}
|
|
@@ -15,11 +15,13 @@ import {
|
|
|
15
15
|
Index,
|
|
16
16
|
JoinColumn,
|
|
17
17
|
ManyToOne,
|
|
18
|
+
OneToMany,
|
|
18
19
|
PrimaryGeneratedColumn,
|
|
19
20
|
Unique,
|
|
20
21
|
UpdateDateColumn
|
|
21
22
|
} from "typeorm";
|
|
22
23
|
import { Facility } from "../../facilities/index.js";
|
|
24
|
+
import { TournamentMatch } from "../tournament-matches/index.js";
|
|
23
25
|
import { Tournament } from "../tournaments/index.js";
|
|
24
26
|
let TournamentFacility = class {
|
|
25
27
|
};
|
|
@@ -70,6 +72,9 @@ __decorateClass([
|
|
|
70
72
|
}),
|
|
71
73
|
JoinColumn({ name: "facility_id" })
|
|
72
74
|
], TournamentFacility.prototype, "facility", 2);
|
|
75
|
+
__decorateClass([
|
|
76
|
+
OneToMany(() => TournamentMatch, (tournamentMatch) => tournamentMatch.facility)
|
|
77
|
+
], TournamentFacility.prototype, "matches", 2);
|
|
73
78
|
TournamentFacility = __decorateClass([
|
|
74
79
|
Entity("tournament_facilities"),
|
|
75
80
|
Unique("tournament_facility_unique", ["tournamentId", "facilityId"]),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ITournamentMatch, TournamentMatchPhase } from '@natrave/tournaments-service-types';
|
|
2
|
-
import {
|
|
1
|
+
import { DayPeriod, ITournamentMatch, TournamentMatchPhase } from '@natrave/tournaments-service-types';
|
|
2
|
+
import { TournamentFacility } from '../tournament-facilities';
|
|
3
3
|
import { TournamentMatchCard } from '../tournament-match-cards';
|
|
4
4
|
import { TournamentMatchGoal } from '../tournament-match-goals';
|
|
5
5
|
import { TournamentTeam } from '../tournament-teams';
|
|
@@ -9,13 +9,14 @@ export declare class TournamentMatch implements ITournamentMatch {
|
|
|
9
9
|
tournamentId: number;
|
|
10
10
|
homeTeamId: number | null;
|
|
11
11
|
awayTeamId: number | null;
|
|
12
|
-
|
|
12
|
+
facilityId?: number;
|
|
13
13
|
matchDate: Date | null;
|
|
14
|
+
period: DayPeriod;
|
|
14
15
|
phase: TournamentMatchPhase;
|
|
15
16
|
roundIndicator: number;
|
|
16
17
|
createdAt: Date;
|
|
17
18
|
updatedAt: Date;
|
|
18
|
-
|
|
19
|
+
facility?: TournamentFacility;
|
|
19
20
|
tournament: Tournament;
|
|
20
21
|
homeTeam: TournamentTeam;
|
|
21
22
|
awayTeam: TournamentTeam;
|
|
@@ -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,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAa5C,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,IAAI,GAAG,IAAI,CAAC;IAOvB,MAAM,EAAE,SAAS,CAAC;IAOlB,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;CAC9B"}
|
|
@@ -8,18 +8,22 @@ 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
|
+
DayPeriod,
|
|
13
|
+
TournamentMatchPhase
|
|
14
|
+
} from "@natrave/tournaments-service-types";
|
|
12
15
|
import {
|
|
13
16
|
Column,
|
|
14
17
|
CreateDateColumn,
|
|
15
18
|
Entity,
|
|
19
|
+
Index,
|
|
16
20
|
JoinColumn,
|
|
17
21
|
ManyToOne,
|
|
18
22
|
OneToMany,
|
|
19
23
|
PrimaryGeneratedColumn,
|
|
20
24
|
UpdateDateColumn
|
|
21
25
|
} from "typeorm";
|
|
22
|
-
import {
|
|
26
|
+
import { TournamentFacility } from "../tournament-facilities/index.js";
|
|
23
27
|
import { TournamentMatchCard } from "../tournament-match-cards/index.js";
|
|
24
28
|
import { TournamentMatchGoal } from "../tournament-match-goals/index.js";
|
|
25
29
|
import { TournamentTeam } from "../tournament-teams/index.js";
|
|
@@ -56,12 +60,12 @@ __decorateClass([
|
|
|
56
60
|
], TournamentMatch.prototype, "awayTeamId", 2);
|
|
57
61
|
__decorateClass([
|
|
58
62
|
Column({
|
|
59
|
-
name: "
|
|
63
|
+
name: "facility_id",
|
|
60
64
|
type: "int",
|
|
61
65
|
nullable: true,
|
|
62
|
-
comment: "Identificador do
|
|
66
|
+
comment: "Identificador do estabelecimento onde ocorrer\xE1 a partida (opcional)."
|
|
63
67
|
})
|
|
64
|
-
], TournamentMatch.prototype, "
|
|
68
|
+
], TournamentMatch.prototype, "facilityId", 2);
|
|
65
69
|
__decorateClass([
|
|
66
70
|
Column({
|
|
67
71
|
name: "match_date",
|
|
@@ -71,6 +75,13 @@ __decorateClass([
|
|
|
71
75
|
comment: "Data e hora da partida (opcional)."
|
|
72
76
|
})
|
|
73
77
|
], TournamentMatch.prototype, "matchDate", 2);
|
|
78
|
+
__decorateClass([
|
|
79
|
+
Column({
|
|
80
|
+
type: "enum",
|
|
81
|
+
enum: DayPeriod,
|
|
82
|
+
comment: "Per\xEDodo do dia em que a partida est\xE1 dispon\xEDvel."
|
|
83
|
+
})
|
|
84
|
+
], TournamentMatch.prototype, "period", 2);
|
|
74
85
|
__decorateClass([
|
|
75
86
|
Column({
|
|
76
87
|
type: "enum",
|
|
@@ -101,9 +112,11 @@ __decorateClass([
|
|
|
101
112
|
})
|
|
102
113
|
], TournamentMatch.prototype, "updatedAt", 2);
|
|
103
114
|
__decorateClass([
|
|
104
|
-
ManyToOne(() =>
|
|
105
|
-
|
|
106
|
-
|
|
115
|
+
ManyToOne(() => TournamentFacility, (facility) => facility.matches, {
|
|
116
|
+
onDelete: "SET NULL"
|
|
117
|
+
}),
|
|
118
|
+
JoinColumn({ name: "facility_id" })
|
|
119
|
+
], TournamentMatch.prototype, "facility", 2);
|
|
107
120
|
__decorateClass([
|
|
108
121
|
ManyToOne(() => Tournament, (tournament) => tournament.matches, {
|
|
109
122
|
onDelete: "CASCADE"
|
|
@@ -129,6 +142,10 @@ __decorateClass([
|
|
|
129
142
|
OneToMany(() => TournamentMatchCard, (card) => card.match)
|
|
130
143
|
], TournamentMatch.prototype, "cards", 2);
|
|
131
144
|
TournamentMatch = __decorateClass([
|
|
145
|
+
Index("idx_tournament_phase_round", ["tournamentId", "phase", "roundIndicator"]),
|
|
146
|
+
Index("idx_tournament_id", ["tournamentId"]),
|
|
147
|
+
Index("idx_match_date", ["matchDate"]),
|
|
148
|
+
Index("idx_phase_round", ["phase", "roundIndicator"]),
|
|
132
149
|
Entity("tournament_matches")
|
|
133
150
|
], TournamentMatch);
|
|
134
151
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-match-availability.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches-availability/tournament-match-availability.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,SAAS,EACT,4BAA4B,EAC7B,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"tournament-match-availability.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches-availability/tournament-match-availability.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,SAAS,EACT,4BAA4B,EAC7B,MAAM,oCAAoC,CAAC;AAY5C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAW5C,qBAEa,2BAA4B,YAAW,4BAA4B;IAI9E,EAAE,EAAE,MAAM,CAAC;IAOX,GAAG,EAAE,SAAS,CAAC;IAOf,MAAM,EAAE,SAAS,CAAC;IAOlB,YAAY,EAAE,MAAM,CAAC;IAOrB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,UAAU,EAAE,UAAU,CAAC;CACxB"}
|
package/dist/tournaments/tournament-matches-availability/tournament-match-availability.entity.js
CHANGED
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
JoinColumn,
|
|
20
20
|
ManyToOne,
|
|
21
21
|
PrimaryGeneratedColumn,
|
|
22
|
+
Unique,
|
|
22
23
|
UpdateDateColumn
|
|
23
24
|
} from "typeorm";
|
|
24
25
|
import { Tournament } from "../tournaments/index.js";
|
|
@@ -71,7 +72,8 @@ __decorateClass([
|
|
|
71
72
|
JoinColumn({ name: "tournament_id" })
|
|
72
73
|
], TournamentMatchAvailability.prototype, "tournament", 2);
|
|
73
74
|
TournamentMatchAvailability = __decorateClass([
|
|
74
|
-
Entity("tournament_match_availabilities")
|
|
75
|
+
Entity("tournament_match_availabilities"),
|
|
76
|
+
Unique(["day", "period", "tournamentId"])
|
|
75
77
|
], TournamentMatchAvailability);
|
|
76
78
|
export {
|
|
77
79
|
TournamentMatchAvailability
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@natrave/shared-entities",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.57",
|
|
4
4
|
"description": "Entidades compartilhadass da NaTrave",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@changesets/cli": "^2.29.4",
|
|
29
29
|
"@eslint/js": "^9.27.0",
|
|
30
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
31
|
-
"@typescript-eslint/parser": "^8.
|
|
32
|
-
"esbuild": "^0.25.
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "^8.33.0",
|
|
31
|
+
"@typescript-eslint/parser": "^8.33.0",
|
|
32
|
+
"esbuild": "^0.25.5",
|
|
33
33
|
"eslint": "^9.27.0",
|
|
34
34
|
"eslint-config-prettier": "^10.1.5",
|
|
35
|
-
"eslint-import-resolver-typescript": "^4.
|
|
35
|
+
"eslint-import-resolver-typescript": "^4.4.1",
|
|
36
36
|
"eslint-plugin-import": "^2.31.0",
|
|
37
|
-
"eslint-plugin-prettier": "^5.4.
|
|
37
|
+
"eslint-plugin-prettier": "^5.4.1",
|
|
38
38
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
39
39
|
"glob": "^11.0.2",
|
|
40
40
|
"husky": "^9.1.7",
|
|
41
|
-
"lint-staged": "^16.
|
|
41
|
+
"lint-staged": "^16.1.0",
|
|
42
42
|
"prettier": "^3.5.3",
|
|
43
43
|
"ts-node": "^10.9.2"
|
|
44
44
|
},
|
|
@@ -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.1.
|
|
49
|
+
"@natrave/tournaments-service-types": "^1.1.93",
|
|
50
50
|
"reflect-metadata": "^0.2.2",
|
|
51
51
|
"typeorm": "^0.3.24"
|
|
52
52
|
},
|