@natrave/shared-entities 1.2.21 → 1.2.22

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.
@@ -6,6 +6,7 @@ export * from './tournament-match-cards';
6
6
  export * from './tournament-match-goals';
7
7
  export * from './tournament-match-schemas';
8
8
  export * from './tournament-matches';
9
+ export * from './tournament-matches-availability';
9
10
  export * from './tournament-payments';
10
11
  export * from './tournament-players';
11
12
  export * from './tournament-prize-rules';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tournaments/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tournaments/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
@@ -6,6 +6,7 @@ export * from "./tournament-match-cards/index.js";
6
6
  export * from "./tournament-match-goals/index.js";
7
7
  export * from "./tournament-match-schemas/index.js";
8
8
  export * from "./tournament-matches/index.js";
9
+ export * from "./tournament-matches-availability/index.js";
9
10
  export * from "./tournament-payments/index.js";
10
11
  export * from "./tournament-players/index.js";
11
12
  export * from "./tournament-prize-rules/index.js";
@@ -0,0 +1,2 @@
1
+ export { TournamentMatchAvailability } from './tournament-match-availability.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches-availability/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { TournamentMatchAvailability } from "./tournament-match-availability.entity.js";
2
+ export {
3
+ TournamentMatchAvailability
4
+ };
@@ -0,0 +1,13 @@
1
+ import { DayOfWeek, ITournamentMatchAvailability } from '@natrave/tournaments-service-types';
2
+ import { Tournament } from '../tournaments';
3
+ export declare class TournamentMatchAvailability implements ITournamentMatchAvailability {
4
+ id: number;
5
+ day: DayOfWeek;
6
+ startTime: string;
7
+ endTime: string;
8
+ tournamentId: number;
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ tournament: Tournament;
12
+ }
13
+ //# sourceMappingURL=tournament-match-availability.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tournament-match-availability.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-matches-availability/tournament-match-availability.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAW7F,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAW5C,qBACa,2BAA4B,YAAW,4BAA4B;IAI9E,EAAE,EAAE,MAAM,CAAC;IAOX,GAAG,EAAE,SAAS,CAAC;IAOf,SAAS,EAAE,MAAM,CAAC;IAOlB,OAAO,EAAE,MAAM,CAAC;IAOhB,YAAY,EAAE,MAAM,CAAC;IAOrB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,UAAU,EAAE,UAAU,CAAC;CACxB"}
@@ -0,0 +1,82 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result) __defProp(target, key, result);
9
+ return result;
10
+ };
11
+ import { DayOfWeek } from "@natrave/tournaments-service-types";
12
+ import {
13
+ Column,
14
+ CreateDateColumn,
15
+ Entity,
16
+ JoinColumn,
17
+ ManyToOne,
18
+ PrimaryGeneratedColumn,
19
+ UpdateDateColumn
20
+ } from "typeorm";
21
+ import { Tournament } from "../tournaments/index.js";
22
+ let TournamentMatchAvailability = class {
23
+ };
24
+ __decorateClass([
25
+ PrimaryGeneratedColumn({
26
+ comment: "Identificador \xFAnico do per\xEDodo de disponibilidade para jogos."
27
+ })
28
+ ], TournamentMatchAvailability.prototype, "id", 2);
29
+ __decorateClass([
30
+ Column({
31
+ type: "enum",
32
+ enum: DayOfWeek,
33
+ comment: "Dia da semana em que o per\xEDodo est\xE1 dispon\xEDvel para partidas."
34
+ })
35
+ ], TournamentMatchAvailability.prototype, "day", 2);
36
+ __decorateClass([
37
+ Column({
38
+ name: "start_time",
39
+ type: "time",
40
+ comment: 'Hor\xE1rio de in\xEDcio do per\xEDodo (formato "HH:mm").'
41
+ })
42
+ ], TournamentMatchAvailability.prototype, "startTime", 2);
43
+ __decorateClass([
44
+ Column({
45
+ name: "end_time",
46
+ type: "time",
47
+ comment: 'Hor\xE1rio de t\xE9rmino do per\xEDodo (formato "HH:mm").'
48
+ })
49
+ ], TournamentMatchAvailability.prototype, "endTime", 2);
50
+ __decorateClass([
51
+ Column({
52
+ name: "tournament_id",
53
+ type: "int",
54
+ comment: "Identificador do torneio ao qual este per\xEDodo pertence."
55
+ })
56
+ ], TournamentMatchAvailability.prototype, "tournamentId", 2);
57
+ __decorateClass([
58
+ CreateDateColumn({
59
+ name: "created_at",
60
+ type: "timestamptz",
61
+ comment: "Data em que este registro foi criado."
62
+ })
63
+ ], TournamentMatchAvailability.prototype, "createdAt", 2);
64
+ __decorateClass([
65
+ UpdateDateColumn({
66
+ name: "updated_at",
67
+ type: "timestamptz",
68
+ comment: "Data da \xFAltima atualiza\xE7\xE3o deste registro."
69
+ })
70
+ ], TournamentMatchAvailability.prototype, "updatedAt", 2);
71
+ __decorateClass([
72
+ ManyToOne(() => Tournament, (tournament) => tournament.matchAvailabilities, {
73
+ onDelete: "CASCADE"
74
+ }),
75
+ JoinColumn({ name: "tournament_id" })
76
+ ], TournamentMatchAvailability.prototype, "tournament", 2);
77
+ TournamentMatchAvailability = __decorateClass([
78
+ Entity("tournament_match_availabilities")
79
+ ], TournamentMatchAvailability);
80
+ export {
81
+ TournamentMatchAvailability
82
+ };
@@ -1,10 +1,11 @@
1
- import { DayOfWeek, ITournament, TournamentGender } from '@natrave/tournaments-service-types';
1
+ import { ITournament, TournamentGender } 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';
5
5
  import { TournamentGroup } from '../tournament-groups/';
6
6
  import { TournamentMatchSchema } from '../tournament-match-schemas';
7
7
  import { TournamentMatch } from '../tournament-matches';
8
+ import { TournamentMatchAvailability } from '../tournament-matches-availability/tournament-match-availability.entity';
8
9
  import { TournamentPayment } from '../tournament-payments';
9
10
  import { TournamentPrizeRule } from '../tournament-prize-rules';
10
11
  import { TournamentRule } from '../tournament-rules';
@@ -17,9 +18,6 @@ export declare class Tournament implements ITournament {
17
18
  description?: string | null;
18
19
  tournamentImage?: string | null;
19
20
  matchSchemaId?: number | null;
20
- matchDays: DayOfWeek[];
21
- matchStartTime: string;
22
- matchEndTime: string;
23
21
  city: string;
24
22
  state: string;
25
23
  gender: TournamentGender;
@@ -38,5 +36,6 @@ export declare class Tournament implements ITournament {
38
36
  matches: TournamentMatch[];
39
37
  tournamentFacilities: TournamentFacility[];
40
38
  coupons: TournamentCoupon[];
39
+ matchAvailabilities: TournamentMatchAvailability[];
41
40
  }
42
41
  //# sourceMappingURL=tournament.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tournament.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournaments/tournament.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAa9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAWrD,qBACa,UAAW,YAAW,WAAW;IAE5C,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,EAAE,MAAM,CAAC;IAGb,WAAW,EAAE,IAAI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AiB,EAAE,CAAC;IAG9B,OAAO,EAAE,eAAe,EAAE,CAAC;IAG3B,oBAAoB,EAAE,kBAAkB,EAAE,CAAC;IAG3C,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAG5B,mBAAmB,EAAE,2BAA2B,EAAE,CAAC;CACpD"}
@@ -8,7 +8,7 @@ var __decorateClass = (decorators, target, key, kind) => {
8
8
  if (kind && result) __defProp(target, key, result);
9
9
  return result;
10
10
  };
11
- import { DayOfWeek, TournamentGender } from "@natrave/tournaments-service-types";
11
+ import { TournamentGender } from "@natrave/tournaments-service-types";
12
12
  import {
13
13
  Column,
14
14
  CreateDateColumn,
@@ -26,6 +26,7 @@ import { TournamentFormatConfig } from "../tournament-format-configs/index.js";
26
26
  import { TournamentGroup } from "../tournament-groups//index.js";
27
27
  import { TournamentMatchSchema } from "../tournament-match-schemas/index.js";
28
28
  import { TournamentMatch } from "../tournament-matches/index.js";
29
+ import { TournamentMatchAvailability } from "../tournament-matches-availability/tournament-match-availability.entity.js";
29
30
  import { TournamentPayment } from "../tournament-payments/index.js";
30
31
  import { TournamentPrizeRule } from "../tournament-prize-rules/index.js";
31
32
  import { TournamentRule } from "../tournament-rules/index.js";
@@ -63,21 +64,6 @@ __decorateClass([
63
64
  comment: "ID do esquema de partidas (opcional)."
64
65
  })
65
66
  ], Tournament.prototype, "matchSchemaId", 2);
66
- __decorateClass([
67
- Column({
68
- name: "match_days",
69
- type: "enum",
70
- enum: Object.values(DayOfWeek),
71
- array: true,
72
- comment: "Dias da semana em que ocorrer\xE3o as partidas."
73
- })
74
- ], Tournament.prototype, "matchDays", 2);
75
- __decorateClass([
76
- Column({ name: "match_start_time", type: "time", comment: "Hor\xE1rio de in\xEDcio das partidas." })
77
- ], Tournament.prototype, "matchStartTime", 2);
78
- __decorateClass([
79
- Column({ name: "match_end_time", type: "time", comment: "Hor\xE1rio de t\xE9rmino das partidas." })
80
- ], Tournament.prototype, "matchEndTime", 2);
81
67
  __decorateClass([
82
68
  Column({ type: "varchar", length: 100, comment: "Cidade onde o torneio ser\xE1 realizado." })
83
69
  ], Tournament.prototype, "city", 2);
@@ -162,6 +148,9 @@ __decorateClass([
162
148
  __decorateClass([
163
149
  OneToMany(() => TournamentCoupon, (coupon) => coupon.tournament)
164
150
  ], Tournament.prototype, "coupons", 2);
151
+ __decorateClass([
152
+ OneToMany(() => TournamentMatchAvailability, (availability) => availability.tournament)
153
+ ], Tournament.prototype, "matchAvailabilities", 2);
165
154
  Tournament = __decorateClass([
166
155
  Entity("tournaments")
167
156
  ], Tournament);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.2.21",
3
+ "version": "1.2.22",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -34,7 +34,7 @@
34
34
  "eslint-config-prettier": "^10.1.1",
35
35
  "eslint-import-resolver-typescript": "^4.3.1",
36
36
  "eslint-plugin-import": "^2.31.0",
37
- "eslint-plugin-prettier": "^5.2.5",
37
+ "eslint-plugin-prettier": "^5.2.6",
38
38
  "eslint-plugin-unused-imports": "^4.1.4",
39
39
  "glob": "^11.0.1",
40
40
  "husky": "^9.1.7",
@@ -43,9 +43,9 @@
43
43
  "ts-node": "^10.9.2"
44
44
  },
45
45
  "dependencies": {
46
- "@natrave/tournaments-service-types": "^1.1.23",
46
+ "@natrave/tournaments-service-types": "^1.1.25",
47
47
  "reflect-metadata": "^0.2.2",
48
- "typeorm": "^0.3.21"
48
+ "typeorm": "^0.3.22"
49
49
  },
50
50
  "scripts": {
51
51
  "build:types": "tsc --emitDeclarationOnly",