@natrave/shared-entities 7.25.0 → 7.27.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.
@@ -12,6 +12,7 @@ export declare class TournamentMatchGoal {
12
12
  scorerId: number | null;
13
13
  assistId: number | null;
14
14
  authorName: string | null;
15
+ assistName: string | null;
15
16
  goalMethod: GoalMethod | null;
16
17
  note: string | null;
17
18
  ownGoal: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"tournament-match-goal.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-match-goals/tournament-match-goal.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAajE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAOrD,qBAiBa,mBAAmB;IAI9B,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,EAAE,MAAM,CAAC;IAOf,OAAO,EAAE,MAAM,CAAC;IAOhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,MAAM,CAAC,EAAE,WAAW,CAAC;IAQrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IASxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IASxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAS1B,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAQ9B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAQpB,OAAO,EAAE,OAAO,CAAC;IAQjB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAOvB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAMhB,IAAI,CAAC,EAAE,cAAc,CAAC;IAItB,KAAK,CAAC,EAAE,eAAe,CAAC;IAIxB,MAAM,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAIjC,MAAM,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAClC"}
1
+ {"version":3,"file":"tournament-match-goal.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-match-goals/tournament-match-goal.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAajE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAOrD,qBAqBa,mBAAmB;IAI9B,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,EAAE,MAAM,CAAC;IAOf,OAAO,EAAE,MAAM,CAAC;IAOhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,MAAM,CAAC,EAAE,WAAW,CAAC;IAQrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IASxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IASxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAS1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAS1B,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAQ9B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAQpB,OAAO,EAAE,OAAO,CAAC;IAQjB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAOvB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAMhB,IAAI,CAAC,EAAE,cAAc,CAAC;IAItB,KAAK,CAAC,EAAE,eAAe,CAAC;IAIxB,MAAM,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAIjC,MAAM,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAClC"}
@@ -72,7 +72,7 @@ __decorateClass([
72
72
  name: "assist_id",
73
73
  type: "int",
74
74
  nullable: true,
75
- comment: "Identificador do jogador que fez a assist\xEAncia; nulo quando o autor n\xE3o foi identificado."
75
+ comment: "Identificador do jogador convocado que fez a assist\xEAncia; nulo quando n\xE3o houve assist\xEAncia ou o assistente n\xE3o foi identificado. Mutuamente exclusivo com assist_name (CHECK na migration)."
76
76
  })
77
77
  ], TournamentMatchGoal.prototype, "assistId", 2);
78
78
  __decorateClass([
@@ -83,6 +83,14 @@ __decorateClass([
83
83
  comment: "Nome digitado pelo organizador quando o autor do gol n\xE3o est\xE1 no elenco. Mutuamente exclusivo com o scorer_id (CHECK na migration). N\xE3o conta para nenhuma estat\xEDstica individual."
84
84
  })
85
85
  ], TournamentMatchGoal.prototype, "authorName", 2);
86
+ __decorateClass([
87
+ Column({
88
+ name: "assist_name",
89
+ type: "text",
90
+ nullable: true,
91
+ comment: "Nome digitado pelo organizador quando quem deu a assist\xEAncia n\xE3o est\xE1 no elenco. Mutuamente exclusivo com o assist_id (CHECK na migration). N\xE3o conta para nenhuma estat\xEDstica individual."
92
+ })
93
+ ], TournamentMatchGoal.prototype, "assistName", 2);
86
94
  __decorateClass([
87
95
  Column({
88
96
  name: "goal_method",
@@ -156,6 +164,9 @@ TournamentMatchGoal = __decorateClass([
156
164
  }),
157
165
  Index("idx_tournament_goals_normal_only", ["matchId", "teamId"], {
158
166
  where: '"own_goal" = false'
167
+ }),
168
+ Index("idx_tournament_goals_assist_active", ["assistId"], {
169
+ where: '"assist_id" IS NOT NULL AND "deleted_at" IS NULL'
159
170
  })
160
171
  ], TournamentMatchGoal);
161
172
  export {
@@ -0,0 +1,5 @@
1
+ export declare enum CallUpSource {
2
+ TEAM = "team",
3
+ ORGANIZER = "organizer"
4
+ }
5
+ //# sourceMappingURL=call-up-source.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"call-up-source.enum.d.ts","sourceRoot":"","sources":["../../../../src/tournaments/tournament-players/enums/call-up-source.enum.ts"],"names":[],"mappings":"AAgBA,oBAAY,YAAY;IAItB,IAAI,SAAS;IAKb,SAAS,cAAc;CACxB"}
@@ -0,0 +1,8 @@
1
+ var CallUpSource = /* @__PURE__ */ ((CallUpSource2) => {
2
+ CallUpSource2["TEAM"] = "team";
3
+ CallUpSource2["ORGANIZER"] = "organizer";
4
+ return CallUpSource2;
5
+ })(CallUpSource || {});
6
+ export {
7
+ CallUpSource
8
+ };
@@ -1,3 +1,3 @@
1
- export { ConvocationSource } from './enums/convocation-source.enum';
1
+ export { CallUpSource } from './enums/call-up-source.enum';
2
2
  export { TournamentPlayer } from './tournament-player.entity';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-players/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1,6 +1,6 @@
1
- import { ConvocationSource } from "./enums/convocation-source.enum.js";
1
+ import { CallUpSource } from "./enums/call-up-source.enum.js";
2
2
  import { TournamentPlayer } from "./tournament-player.entity.js";
3
3
  export {
4
- ConvocationSource,
4
+ CallUpSource,
5
5
  TournamentPlayer
6
6
  };
@@ -3,14 +3,14 @@ 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
+ import { CallUpSource } from './enums/call-up-source.enum';
7
7
  export declare class TournamentPlayer implements ITournamentPlayer {
8
8
  id: number;
9
9
  playerTeamId: number;
10
10
  teamId: number;
11
11
  isOwner: boolean;
12
- convokedBy: ConvocationSource;
13
- convokedByOrganizationUserId: number | null;
12
+ calledUpBy: CallUpSource;
13
+ calledUpByOrganizationUserId: number | null;
14
14
  originMatchId: number | null;
15
15
  createdAt: Date;
16
16
  updatedAt: Date;
@@ -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;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"}
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,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,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,YAAY,CAAC;IAczB,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,7 +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
+ import { CallUpSource } from "./enums/call-up-source.enum.js";
29
29
  let TournamentPlayer = class {
30
30
  };
31
31
  __decorateClass([
@@ -47,21 +47,21 @@ __decorateClass([
47
47
  ], TournamentPlayer.prototype, "isOwner", 2);
48
48
  __decorateClass([
49
49
  Column({
50
- name: "convoked_by",
50
+ name: "called_up_by",
51
51
  type: "enum",
52
- enum: ConvocationSource,
53
- default: ConvocationSource.TEAM,
52
+ enum: CallUpSource,
53
+ default: CallUpSource.TEAM,
54
54
  comment: "Origem da convoca\xE7\xE3o: o time, ou o organizador pela s\xFAmula."
55
55
  })
56
- ], TournamentPlayer.prototype, "convokedBy", 2);
56
+ ], TournamentPlayer.prototype, "calledUpBy", 2);
57
57
  __decorateClass([
58
58
  Column({
59
- name: "convoked_by_organization_user_id",
59
+ name: "called_up_by_organization_user_id",
60
60
  type: "int",
61
61
  nullable: true,
62
62
  comment: "FK organization_users.id \u2014 quem convocou, quando foi o organizador."
63
63
  })
64
- ], TournamentPlayer.prototype, "convokedByOrganizationUserId", 2);
64
+ ], TournamentPlayer.prototype, "calledUpByOrganizationUserId", 2);
65
65
  __decorateClass([
66
66
  Column({
67
67
  name: "origin_match_id",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "7.25.0",
3
+ "version": "7.27.0",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -1,5 +0,0 @@
1
- export declare enum ConvocationSource {
2
- TEAM = "team",
3
- ORGANIZER = "organizer"
4
- }
5
- //# sourceMappingURL=convocation-source.enum.d.ts.map
@@ -1 +0,0 @@
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,8 +0,0 @@
1
- var ConvocationSource = /* @__PURE__ */ ((ConvocationSource2) => {
2
- ConvocationSource2["TEAM"] = "team";
3
- ConvocationSource2["ORGANIZER"] = "organizer";
4
- return ConvocationSource2;
5
- })(ConvocationSource || {});
6
- export {
7
- ConvocationSource
8
- };