@natrave/shared-entities 7.23.0 → 7.25.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-creation-drafts/tournament-creation-draft.entity.d.ts +3 -0
- package/dist/tournaments/tournament-creation-drafts/tournament-creation-draft.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-creation-drafts/tournament-creation-draft.entity.js +28 -0
- package/dist/tournaments/tournament-players/enums/convocation-source.enum.d.ts +5 -0
- package/dist/tournaments/tournament-players/enums/convocation-source.enum.d.ts.map +1 -0
- package/dist/tournaments/tournament-players/enums/convocation-source.enum.js +8 -0
- package/dist/tournaments/tournament-players/index.d.ts +1 -0
- package/dist/tournaments/tournament-players/index.d.ts.map +1 -1
- package/dist/tournaments/tournament-players/index.js +2 -0
- package/dist/tournaments/tournament-players/tournament-player.entity.d.ts +4 -0
- package/dist/tournaments/tournament-players/tournament-player.entity.d.ts.map +1 -1
- package/dist/tournaments/tournament-players/tournament-player.entity.js +26 -0
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ export declare class TournamentCreationDraft {
|
|
|
6
6
|
name: string | null;
|
|
7
7
|
lastStep: number;
|
|
8
8
|
maxStep: number;
|
|
9
|
+
stepHistory: Record<string, string>;
|
|
9
10
|
payload: Record<string, unknown>;
|
|
10
11
|
payloadVersion: number;
|
|
11
12
|
status: TournamentCreationDraftStatus;
|
|
@@ -15,6 +16,8 @@ export declare class TournamentCreationDraft {
|
|
|
15
16
|
lastSavedAt: Date;
|
|
16
17
|
convertedAt: Date | null;
|
|
17
18
|
discardedAt: Date | null;
|
|
19
|
+
contactedAt: Date | null;
|
|
20
|
+
contactedBy: string | null;
|
|
18
21
|
createdAt: Date;
|
|
19
22
|
updatedAt: Date;
|
|
20
23
|
deletedAt: Date | null;
|
package/dist/tournaments/tournament-creation-drafts/tournament-creation-draft.entity.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-creation-draft.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-creation-drafts/tournament-creation-draft.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"tournament-creation-draft.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-creation-drafts/tournament-creation-draft.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAwCxD,qBAca,uBAAuB;IAMlC,EAAE,EAAE,MAAM,CAAC;IAOX,cAAc,EAAE,MAAM,CAAC;IASvB,WAAW,EAAE,MAAM,CAAC;IASpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAQpB,QAAQ,EAAE,MAAM,CAAC;IASjB,OAAO,EAAE,MAAM,CAAC;IAShB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAQpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IASjC,cAAc,EAAE,MAAM,CAAC;IASvB,MAAM,EAAE,6BAA6B,CAAC;IAStC,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;IASxC,SAAS,EAAE,MAAM,CAAC;IAQlB,SAAS,EAAE,IAAI,CAAC;IAShB,WAAW,EAAE,IAAI,CAAC;IAQlB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAQzB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IASzB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IASzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ3B,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB"}
|
|
@@ -67,6 +67,14 @@ __decorateClass([
|
|
|
67
67
|
comment: "Maior passo j\xE1 alcan\xE7ado. O organizador volta para tr\xE1s, ent\xE3o `last_step` sozinho subestima o quanto ele avan\xE7ou: o funil se mede por aqui."
|
|
68
68
|
})
|
|
69
69
|
], TournamentCreationDraft.prototype, "maxStep", 2);
|
|
70
|
+
__decorateClass([
|
|
71
|
+
Column({
|
|
72
|
+
name: "step_history",
|
|
73
|
+
type: "jsonb",
|
|
74
|
+
default: () => "'{}'::jsonb",
|
|
75
|
+
comment: 'Mapa passo -> data/hora do PRIMEIRO toque naquele passo (ex.: {"1":"2026-08-20T14:02:00Z"}). Alimenta a trajet\xF3ria do organizador no wizard.'
|
|
76
|
+
})
|
|
77
|
+
], TournamentCreationDraft.prototype, "stepHistory", 2);
|
|
70
78
|
__decorateClass([
|
|
71
79
|
Column({
|
|
72
80
|
type: "jsonb",
|
|
@@ -139,6 +147,23 @@ __decorateClass([
|
|
|
139
147
|
comment: "Data/hora em que o organizador descartou o rascunho explicitamente."
|
|
140
148
|
})
|
|
141
149
|
], TournamentCreationDraft.prototype, "discardedAt", 2);
|
|
150
|
+
__decorateClass([
|
|
151
|
+
Column({
|
|
152
|
+
name: "contacted_at",
|
|
153
|
+
type: "timestamptz",
|
|
154
|
+
nullable: true,
|
|
155
|
+
comment: "Data/hora em que algu\xE9m do time interno registrou ter falado com o organizador. Nulo enquanto ningu\xE9m falou."
|
|
156
|
+
})
|
|
157
|
+
], TournamentCreationDraft.prototype, "contactedAt", 2);
|
|
158
|
+
__decorateClass([
|
|
159
|
+
Column({
|
|
160
|
+
name: "contacted_by",
|
|
161
|
+
type: "varchar",
|
|
162
|
+
length: 64,
|
|
163
|
+
nullable: true,
|
|
164
|
+
comment: "ID no Clerk de quem do time marcou o contato."
|
|
165
|
+
})
|
|
166
|
+
], TournamentCreationDraft.prototype, "contactedBy", 2);
|
|
142
167
|
__decorateClass([
|
|
143
168
|
CreateDateColumn({
|
|
144
169
|
name: "created_at",
|
|
@@ -174,6 +199,9 @@ TournamentCreationDraft = __decorateClass([
|
|
|
174
199
|
}),
|
|
175
200
|
Index("IDX_tournament_creation_drafts_organization", ["organizationId"]),
|
|
176
201
|
Index("IDX_tournament_creation_drafts_converted_group", ["convertedCategoryGroupId"]),
|
|
202
|
+
Index("IDX_tournament_creation_drafts_uncontacted", ["lastSavedAt"], {
|
|
203
|
+
where: `"status" = 'DRAFT' AND "contacted_at" IS NULL AND "deleted_at" IS NULL`
|
|
204
|
+
}),
|
|
177
205
|
Check("CHK_TOURNAMENT_CREATION_DRAFT_STEPS", '"max_step" >= "last_step" AND "last_step" >= 1')
|
|
178
206
|
], TournamentCreationDraft);
|
|
179
207
|
export {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convocation-source.enum.d.ts","sourceRoot":"","sources":["../../../../src/tournaments/tournament-players/enums/convocation-source.enum.ts"],"names":[],"mappings":"AAeA,oBAAY,iBAAiB;IAI3B,IAAI,SAAS;IAKb,SAAS,cAAc;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-players/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-players/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -3,11 +3,15 @@ import { PlayerTeam } from '../../teams';
|
|
|
3
3
|
import { TournamentMatchCard } from '../tournament-match-cards';
|
|
4
4
|
import { TournamentMatchGoal } from '../tournament-match-goals';
|
|
5
5
|
import { TournamentTeam } from '../tournament-teams';
|
|
6
|
+
import { ConvocationSource } from './enums/convocation-source.enum';
|
|
6
7
|
export declare class TournamentPlayer implements ITournamentPlayer {
|
|
7
8
|
id: number;
|
|
8
9
|
playerTeamId: number;
|
|
9
10
|
teamId: number;
|
|
10
11
|
isOwner: boolean;
|
|
12
|
+
convokedBy: ConvocationSource;
|
|
13
|
+
convokedByOrganizationUserId: number | null;
|
|
14
|
+
originMatchId: number | null;
|
|
11
15
|
createdAt: Date;
|
|
12
16
|
updatedAt: Date;
|
|
13
17
|
playerTeam: PlayerTeam;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-player.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-players/tournament-player.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAevE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"tournament-player.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-players/tournament-player.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAevE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,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,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,qBAIa,gBAAiB,YAAW,iBAAiB;IAExD,EAAE,EAAE,MAAM,CAAC;IAIX,YAAY,EAAE,MAAM,CAAC;IAGrB,MAAM,EAAE,MAAM,CAAC;IASf,OAAO,EAAE,OAAO,CAAC;IAkBjB,UAAU,EAAE,iBAAiB,CAAC;IAc9B,4BAA4B,EAAE,MAAM,GAAG,IAAI,CAAC;IAa5C,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAG7B,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAShB,UAAU,EAAE,UAAU,CAAC;IAQvB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAOvB,IAAI,EAAE,cAAc,CAAC;IAGrB,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAG7B,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAG/B,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B"}
|
|
@@ -25,6 +25,7 @@ import { PlayerTeam } from "../../teams/index.js";
|
|
|
25
25
|
import { TournamentMatchCard } from "../tournament-match-cards/index.js";
|
|
26
26
|
import { TournamentMatchGoal } from "../tournament-match-goals/index.js";
|
|
27
27
|
import { TournamentTeam } from "../tournament-teams/index.js";
|
|
28
|
+
import { ConvocationSource } from "./enums/convocation-source.enum.js";
|
|
28
29
|
let TournamentPlayer = class {
|
|
29
30
|
};
|
|
30
31
|
__decorateClass([
|
|
@@ -44,6 +45,31 @@ __decorateClass([
|
|
|
44
45
|
comment: "Dono do time no torneio."
|
|
45
46
|
})
|
|
46
47
|
], TournamentPlayer.prototype, "isOwner", 2);
|
|
48
|
+
__decorateClass([
|
|
49
|
+
Column({
|
|
50
|
+
name: "convoked_by",
|
|
51
|
+
type: "enum",
|
|
52
|
+
enum: ConvocationSource,
|
|
53
|
+
default: ConvocationSource.TEAM,
|
|
54
|
+
comment: "Origem da convoca\xE7\xE3o: o time, ou o organizador pela s\xFAmula."
|
|
55
|
+
})
|
|
56
|
+
], TournamentPlayer.prototype, "convokedBy", 2);
|
|
57
|
+
__decorateClass([
|
|
58
|
+
Column({
|
|
59
|
+
name: "convoked_by_organization_user_id",
|
|
60
|
+
type: "int",
|
|
61
|
+
nullable: true,
|
|
62
|
+
comment: "FK organization_users.id \u2014 quem convocou, quando foi o organizador."
|
|
63
|
+
})
|
|
64
|
+
], TournamentPlayer.prototype, "convokedByOrganizationUserId", 2);
|
|
65
|
+
__decorateClass([
|
|
66
|
+
Column({
|
|
67
|
+
name: "origin_match_id",
|
|
68
|
+
type: "int",
|
|
69
|
+
nullable: true,
|
|
70
|
+
comment: "FK tournament_matches.id \u2014 s\xFAmula em que a convoca\xE7\xE3o foi criada."
|
|
71
|
+
})
|
|
72
|
+
], TournamentPlayer.prototype, "originMatchId", 2);
|
|
47
73
|
__decorateClass([
|
|
48
74
|
CreateDateColumn({ name: "created_at", type: "timestamptz" })
|
|
49
75
|
], TournamentPlayer.prototype, "createdAt", 2);
|