@natrave/shared-entities 1.2.12 → 1.2.14

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.
Files changed (91) hide show
  1. package/dist/app-auth/password-resets/password-reset.entity.d.ts.map +1 -1
  2. package/dist/app-auth/password-resets/password-reset.entity.js +27 -6
  3. package/dist/app-auth/refresh-tokens/refresh-token.entity.d.ts.map +1 -1
  4. package/dist/app-auth/refresh-tokens/refresh-token.entity.js +28 -6
  5. package/dist/app-auth/user-auth-providers/user-auth-provider.entity.d.ts.map +1 -1
  6. package/dist/app-auth/user-auth-providers/user-auth-provider.entity.js +34 -7
  7. package/dist/app-auth/user-verifications/user-verification.entity.d.ts.map +1 -1
  8. package/dist/app-auth/user-verifications/user-verification.entity.js +45 -9
  9. package/dist/app-auth/users/user.entity.d.ts.map +1 -1
  10. package/dist/app-auth/users/user.entity.js +66 -13
  11. package/dist/coupons/coupon-usages/coupon-usage.entity.d.ts +10 -0
  12. package/dist/coupons/coupon-usages/coupon-usage.entity.d.ts.map +1 -0
  13. package/dist/coupons/coupon-usages/coupon-usage.entity.js +61 -0
  14. package/dist/coupons/coupon-usages/index.d.ts +2 -0
  15. package/dist/coupons/coupon-usages/index.d.ts.map +1 -0
  16. package/dist/coupons/coupon-usages/index.js +4 -0
  17. package/dist/coupons/coupons/coupon.entity.d.ts +19 -0
  18. package/dist/coupons/coupons/coupon.entity.d.ts.map +1 -0
  19. package/dist/coupons/coupons/coupon.entity.js +107 -0
  20. package/dist/coupons/coupons/enums/coupon-discount-type.enum.d.ts +5 -0
  21. package/dist/coupons/coupons/enums/coupon-discount-type.enum.d.ts.map +1 -0
  22. package/dist/coupons/coupons/enums/coupon-discount-type.enum.js +8 -0
  23. package/dist/coupons/coupons/index.d.ts +3 -0
  24. package/dist/coupons/coupons/index.d.ts.map +1 -0
  25. package/dist/coupons/coupons/index.js +6 -0
  26. package/dist/coupons/index.d.ts +3 -0
  27. package/dist/coupons/index.d.ts.map +1 -0
  28. package/dist/coupons/index.js +2 -0
  29. package/dist/facilities/addresses/address.entity.d.ts.map +1 -1
  30. package/dist/facilities/addresses/address.entity.js +60 -13
  31. package/dist/facilities/facilities/facility.entity.d.ts.map +1 -1
  32. package/dist/facilities/facilities/facility.entity.js +52 -11
  33. package/dist/facilities/facility-images/facility-image.entity.d.ts.map +1 -1
  34. package/dist/facilities/facility-images/facility-image.entity.js +34 -7
  35. package/dist/facilities/facility-owners/facility-owner.entity.d.ts.map +1 -1
  36. package/dist/facilities/facility-owners/facility-owner.entity.js +38 -7
  37. package/dist/facilities/fields/field.entity.d.ts.map +1 -1
  38. package/dist/facilities/fields/field.entity.js +52 -10
  39. package/dist/index.d.ts +1 -0
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +1 -0
  42. package/dist/payments/payment-providers/payment-provider.entity.d.ts.map +1 -1
  43. package/dist/payments/payment-providers/payment-provider.entity.js +12 -4
  44. package/dist/payments/payments/payment.entity.d.ts.map +1 -1
  45. package/dist/payments/payments/payment.entity.js +48 -11
  46. package/dist/payments/user-payment-providers/user-payment-provider.entity.d.ts.map +1 -1
  47. package/dist/payments/user-payment-providers/user-payment-provider.entity.js +28 -6
  48. package/dist/tournaments/index.d.ts +1 -0
  49. package/dist/tournaments/index.d.ts.map +1 -1
  50. package/dist/tournaments/index.js +1 -0
  51. package/dist/tournaments/tournament-coupons/index.d.ts +2 -0
  52. package/dist/tournaments/tournament-coupons/index.d.ts.map +1 -0
  53. package/dist/tournaments/tournament-coupons/index.js +4 -0
  54. package/dist/tournaments/tournament-coupons/tournament-coupon.entity.d.ts +13 -0
  55. package/dist/tournaments/tournament-coupons/tournament-coupon.entity.d.ts.map +1 -0
  56. package/dist/tournaments/tournament-coupons/tournament-coupon.entity.js +64 -0
  57. package/dist/tournaments/tournament-facilities/tournament-facility.entity.d.ts.map +1 -1
  58. package/dist/tournaments/tournament-facilities/tournament-facility.entity.js +29 -6
  59. package/dist/tournaments/tournament-format-configs/tournament-format-config.entity.d.ts.map +1 -1
  60. package/dist/tournaments/tournament-format-configs/tournament-format-config.entity.js +47 -9
  61. package/dist/tournaments/tournament-groups/tournament-group.entity.d.ts.map +1 -1
  62. package/dist/tournaments/tournament-groups/tournament-group.entity.js +23 -5
  63. package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.d.ts.map +1 -1
  64. package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.js +44 -9
  65. package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.d.ts.map +1 -1
  66. package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.js +49 -12
  67. package/dist/tournaments/tournament-match-schemas/tournament-match-schema.entity.d.ts.map +1 -1
  68. package/dist/tournaments/tournament-match-schemas/tournament-match-schema.entity.js +29 -6
  69. package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts.map +1 -1
  70. package/dist/tournaments/tournament-matches/tournament-match.entity.js +54 -10
  71. package/dist/tournaments/tournament-payments/tournament-payment.entity.d.ts.map +1 -1
  72. package/dist/tournaments/tournament-payments/tournament-payment.entity.js +28 -6
  73. package/dist/tournaments/tournament-players/tournament-player.entity.d.ts.map +1 -1
  74. package/dist/tournaments/tournament-players/tournament-player.entity.js +29 -6
  75. package/dist/tournaments/tournament-prize-rules/tournament-prize-rule.entity.d.ts.map +1 -1
  76. package/dist/tournaments/tournament-prize-rules/tournament-prize-rule.entity.js +32 -7
  77. package/dist/tournaments/tournament-rules/tournament-rule.entity.d.ts.map +1 -1
  78. package/dist/tournaments/tournament-rules/tournament-rule.entity.js +44 -14
  79. package/dist/tournaments/tournament-teams/index.d.ts +0 -1
  80. package/dist/tournaments/tournament-teams/index.d.ts.map +1 -1
  81. package/dist/tournaments/tournament-teams/index.js +1 -3
  82. package/dist/tournaments/tournament-teams/tournament-team.entity.d.ts +1 -2
  83. package/dist/tournaments/tournament-teams/tournament-team.entity.d.ts.map +1 -1
  84. package/dist/tournaments/tournament-teams/tournament-team.entity.js +41 -14
  85. package/dist/tournaments/tournaments/tournament.entity.d.ts +4 -1
  86. package/dist/tournaments/tournaments/tournament.entity.d.ts.map +1 -1
  87. package/dist/tournaments/tournaments/tournament.entity.js +67 -21
  88. package/package.json +4 -4
  89. package/dist/tournaments/tournament-teams/enums/tournament-team-status.enum.d.ts +0 -5
  90. package/dist/tournaments/tournament-teams/enums/tournament-team-status.enum.d.ts.map +0 -1
  91. package/dist/tournaments/tournament-teams/enums/tournament-team-status.enum.js +0 -8
@@ -20,6 +20,7 @@ import {
20
20
  PrimaryGeneratedColumn,
21
21
  UpdateDateColumn
22
22
  } from "typeorm";
23
+ import { TournamentCoupon } from "tournaments/tournament-coupons/tournament-coupon.entity";
23
24
  import { TournamentFacility } from "../tournament-facilities/index.js";
24
25
  import { TournamentFormatConfig } from "../tournament-format-configs/index.js";
25
26
  import { TournamentGroup } from "../tournament-groups//index.js";
@@ -32,69 +33,111 @@ import { TournamentTeam } from "../tournament-teams/index.js";
32
33
  let Tournament = class {
33
34
  };
34
35
  __decorateClass([
35
- PrimaryGeneratedColumn()
36
+ PrimaryGeneratedColumn({ comment: "Identificador \xFAnico do torneio." })
36
37
  ], Tournament.prototype, "id", 2);
37
38
  __decorateClass([
38
- Column({ type: "varchar", length: 255 })
39
+ Column({ type: "varchar", length: 255, comment: "Nome do torneio." })
39
40
  ], Tournament.prototype, "name", 2);
40
41
  __decorateClass([
41
- Column({ name: "initial_date", type: "timestamptz" })
42
+ Column({ name: "initial_date", type: "timestamptz", comment: "Data de in\xEDcio do torneio." })
42
43
  ], Tournament.prototype, "initialDate", 2);
43
44
  __decorateClass([
44
- Column({ name: "end_date", type: "timestamptz" })
45
+ Column({ name: "end_date", type: "timestamptz", comment: "Data de t\xE9rmino do torneio." })
45
46
  ], Tournament.prototype, "endDate", 2);
46
47
  __decorateClass([
47
- Column({ type: "text", nullable: true })
48
+ Column({ type: "text", nullable: true, comment: "Descri\xE7\xE3o do torneio (opcional)." })
48
49
  ], Tournament.prototype, "description", 2);
49
50
  __decorateClass([
50
- Column({ name: "tournament_image", type: "text", nullable: true })
51
+ Column({
52
+ name: "tournament_image",
53
+ type: "text",
54
+ nullable: true,
55
+ comment: "Imagem do torneio (opcional)."
56
+ })
51
57
  ], Tournament.prototype, "tournamentImage", 2);
52
58
  __decorateClass([
53
- Column({ name: "match_schema_id", type: "int", nullable: true })
59
+ Column({
60
+ name: "match_schema_id",
61
+ type: "int",
62
+ nullable: true,
63
+ comment: "ID do esquema de partidas (opcional)."
64
+ })
54
65
  ], Tournament.prototype, "matchSchemaId", 2);
55
66
  __decorateClass([
56
- Column({ name: "rule_id", type: "int" })
67
+ Column({ name: "rule_id", type: "int", comment: "ID das regras associadas ao torneio." })
57
68
  ], Tournament.prototype, "ruleId", 2);
58
69
  __decorateClass([
59
- Column({ name: "format_config_id", type: "int" })
70
+ Column({
71
+ name: "format_config_id",
72
+ type: "int",
73
+ comment: "ID da configura\xE7\xE3o de formato do torneio."
74
+ })
60
75
  ], Tournament.prototype, "formatConfigId", 2);
61
76
  __decorateClass([
62
77
  Column({
63
78
  name: "match_days",
64
79
  type: "enum",
65
80
  enum: Object.values(DayOfWeek),
66
- array: true
81
+ array: true,
82
+ comment: "Dias da semana em que ocorrer\xE3o as partidas."
67
83
  })
68
84
  ], Tournament.prototype, "matchDays", 2);
69
85
  __decorateClass([
70
- Column({ name: "price_per_team", type: "int" })
71
- ], Tournament.prototype, "pricePerTeam", 2);
72
- __decorateClass([
73
- Column({ name: "match_start_time", type: "time" })
86
+ Column({ name: "match_start_time", type: "time", comment: "Hor\xE1rio de in\xEDcio das partidas." })
74
87
  ], Tournament.prototype, "matchStartTime", 2);
75
88
  __decorateClass([
76
- Column({ name: "match_end_time", type: "time" })
89
+ Column({ name: "match_end_time", type: "time", comment: "Hor\xE1rio de t\xE9rmino das partidas." })
77
90
  ], Tournament.prototype, "matchEndTime", 2);
78
91
  __decorateClass([
79
- Column({ type: "varchar", length: 100 })
92
+ Column({ type: "varchar", length: 100, comment: "Cidade onde o torneio ser\xE1 realizado." })
80
93
  ], Tournament.prototype, "city", 2);
81
94
  __decorateClass([
82
- Column({ type: "varchar", length: 2 })
95
+ Column({ type: "varchar", length: 2, comment: "Estado (UF) onde o torneio ser\xE1 realizado." })
83
96
  ], Tournament.prototype, "state", 2);
84
97
  __decorateClass([
85
98
  Column({
86
99
  type: "enum",
87
- enum: Object.values(TournamentGender)
100
+ enum: Object.values(TournamentGender),
101
+ comment: "G\xEAnero do torneio (masculino, feminino ou misto)."
88
102
  })
89
103
  ], Tournament.prototype, "gender", 2);
90
104
  __decorateClass([
91
- Column({ name: "deleted_at", type: "timestamptz", nullable: true })
105
+ Column({
106
+ name: "registration_fee",
107
+ type: "int",
108
+ default: 0,
109
+ comment: "Valor da taxa de inscri\xE7\xE3o (em centavos)."
110
+ })
111
+ ], Tournament.prototype, "registrationFee", 2);
112
+ __decorateClass([
113
+ Column({
114
+ name: "registration_fee",
115
+ type: "int",
116
+ default: 0,
117
+ comment: "Valor da taxa de arbitragem (em centavos)."
118
+ })
119
+ ], Tournament.prototype, "refereeFee", 2);
120
+ __decorateClass([
121
+ Column({
122
+ name: "deleted_at",
123
+ type: "timestamptz",
124
+ nullable: true,
125
+ comment: "Data de exclus\xE3o l\xF3gica do torneio."
126
+ })
92
127
  ], Tournament.prototype, "deletedAt", 2);
93
128
  __decorateClass([
94
- CreateDateColumn({ name: "created_at", type: "timestamptz" })
129
+ CreateDateColumn({
130
+ name: "created_at",
131
+ type: "timestamptz",
132
+ comment: "Data de cria\xE7\xE3o do torneio."
133
+ })
95
134
  ], Tournament.prototype, "createdAt", 2);
96
135
  __decorateClass([
97
- UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
136
+ UpdateDateColumn({
137
+ name: "updated_at",
138
+ type: "timestamptz",
139
+ comment: "Data da \xFAltima atualiza\xE7\xE3o do torneio."
140
+ })
98
141
  ], Tournament.prototype, "updatedAt", 2);
99
142
  __decorateClass([
100
143
  ManyToOne(() => TournamentMatchSchema, (matchSchema) => matchSchema.tournaments, {
@@ -128,6 +171,9 @@ __decorateClass([
128
171
  __decorateClass([
129
172
  OneToMany(() => TournamentFacility, (facility) => facility.tournament)
130
173
  ], Tournament.prototype, "tournamentFacilities", 2);
174
+ __decorateClass([
175
+ OneToMany(() => TournamentCoupon, (coupon) => coupon.tournament)
176
+ ], Tournament.prototype, "coupons", 2);
131
177
  Tournament = __decorateClass([
132
178
  Entity("tournaments")
133
179
  ], Tournament);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -29,10 +29,10 @@
29
29
  "@eslint/js": "^9.23.0",
30
30
  "@typescript-eslint/eslint-plugin": "^8.28.0",
31
31
  "@typescript-eslint/parser": "^8.28.0",
32
- "esbuild": "^0.25.1",
32
+ "esbuild": "^0.25.2",
33
33
  "eslint": "^9.23.0",
34
34
  "eslint-config-prettier": "^10.1.1",
35
- "eslint-import-resolver-typescript": "^4.2.5",
35
+ "eslint-import-resolver-typescript": "^4.3.1",
36
36
  "eslint-plugin-import": "^2.31.0",
37
37
  "eslint-plugin-prettier": "^5.2.5",
38
38
  "eslint-plugin-unused-imports": "^4.1.4",
@@ -43,7 +43,7 @@
43
43
  "ts-node": "^10.9.2"
44
44
  },
45
45
  "dependencies": {
46
- "@natrave/tournaments-service-types": "^1.1.17",
46
+ "@natrave/tournaments-service-types": "^1.1.21",
47
47
  "reflect-metadata": "^0.2.2",
48
48
  "typeorm": "^0.3.21"
49
49
  },
@@ -1,5 +0,0 @@
1
- export declare enum TournamentTeamStatus {
2
- DEFAULT = "default",
3
- REGISTERED = "registered"
4
- }
5
- //# sourceMappingURL=tournament-team-status.enum.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tournament-team-status.enum.d.ts","sourceRoot":"","sources":["../../../../src/tournaments/tournament-teams/enums/tournament-team-status.enum.ts"],"names":[],"mappings":"AASA,oBAAY,oBAAoB;IAK9B,OAAO,YAAY;IAKnB,UAAU,eAAe;CAC1B"}
@@ -1,8 +0,0 @@
1
- var TournamentTeamStatus = /* @__PURE__ */ ((TournamentTeamStatus2) => {
2
- TournamentTeamStatus2["DEFAULT"] = "default";
3
- TournamentTeamStatus2["REGISTERED"] = "registered";
4
- return TournamentTeamStatus2;
5
- })(TournamentTeamStatus || {});
6
- export {
7
- TournamentTeamStatus
8
- };