@natrave/shared-entities 8.41.0 → 8.42.1
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ITournamentPlayer } from '@natrave/tournaments-service-types';
|
|
2
|
+
import { Position } from '../../players/player-position/enums/position.enum';
|
|
2
3
|
import { PlayerTeam } from '../../teams';
|
|
3
4
|
import { TournamentMatchCard } from '../tournament-match-cards';
|
|
4
5
|
import { TournamentMatchGoal } from '../tournament-match-goals';
|
|
@@ -10,6 +11,10 @@ export declare class TournamentPlayer implements ITournamentPlayer {
|
|
|
10
11
|
playerTeamId: number;
|
|
11
12
|
teamId: number;
|
|
12
13
|
isOwner: boolean;
|
|
14
|
+
shirtNumber: number | null;
|
|
15
|
+
displayName: string | null;
|
|
16
|
+
nickname: string | null;
|
|
17
|
+
positions: Position[] | null;
|
|
13
18
|
calledUpBy: CallUpSource;
|
|
14
19
|
calledUpByOrganizationUserId: number | null;
|
|
15
20
|
originMatchId: number | null;
|
|
@@ -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;
|
|
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;AAgBvE,OAAO,EAAE,QAAQ,EAAE,MAAM,mDAAmD,CAAC;AAC7E,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,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,qBAYa,gBAAiB,YAAW,iBAAiB;IAExD,EAAE,EAAE,MAAM,CAAC;IAIX,YAAY,EAAE,MAAM,CAAC;IAGrB,MAAM,EAAE,MAAM,CAAC;IASf,OAAO,EAAE,OAAO,CAAC;IA2BjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAU3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAS3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAgBxB,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAkB7B,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;IAI7B,eAAe,EAAE,2BAA2B,EAAE,CAAC;IAI/C,gBAAgB,EAAE,2BAA2B,EAAE,CAAC;CACjD"}
|
|
@@ -9,6 +9,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
9
9
|
return result;
|
|
10
10
|
};
|
|
11
11
|
import {
|
|
12
|
+
Check,
|
|
12
13
|
Column,
|
|
13
14
|
CreateDateColumn,
|
|
14
15
|
DeleteDateColumn,
|
|
@@ -21,6 +22,7 @@ import {
|
|
|
21
22
|
Unique,
|
|
22
23
|
UpdateDateColumn
|
|
23
24
|
} from "typeorm";
|
|
25
|
+
import { Position } from "../../players/player-position/enums/position.enum.js";
|
|
24
26
|
import { PlayerTeam } from "../../teams/index.js";
|
|
25
27
|
import { TournamentMatchCard } from "../tournament-match-cards/index.js";
|
|
26
28
|
import { TournamentMatchGoal } from "../tournament-match-goals/index.js";
|
|
@@ -46,6 +48,40 @@ __decorateClass([
|
|
|
46
48
|
comment: "Dono do time no torneio."
|
|
47
49
|
})
|
|
48
50
|
], TournamentPlayer.prototype, "isOwner", 2);
|
|
51
|
+
__decorateClass([
|
|
52
|
+
Column({
|
|
53
|
+
name: "shirt_number",
|
|
54
|
+
type: "int",
|
|
55
|
+
nullable: true,
|
|
56
|
+
comment: "Camisa nesta categoria (0 a 99). Copiada de player_teams na convoca\xE7\xE3o; depois, independente."
|
|
57
|
+
})
|
|
58
|
+
], TournamentPlayer.prototype, "shirtNumber", 2);
|
|
59
|
+
__decorateClass([
|
|
60
|
+
Column({
|
|
61
|
+
name: "display_name",
|
|
62
|
+
type: "varchar",
|
|
63
|
+
length: 50,
|
|
64
|
+
nullable: true,
|
|
65
|
+
comment: "Nome nesta categoria. NULL herda o nome da conta (users.name) ou do cadastro (players.nickname)."
|
|
66
|
+
})
|
|
67
|
+
], TournamentPlayer.prototype, "displayName", 2);
|
|
68
|
+
__decorateClass([
|
|
69
|
+
Column({
|
|
70
|
+
type: "varchar",
|
|
71
|
+
length: 50,
|
|
72
|
+
nullable: true,
|
|
73
|
+
comment: "Apelido nesta categoria. Copiado de player_teams na convoca\xE7\xE3o; depois, independente."
|
|
74
|
+
})
|
|
75
|
+
], TournamentPlayer.prototype, "nickname", 2);
|
|
76
|
+
__decorateClass([
|
|
77
|
+
Column({
|
|
78
|
+
type: "enum",
|
|
79
|
+
enum: Object.values(Position),
|
|
80
|
+
array: true,
|
|
81
|
+
nullable: true,
|
|
82
|
+
comment: "Posi\xE7\xF5es nesta categoria. Copiadas de player_teams na convoca\xE7\xE3o; {} \xE9 sem posi\xE7\xE3o."
|
|
83
|
+
})
|
|
84
|
+
], TournamentPlayer.prototype, "positions", 2);
|
|
49
85
|
__decorateClass([
|
|
50
86
|
Column({
|
|
51
87
|
name: "called_up_by",
|
|
@@ -117,7 +153,16 @@ __decorateClass([
|
|
|
117
153
|
TournamentPlayer = __decorateClass([
|
|
118
154
|
Entity("tournament_players"),
|
|
119
155
|
Unique(["playerTeamId", "teamId"]),
|
|
120
|
-
Index("IDX_team_id", ["teamId"])
|
|
156
|
+
Index("IDX_team_id", ["teamId"]),
|
|
157
|
+
Check(
|
|
158
|
+
"CHK_tournament_players_shirt_number",
|
|
159
|
+
'"shirt_number" IS NULL OR "shirt_number" BETWEEN 0 AND 99'
|
|
160
|
+
),
|
|
161
|
+
Check(
|
|
162
|
+
"CHK_tournament_players_display_name",
|
|
163
|
+
`"display_name" IS NULL OR btrim("display_name") <> ''`
|
|
164
|
+
),
|
|
165
|
+
Check("CHK_tournament_players_nickname", `"nickname" IS NULL OR btrim("nickname") <> ''`)
|
|
121
166
|
], TournamentPlayer);
|
|
122
167
|
export {
|
|
123
168
|
TournamentPlayer
|