@natrave/shared-entities 1.2.22 → 1.2.24

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.
@@ -4,10 +4,10 @@ export declare class TournamentFormatConfig implements ITournamentFormatConfig {
4
4
  id: number;
5
5
  tournamentId: number;
6
6
  format: TournamentFormat;
7
- numberOfGroups: number | null;
8
- initialPhaseMatchMode: MatchLegMode | null;
9
- knockoutStartPhase: KnockoutPhase | null;
10
- knockoutMatchMode: MatchLegMode | null;
7
+ numberOfGroups?: number | null;
8
+ initialPhaseMatchMode?: MatchLegMode | null;
9
+ knockoutStartPhase?: KnockoutPhase | null;
10
+ knockoutMatchMode?: MatchLegMode | null;
11
11
  createdAt: Date;
12
12
  updatedAt: Date;
13
13
  tournament: Tournament;
@@ -1 +1 @@
1
- {"version":3,"file":"tournament-format-config.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-format-configs/tournament-format-config.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,KAAK,uBAAuB,EAC7B,MAAM,oCAAoC,CAAC;AAW5C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAc5C,qBACa,sBAAuB,YAAW,uBAAuB;IAIpE,EAAE,EAAE,MAAM,CAAC;IAQX,YAAY,EAAE,MAAM,CAAC;IAOrB,MAAM,EAAE,gBAAgB,CAAC;IAQzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAU9B,qBAAqB,EAAE,YAAY,GAAG,IAAI,CAAC;IAU3C,kBAAkB,EAAE,aAAa,GAAG,IAAI,CAAC;IAUzC,iBAAiB,EAAE,YAAY,GAAG,IAAI,CAAC;IAOvC,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,UAAU,EAAE,UAAU,CAAC;CACxB"}
1
+ {"version":3,"file":"tournament-format-config.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-format-configs/tournament-format-config.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,KAAK,uBAAuB,EAC7B,MAAM,oCAAoC,CAAC;AAW5C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAc5C,qBACa,sBAAuB,YAAW,uBAAuB;IAIpE,EAAE,EAAE,MAAM,CAAC;IAQX,YAAY,EAAE,MAAM,CAAC;IAOrB,MAAM,EAAE,gBAAgB,CAAC;IAQzB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAU/B,qBAAqB,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAU5C,kBAAkB,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAU1C,iBAAiB,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAOxC,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,UAAU,EAAE,UAAU,CAAC;CACxB"}
@@ -3,13 +3,13 @@ import { Tournament } from '../tournaments';
3
3
  export declare class TournamentRule implements ITournamentRule {
4
4
  id: number;
5
5
  tournamentId: number;
6
- maxPlayerPerTeam: number;
7
- minPlayerPerTeam: number;
8
- minAge: number;
9
- maxAge?: number;
6
+ maxPlayerPerTeam?: number | null;
7
+ minPlayerPerTeam?: number | null;
8
+ minAge?: number | null;
9
+ maxAge?: number | null;
10
10
  expectedTeams: number;
11
- notes?: string;
12
- regulationPdfUrl?: string;
11
+ notes?: string | null;
12
+ regulationPdfUrl?: string | null;
13
13
  createdAt: Date;
14
14
  updatedAt: Date;
15
15
  tournament: Tournament;
@@ -1 +1 @@
1
- {"version":3,"file":"tournament-rule.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-rules/tournament-rule.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAYrE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAW5C,qBAIa,cAAe,YAAW,eAAe;IAEpD,EAAE,EAAE,MAAM,CAAC;IAQX,YAAY,EAAE,MAAM,CAAC;IAOrB,gBAAgB,EAAE,MAAM,CAAC;IAOzB,gBAAgB,EAAE,MAAM,CAAC;IAGzB,MAAM,EAAE,MAAM,CAAC;IAQf,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,aAAa,EAAE,MAAM,CAAC;IAQtB,KAAK,CAAC,EAAE,MAAM,CAAC;IASf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAO1B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAKhB,UAAU,EAAE,UAAU,CAAC;CACxB"}
1
+ {"version":3,"file":"tournament-rule.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-rules/tournament-rule.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAYrE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAW5C,qBAIa,cAAe,YAAW,eAAe;IAEpD,EAAE,EAAE,MAAM,CAAC;IAQX,YAAY,EAAE,MAAM,CAAC;IAQrB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQjC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQjC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQvB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGvB,aAAa,EAAE,MAAM,CAAC;IAQtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAStB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAOjC,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAKhB,UAAU,EAAE,UAAU,CAAC;CACxB"}
@@ -36,6 +36,7 @@ __decorateClass([
36
36
  Column({
37
37
  name: "max_player_per_team",
38
38
  type: "int",
39
+ nullable: true,
39
40
  comment: "N\xFAmero m\xE1ximo de jogadores por time."
40
41
  })
41
42
  ], TournamentRule.prototype, "maxPlayerPerTeam", 2);
@@ -43,11 +44,17 @@ __decorateClass([
43
44
  Column({
44
45
  name: "min_player_per_team",
45
46
  type: "int",
47
+ nullable: true,
46
48
  comment: "N\xFAmero m\xEDnimo de jogadores por time."
47
49
  })
48
50
  ], TournamentRule.prototype, "minPlayerPerTeam", 2);
49
51
  __decorateClass([
50
- Column({ name: "min_age", type: "int", comment: "Idade m\xEDnima permitida para participa\xE7\xE3o." })
52
+ Column({
53
+ name: "min_age",
54
+ type: "int",
55
+ nullable: true,
56
+ comment: "Idade m\xEDnima permitida para participa\xE7\xE3o."
57
+ })
51
58
  ], TournamentRule.prototype, "minAge", 2);
52
59
  __decorateClass([
53
60
  Column({
@@ -1,4 +1,4 @@
1
- import { ITournament, TournamentGender } from '@natrave/tournaments-service-types';
1
+ import { ITournament, TournamentGender, TournamentModality, TournamentStatus } from '@natrave/tournaments-service-types';
2
2
  import { TournamentCoupon } from '../tournament-coupons/tournament-coupon.entity';
3
3
  import { TournamentFacility } from '../tournament-facilities';
4
4
  import { TournamentFormatConfig } from '../tournament-format-configs';
@@ -13,16 +13,18 @@ import { TournamentTeam } from '../tournament-teams';
13
13
  export declare class Tournament implements ITournament {
14
14
  id: number;
15
15
  name: string;
16
- initialDate: Date;
17
- endDate: Date;
16
+ initialDate?: Date | null;
17
+ endDate?: Date | null;
18
18
  description?: string | null;
19
19
  tournamentImage?: string | null;
20
20
  matchSchemaId?: number | null;
21
- city: string;
22
- state: string;
21
+ city?: string | null;
22
+ state?: string | null;
23
23
  gender: TournamentGender;
24
- registrationFee: number;
25
- refereeFee: number;
24
+ registrationFee?: number | null;
25
+ refereeFee?: number | null;
26
+ status: TournamentStatus;
27
+ modality: TournamentModality;
26
28
  deletedAt: Date | null;
27
29
  createdAt: Date;
28
30
  updatedAt: Date;
@@ -1 +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=> {
8
8
  if (kind && result) __defProp(target, key, result);
9
9
  return result;
10
10
  };
11
- import { TournamentGender } from "@natrave/tournaments-service-types";
11
+ import {
12
+ TournamentGender,
13
+ TournamentModality,
14
+ TournamentStatus
15
+ } from "@natrave/tournaments-service-types";
12
16
  import {
13
17
  Column,
14
18
  CreateDateColumn,
@@ -40,10 +44,20 @@ __decorateClass([
40
44
  Column({ type: "varchar", length: 255, comment: "Nome do torneio." })
41
45
  ], Tournament.prototype, "name", 2);
42
46
  __decorateClass([
43
- Column({ name: "initial_date", type: "timestamptz", comment: "Data de in\xEDcio do torneio." })
47
+ Column({
48
+ name: "initial_date",
49
+ type: "timestamptz",
50
+ nullable: true,
51
+ comment: "Data de in\xEDcio do torneio."
52
+ })
44
53
  ], Tournament.prototype, "initialDate", 2);
45
54
  __decorateClass([
46
- Column({ name: "end_date", type: "timestamptz", comment: "Data de t\xE9rmino do torneio." })
55
+ Column({
56
+ name: "end_date",
57
+ type: "timestamptz",
58
+ nullable: true,
59
+ comment: "Data de t\xE9rmino do torneio."
60
+ })
47
61
  ], Tournament.prototype, "endDate", 2);
48
62
  __decorateClass([
49
63
  Column({ type: "text", nullable: true, comment: "Descri\xE7\xE3o do torneio (opcional)." })
@@ -65,10 +79,20 @@ __decorateClass([
65
79
  })
66
80
  ], Tournament.prototype, "matchSchemaId", 2);
67
81
  __decorateClass([
68
- Column({ type: "varchar", length: 100, comment: "Cidade onde o torneio ser\xE1 realizado." })
82
+ Column({
83
+ type: "varchar",
84
+ length: 100,
85
+ nullable: true,
86
+ comment: "Cidade onde o torneio ser\xE1 realizado."
87
+ })
69
88
  ], Tournament.prototype, "city", 2);
70
89
  __decorateClass([
71
- Column({ type: "varchar", length: 2, comment: "Estado (UF) onde o torneio ser\xE1 realizado." })
90
+ Column({
91
+ type: "varchar",
92
+ length: 2,
93
+ nullable: true,
94
+ comment: "Estado (UF) onde o torneio ser\xE1 realizado."
95
+ })
72
96
  ], Tournament.prototype, "state", 2);
73
97
  __decorateClass([
74
98
  Column({
@@ -82,6 +106,7 @@ __decorateClass([
82
106
  name: "registration_fee",
83
107
  type: "int",
84
108
  default: 0,
109
+ nullable: true,
85
110
  comment: "Valor da taxa de inscri\xE7\xE3o (em centavos)."
86
111
  })
87
112
  ], Tournament.prototype, "registrationFee", 2);
@@ -90,9 +115,26 @@ __decorateClass([
90
115
  name: "referee_fee",
91
116
  type: "int",
92
117
  default: 0,
118
+ nullable: true,
93
119
  comment: "Valor da taxa de arbitragem (em centavos)."
94
120
  })
95
121
  ], Tournament.prototype, "refereeFee", 2);
122
+ __decorateClass([
123
+ Column({
124
+ default: TournamentStatus.DRAFT,
125
+ type: "enum",
126
+ enum: Object.values(TournamentStatus),
127
+ comment: "Indica se o torneio est\xE1 em rascunho, criado (mas n\xE3o publicado) ou publicado para inscri\xE7\xF5es."
128
+ })
129
+ ], Tournament.prototype, "status", 2);
130
+ __decorateClass([
131
+ Column({
132
+ default: TournamentModality.FUT7,
133
+ type: "enum",
134
+ enum: Object.values(TournamentModality),
135
+ comment: "Indica a modalidade do torneio (fut7, futsal, futebol de campo, etc.)."
136
+ })
137
+ ], Tournament.prototype, "modality", 2);
96
138
  __decorateClass([
97
139
  Column({
98
140
  name: "deleted_at",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.2.22",
3
+ "version": "1.2.24",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -43,7 +43,7 @@
43
43
  "ts-node": "^10.9.2"
44
44
  },
45
45
  "dependencies": {
46
- "@natrave/tournaments-service-types": "^1.1.25",
46
+ "@natrave/tournaments-service-types": "^1.1.32",
47
47
  "reflect-metadata": "^0.2.2",
48
48
  "typeorm": "^0.3.22"
49
49
  },
@@ -53,6 +53,7 @@
53
53
  "build": "pnpm run build:types && pnpm run build:js",
54
54
  "clean": "rm -rf dist",
55
55
  "lint": "eslint src --ext .ts",
56
- "check:types": "tsc --noEmit"
56
+ "check:types": "tsc --noEmit",
57
+ "watch": "tsc --watch"
57
58
  }
58
59
  }