@natrave/shared-entities 7.32.0 → 7.33.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-matches/enums/match-creation-source.enum.d.ts +5 -0
- package/dist/tournaments/tournament-matches/enums/match-creation-source.enum.d.ts.map +1 -0
- package/dist/tournaments/tournament-matches/enums/match-creation-source.enum.js +8 -0
- package/dist/tournaments/tournament-matches/index.d.ts +1 -0
- package/dist/tournaments/tournament-matches/index.d.ts.map +1 -1
- package/dist/tournaments/tournament-matches/index.js +2 -0
- package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts +5 -2
- package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-matches/tournament-match.entity.js +22 -4
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match-creation-source.enum.d.ts","sourceRoot":"","sources":["../../../../src/tournaments/tournament-matches/enums/match-creation-source.enum.ts"],"names":[],"mappings":"AAUA,oBAAY,mBAAmB;IAK7B,gBAAgB,qBAAqB;IAKrC,SAAS,cAAc;CACxB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var MatchCreationSource = /* @__PURE__ */ ((MatchCreationSource2) => {
|
|
2
|
+
MatchCreationSource2["TABLE_GENERATION"] = "table_generation";
|
|
3
|
+
MatchCreationSource2["ORGANIZER"] = "organizer";
|
|
4
|
+
return MatchCreationSource2;
|
|
5
|
+
})(MatchCreationSource || {});
|
|
6
|
+
export {
|
|
7
|
+
MatchCreationSource
|
|
8
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { MatchCreationSource } from "./enums/match-creation-source.enum.js";
|
|
1
2
|
import { MatchScoresheetSource } from "./enums/match-scoresheet-source.enum.js";
|
|
2
3
|
import { TournamentMatch } from "./tournament-match.entity.js";
|
|
3
4
|
export {
|
|
5
|
+
MatchCreationSource,
|
|
4
6
|
MatchScoresheetSource,
|
|
5
7
|
TournamentMatch
|
|
6
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MatchStatus, TournamentMatchPhase } from '@natrave/tournaments-service-types';
|
|
2
2
|
import { TournamentBracket } from '../tournament-brackets';
|
|
3
3
|
import { TournamentFacility } from '../tournament-facilities';
|
|
4
4
|
import { TournamentMatchCard } from '../tournament-match-cards';
|
|
@@ -7,8 +7,9 @@ import { TournamentMatchSubstitution } from '../tournament-match-substitutions';
|
|
|
7
7
|
import { TournamentPenaltyShootout } from '../tournament-penalty-shootouts';
|
|
8
8
|
import { TournamentTeam } from '../tournament-teams';
|
|
9
9
|
import { Tournament } from '../tournaments';
|
|
10
|
+
import { MatchCreationSource } from './enums/match-creation-source.enum';
|
|
10
11
|
import { MatchScoresheetSource } from './enums/match-scoresheet-source.enum';
|
|
11
|
-
export declare class TournamentMatch
|
|
12
|
+
export declare class TournamentMatch {
|
|
12
13
|
id: number;
|
|
13
14
|
tournamentId: number;
|
|
14
15
|
homeTeamId: number | null;
|
|
@@ -31,6 +32,8 @@ export declare class TournamentMatch implements ITournamentMatch {
|
|
|
31
32
|
advancingTeamId: number | null;
|
|
32
33
|
advancementReason: string | null;
|
|
33
34
|
scoresheetSource: MatchScoresheetSource | null;
|
|
35
|
+
creationSource: MatchCreationSource;
|
|
36
|
+
createdByOrganizationUserId: number | null;
|
|
34
37
|
facility?: TournamentFacility;
|
|
35
38
|
tournament: Tournament;
|
|
36
39
|
homeTeam: 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,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAevF,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,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,qBAyDa,eAAe;IAI1B,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,CA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{
|
|
|
8
8
|
if (kind && result) __defProp(target, key, result);
|
|
9
9
|
return result;
|
|
10
10
|
};
|
|
11
|
-
import {
|
|
12
|
-
MatchStatus,
|
|
13
|
-
TournamentMatchPhase
|
|
14
|
-
} from "@natrave/tournaments-service-types";
|
|
11
|
+
import { MatchStatus, TournamentMatchPhase } from "@natrave/tournaments-service-types";
|
|
15
12
|
import {
|
|
16
13
|
Check,
|
|
17
14
|
Column,
|
|
@@ -33,6 +30,7 @@ import { TournamentMatchSubstitution } from "../tournament-match-substitutions/i
|
|
|
33
30
|
import { TournamentPenaltyShootout } from "../tournament-penalty-shootouts/index.js";
|
|
34
31
|
import { TournamentTeam } from "../tournament-teams/index.js";
|
|
35
32
|
import { Tournament } from "../tournaments/index.js";
|
|
33
|
+
import { MatchCreationSource } from "./enums/match-creation-source.enum.js";
|
|
36
34
|
import { MatchScoresheetSource } from "./enums/match-scoresheet-source.enum.js";
|
|
37
35
|
let TournamentMatch = class {
|
|
38
36
|
};
|
|
@@ -205,6 +203,23 @@ __decorateClass([
|
|
|
205
203
|
comment: "Origem da s\xFAmula usada para finalizar a partida: ao vivo ou p\xF3s-jogo."
|
|
206
204
|
})
|
|
207
205
|
], TournamentMatch.prototype, "scoresheetSource", 2);
|
|
206
|
+
__decorateClass([
|
|
207
|
+
Column({
|
|
208
|
+
name: "creation_source",
|
|
209
|
+
type: "enum",
|
|
210
|
+
enum: MatchCreationSource,
|
|
211
|
+
default: MatchCreationSource.TABLE_GENERATION,
|
|
212
|
+
comment: "Quem originou a partida: a gera\xE7\xE3o de tabela do campeonato, ou o organizador criando um jogo extra \xE0 m\xE3o. NOT NULL com default \u2014 quem gera a tabela n\xE3o precisa conhecer a coluna, e as partidas anteriores a ela ficam como geradas, que \xE9 o que de fato eram."
|
|
213
|
+
})
|
|
214
|
+
], TournamentMatch.prototype, "creationSource", 2);
|
|
215
|
+
__decorateClass([
|
|
216
|
+
Column({
|
|
217
|
+
name: "created_by_organization_user_id",
|
|
218
|
+
type: "int",
|
|
219
|
+
nullable: true,
|
|
220
|
+
comment: "organization_users.id de quem criou a partida \xE0 m\xE3o. Sem FK declarada (tabela de outro servi\xE7o), no mesmo padr\xE3o de tournament_players.called_up_by_organization_user_id. NULL quando a partida veio da gera\xE7\xE3o de tabela."
|
|
221
|
+
})
|
|
222
|
+
], TournamentMatch.prototype, "createdByOrganizationUserId", 2);
|
|
208
223
|
__decorateClass([
|
|
209
224
|
ManyToOne(() => TournamentFacility, (facility) => facility.matches, {
|
|
210
225
|
onDelete: "SET NULL"
|
|
@@ -275,6 +290,9 @@ TournamentMatch = __decorateClass([
|
|
|
275
290
|
Index("idx_tournament_matches_forfeited_by_team", ["tournamentId", "forfeitedByTeamId"], {
|
|
276
291
|
where: `"status" = 'WALKOVER'`
|
|
277
292
|
}),
|
|
293
|
+
Index("idx_tournament_matches_organizer_created", ["tournamentId"], {
|
|
294
|
+
where: `"creation_source" = 'organizer'`
|
|
295
|
+
}),
|
|
278
296
|
Check(`
|
|
279
297
|
(
|
|
280
298
|
(status = 'WALKOVER' AND forfeited_by_team_id IS NOT NULL)
|