@natrave/shared-entities 1.1.8 → 1.2.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.
Files changed (273) hide show
  1. package/dist/app-auth/index.js +5 -6
  2. package/dist/app-auth/password-resets/index.js +4 -2
  3. package/dist/app-auth/password-resets/password-reset.entity.js +48 -45
  4. package/dist/app-auth/refresh-tokens/index.js +4 -2
  5. package/dist/app-auth/refresh-tokens/refresh-token.entity.js +48 -45
  6. package/dist/app-auth/user-auth-providers/enums/auth-provider.enum.js +9 -7
  7. package/dist/app-auth/user-auth-providers/index.js +6 -3
  8. package/dist/app-auth/user-auth-providers/user-auth-provider.entity.js +53 -50
  9. package/dist/app-auth/user-verifications/enums/verification-type.enum.js +8 -6
  10. package/dist/app-auth/user-verifications/index.js +6 -3
  11. package/dist/app-auth/user-verifications/user-verification.entity.js +57 -57
  12. package/dist/app-auth/users/index.js +4 -2
  13. package/dist/app-auth/users/user.entity.js +123 -133
  14. package/dist/app-auth/users/utils/format-data.utils.js +19 -17
  15. package/dist/common/utils/decimal-transformer.utils.js +15 -14
  16. package/dist/facilities/addresses/address.entity.js +79 -84
  17. package/dist/facilities/addresses/index.js +4 -2
  18. package/dist/facilities/facilities/enums/facility-status.enum.js +9 -7
  19. package/dist/facilities/facilities/facility.entity.js +118 -121
  20. package/dist/facilities/facilities/index.js +6 -3
  21. package/dist/facilities/facilities/utils/sanititze.utils.js +12 -10
  22. package/dist/facilities/facility-images/facility-image.entity.js +60 -56
  23. package/dist/facilities/facility-images/index.js +4 -2
  24. package/dist/facilities/facility-owners/facility-owner.entity.js +64 -62
  25. package/dist/facilities/facility-owners/index.js +4 -2
  26. package/dist/facilities/facility-owners/utils/sanitize.utils.js +10 -8
  27. package/dist/facilities/fields/enums/surface-type.enum.js +11 -9
  28. package/dist/facilities/fields/field.entity.js +69 -69
  29. package/dist/facilities/fields/index.js +6 -3
  30. package/dist/facilities/index.js +5 -6
  31. package/dist/index.js +4 -5
  32. package/dist/payments/index.js +3 -4
  33. package/dist/payments/payment-providers/enums/payment-provider-name.enum.js +7 -5
  34. package/dist/payments/payment-providers/index.js +6 -3
  35. package/dist/payments/payment-providers/payment-provider.entity.js +57 -47
  36. package/dist/payments/payments/enums/payment-method.enum.js +8 -6
  37. package/dist/payments/payments/enums/payment-status.enum.js +13 -11
  38. package/dist/payments/payments/index.js +8 -4
  39. package/dist/payments/payments/payment.entity.js +79 -82
  40. package/dist/payments/user-payment-providers/index.js +4 -2
  41. package/dist/payments/user-payment-providers/user-payment-provider.entity.js +62 -58
  42. package/dist/tournaments/index.js +12 -13
  43. package/dist/tournaments/tournament-facilities/index.js +4 -2
  44. package/dist/tournaments/tournament-facilities/tournament-facility.entity.js +62 -58
  45. package/dist/tournaments/tournament-format-configs/index.js +4 -2
  46. package/dist/tournaments/tournament-format-configs/tournament-format-config.entity.js +70 -73
  47. package/dist/tournaments/tournament-match-cards/index.js +4 -2
  48. package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.js +74 -72
  49. package/dist/tournaments/tournament-match-goals/index.js +4 -2
  50. package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.js +74 -76
  51. package/dist/tournaments/tournament-match-schemas/index.js +4 -2
  52. package/dist/tournaments/tournament-match-schemas/tournament-match-schema.entity.js +47 -44
  53. package/dist/tournaments/tournament-matches/index.js +4 -2
  54. package/dist/tournaments/tournament-matches/tournament-match.entity.js +89 -94
  55. package/dist/tournaments/tournament-payments/index.js +4 -2
  56. package/dist/tournaments/tournament-payments/tournament-payment.entity.js +57 -56
  57. package/dist/tournaments/tournament-players/index.js +4 -2
  58. package/dist/tournaments/tournament-players/tournament-player.entity.js +75 -73
  59. package/dist/tournaments/tournament-prize-rules/index.js +4 -2
  60. package/dist/tournaments/tournament-prize-rules/tournament-prize-rule.entity.js +56 -52
  61. package/dist/tournaments/tournament-rules/index.js +4 -2
  62. package/dist/tournaments/tournament-rules/tournament-rule.entity.js +73 -74
  63. package/dist/tournaments/tournament-teams/enums/tournament-team-status.enum.js +8 -6
  64. package/dist/tournaments/tournament-teams/index.js +6 -3
  65. package/dist/tournaments/tournament-teams/tournament-team.entity.js +93 -97
  66. package/dist/tournaments/tournament-teams/utils/invite-code-generator.js +5 -3
  67. package/dist/tournaments/tournaments/index.js +4 -2
  68. package/dist/tournaments/tournaments/tournament.entity.js +129 -144
  69. package/package.json +4 -2
  70. package/dist/app-auth/index.d.ts +0 -6
  71. package/dist/app-auth/index.d.ts.map +0 -1
  72. package/dist/app-auth/index.js.map +0 -1
  73. package/dist/app-auth/password-resets/index.d.ts +0 -2
  74. package/dist/app-auth/password-resets/index.d.ts.map +0 -1
  75. package/dist/app-auth/password-resets/index.js.map +0 -1
  76. package/dist/app-auth/password-resets/password-reset.entity.d.ts +0 -11
  77. package/dist/app-auth/password-resets/password-reset.entity.d.ts.map +0 -1
  78. package/dist/app-auth/password-resets/password-reset.entity.js.map +0 -1
  79. package/dist/app-auth/refresh-tokens/index.d.ts +0 -2
  80. package/dist/app-auth/refresh-tokens/index.d.ts.map +0 -1
  81. package/dist/app-auth/refresh-tokens/index.js.map +0 -1
  82. package/dist/app-auth/refresh-tokens/refresh-token.entity.d.ts +0 -11
  83. package/dist/app-auth/refresh-tokens/refresh-token.entity.d.ts.map +0 -1
  84. package/dist/app-auth/refresh-tokens/refresh-token.entity.js.map +0 -1
  85. package/dist/app-auth/user-auth-providers/enums/auth-provider.enum.d.ts +0 -6
  86. package/dist/app-auth/user-auth-providers/enums/auth-provider.enum.d.ts.map +0 -1
  87. package/dist/app-auth/user-auth-providers/enums/auth-provider.enum.js.map +0 -1
  88. package/dist/app-auth/user-auth-providers/index.d.ts +0 -3
  89. package/dist/app-auth/user-auth-providers/index.d.ts.map +0 -1
  90. package/dist/app-auth/user-auth-providers/index.js.map +0 -1
  91. package/dist/app-auth/user-auth-providers/user-auth-provider.entity.d.ts +0 -13
  92. package/dist/app-auth/user-auth-providers/user-auth-provider.entity.d.ts.map +0 -1
  93. package/dist/app-auth/user-auth-providers/user-auth-provider.entity.js.map +0 -1
  94. package/dist/app-auth/user-verifications/enums/verification-type.enum.d.ts +0 -5
  95. package/dist/app-auth/user-verifications/enums/verification-type.enum.d.ts.map +0 -1
  96. package/dist/app-auth/user-verifications/enums/verification-type.enum.js.map +0 -1
  97. package/dist/app-auth/user-verifications/index.d.ts +0 -3
  98. package/dist/app-auth/user-verifications/index.d.ts.map +0 -1
  99. package/dist/app-auth/user-verifications/index.js.map +0 -1
  100. package/dist/app-auth/user-verifications/user-verification.entity.d.ts +0 -15
  101. package/dist/app-auth/user-verifications/user-verification.entity.d.ts.map +0 -1
  102. package/dist/app-auth/user-verifications/user-verification.entity.js.map +0 -1
  103. package/dist/app-auth/users/index.d.ts +0 -2
  104. package/dist/app-auth/users/index.d.ts.map +0 -1
  105. package/dist/app-auth/users/index.js.map +0 -1
  106. package/dist/app-auth/users/user.entity.d.ts +0 -29
  107. package/dist/app-auth/users/user.entity.d.ts.map +0 -1
  108. package/dist/app-auth/users/user.entity.js.map +0 -1
  109. package/dist/app-auth/users/utils/format-data.utils.d.ts +0 -7
  110. package/dist/app-auth/users/utils/format-data.utils.d.ts.map +0 -1
  111. package/dist/app-auth/users/utils/format-data.utils.js.map +0 -1
  112. package/dist/common/utils/decimal-transformer.utils.d.ts +0 -5
  113. package/dist/common/utils/decimal-transformer.utils.d.ts.map +0 -1
  114. package/dist/common/utils/decimal-transformer.utils.js.map +0 -1
  115. package/dist/facilities/addresses/address.entity.d.ts +0 -18
  116. package/dist/facilities/addresses/address.entity.d.ts.map +0 -1
  117. package/dist/facilities/addresses/address.entity.js.map +0 -1
  118. package/dist/facilities/addresses/index.d.ts +0 -2
  119. package/dist/facilities/addresses/index.d.ts.map +0 -1
  120. package/dist/facilities/addresses/index.js.map +0 -1
  121. package/dist/facilities/facilities/enums/facility-status.enum.d.ts +0 -6
  122. package/dist/facilities/facilities/enums/facility-status.enum.d.ts.map +0 -1
  123. package/dist/facilities/facilities/enums/facility-status.enum.js.map +0 -1
  124. package/dist/facilities/facilities/facility.entity.d.ts +0 -26
  125. package/dist/facilities/facilities/facility.entity.d.ts.map +0 -1
  126. package/dist/facilities/facilities/facility.entity.js.map +0 -1
  127. package/dist/facilities/facilities/index.d.ts +0 -3
  128. package/dist/facilities/facilities/index.d.ts.map +0 -1
  129. package/dist/facilities/facilities/index.js.map +0 -1
  130. package/dist/facilities/facilities/utils/sanititze.utils.d.ts +0 -5
  131. package/dist/facilities/facilities/utils/sanititze.utils.d.ts.map +0 -1
  132. package/dist/facilities/facilities/utils/sanititze.utils.js.map +0 -1
  133. package/dist/facilities/facility-images/facility-image.entity.d.ts +0 -12
  134. package/dist/facilities/facility-images/facility-image.entity.d.ts.map +0 -1
  135. package/dist/facilities/facility-images/facility-image.entity.js.map +0 -1
  136. package/dist/facilities/facility-images/index.d.ts +0 -2
  137. package/dist/facilities/facility-images/index.d.ts.map +0 -1
  138. package/dist/facilities/facility-images/index.js.map +0 -1
  139. package/dist/facilities/facility-owners/facility-owner.entity.d.ts +0 -13
  140. package/dist/facilities/facility-owners/facility-owner.entity.d.ts.map +0 -1
  141. package/dist/facilities/facility-owners/facility-owner.entity.js.map +0 -1
  142. package/dist/facilities/facility-owners/index.d.ts +0 -2
  143. package/dist/facilities/facility-owners/index.d.ts.map +0 -1
  144. package/dist/facilities/facility-owners/index.js.map +0 -1
  145. package/dist/facilities/facility-owners/utils/sanitize.utils.d.ts +0 -5
  146. package/dist/facilities/facility-owners/utils/sanitize.utils.d.ts.map +0 -1
  147. package/dist/facilities/facility-owners/utils/sanitize.utils.js.map +0 -1
  148. package/dist/facilities/fields/enums/surface-type.enum.d.ts +0 -8
  149. package/dist/facilities/fields/enums/surface-type.enum.d.ts.map +0 -1
  150. package/dist/facilities/fields/enums/surface-type.enum.js.map +0 -1
  151. package/dist/facilities/fields/field.entity.d.ts +0 -18
  152. package/dist/facilities/fields/field.entity.d.ts.map +0 -1
  153. package/dist/facilities/fields/field.entity.js.map +0 -1
  154. package/dist/facilities/fields/index.d.ts +0 -3
  155. package/dist/facilities/fields/index.d.ts.map +0 -1
  156. package/dist/facilities/fields/index.js.map +0 -1
  157. package/dist/facilities/index.d.ts +0 -6
  158. package/dist/facilities/index.d.ts.map +0 -1
  159. package/dist/facilities/index.js.map +0 -1
  160. package/dist/index.d.ts +0 -5
  161. package/dist/index.d.ts.map +0 -1
  162. package/dist/index.js.map +0 -1
  163. package/dist/payments/index.d.ts +0 -4
  164. package/dist/payments/index.d.ts.map +0 -1
  165. package/dist/payments/index.js.map +0 -1
  166. package/dist/payments/payment-providers/enums/payment-provider-name.enum.d.ts +0 -4
  167. package/dist/payments/payment-providers/enums/payment-provider-name.enum.d.ts.map +0 -1
  168. package/dist/payments/payment-providers/enums/payment-provider-name.enum.js.map +0 -1
  169. package/dist/payments/payment-providers/index.d.ts +0 -3
  170. package/dist/payments/payment-providers/index.d.ts.map +0 -1
  171. package/dist/payments/payment-providers/index.js.map +0 -1
  172. package/dist/payments/payment-providers/payment-provider.entity.d.ts +0 -10
  173. package/dist/payments/payment-providers/payment-provider.entity.d.ts.map +0 -1
  174. package/dist/payments/payment-providers/payment-provider.entity.js.map +0 -1
  175. package/dist/payments/payments/enums/payment-method.enum.d.ts +0 -5
  176. package/dist/payments/payments/enums/payment-method.enum.d.ts.map +0 -1
  177. package/dist/payments/payments/enums/payment-method.enum.js.map +0 -1
  178. package/dist/payments/payments/enums/payment-status.enum.d.ts +0 -10
  179. package/dist/payments/payments/enums/payment-status.enum.d.ts.map +0 -1
  180. package/dist/payments/payments/enums/payment-status.enum.js.map +0 -1
  181. package/dist/payments/payments/index.d.ts +0 -4
  182. package/dist/payments/payments/index.d.ts.map +0 -1
  183. package/dist/payments/payments/index.js.map +0 -1
  184. package/dist/payments/payments/payment.entity.d.ts +0 -19
  185. package/dist/payments/payments/payment.entity.d.ts.map +0 -1
  186. package/dist/payments/payments/payment.entity.js.map +0 -1
  187. package/dist/payments/user-payment-providers/index.d.ts +0 -2
  188. package/dist/payments/user-payment-providers/index.d.ts.map +0 -1
  189. package/dist/payments/user-payment-providers/index.js.map +0 -1
  190. package/dist/payments/user-payment-providers/user-payment-provider.entity.d.ts +0 -13
  191. package/dist/payments/user-payment-providers/user-payment-provider.entity.d.ts.map +0 -1
  192. package/dist/payments/user-payment-providers/user-payment-provider.entity.js.map +0 -1
  193. package/dist/tournaments/index.d.ts +0 -13
  194. package/dist/tournaments/index.d.ts.map +0 -1
  195. package/dist/tournaments/index.js.map +0 -1
  196. package/dist/tournaments/tournament-facilities/index.d.ts +0 -2
  197. package/dist/tournaments/tournament-facilities/index.d.ts.map +0 -1
  198. package/dist/tournaments/tournament-facilities/index.js.map +0 -1
  199. package/dist/tournaments/tournament-facilities/tournament-facility.entity.d.ts +0 -14
  200. package/dist/tournaments/tournament-facilities/tournament-facility.entity.d.ts.map +0 -1
  201. package/dist/tournaments/tournament-facilities/tournament-facility.entity.js.map +0 -1
  202. package/dist/tournaments/tournament-format-configs/index.d.ts +0 -2
  203. package/dist/tournaments/tournament-format-configs/index.d.ts.map +0 -1
  204. package/dist/tournaments/tournament-format-configs/index.js.map +0 -1
  205. package/dist/tournaments/tournament-format-configs/tournament-format-config.entity.d.ts +0 -15
  206. package/dist/tournaments/tournament-format-configs/tournament-format-config.entity.d.ts.map +0 -1
  207. package/dist/tournaments/tournament-format-configs/tournament-format-config.entity.js.map +0 -1
  208. package/dist/tournaments/tournament-match-cards/index.d.ts +0 -2
  209. package/dist/tournaments/tournament-match-cards/index.d.ts.map +0 -1
  210. package/dist/tournaments/tournament-match-cards/index.js.map +0 -1
  211. package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.d.ts +0 -19
  212. package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.d.ts.map +0 -1
  213. package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.js.map +0 -1
  214. package/dist/tournaments/tournament-match-goals/index.d.ts +0 -2
  215. package/dist/tournaments/tournament-match-goals/index.d.ts.map +0 -1
  216. package/dist/tournaments/tournament-match-goals/index.js.map +0 -1
  217. package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.d.ts +0 -20
  218. package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.d.ts.map +0 -1
  219. package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.js.map +0 -1
  220. package/dist/tournaments/tournament-match-schemas/index.d.ts +0 -2
  221. package/dist/tournaments/tournament-match-schemas/index.d.ts.map +0 -1
  222. package/dist/tournaments/tournament-match-schemas/index.js.map +0 -1
  223. package/dist/tournaments/tournament-match-schemas/tournament-match-schema.entity.d.ts +0 -12
  224. package/dist/tournaments/tournament-match-schemas/tournament-match-schema.entity.d.ts.map +0 -1
  225. package/dist/tournaments/tournament-match-schemas/tournament-match-schema.entity.js.map +0 -1
  226. package/dist/tournaments/tournament-matches/index.d.ts +0 -2
  227. package/dist/tournaments/tournament-matches/index.d.ts.map +0 -1
  228. package/dist/tournaments/tournament-matches/index.js.map +0 -1
  229. package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts +0 -25
  230. package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts.map +0 -1
  231. package/dist/tournaments/tournament-matches/tournament-match.entity.js.map +0 -1
  232. package/dist/tournaments/tournament-payments/index.d.ts +0 -2
  233. package/dist/tournaments/tournament-payments/index.d.ts.map +0 -1
  234. package/dist/tournaments/tournament-payments/index.js.map +0 -1
  235. package/dist/tournaments/tournament-payments/tournament-payment.entity.d.ts +0 -16
  236. package/dist/tournaments/tournament-payments/tournament-payment.entity.d.ts.map +0 -1
  237. package/dist/tournaments/tournament-payments/tournament-payment.entity.js.map +0 -1
  238. package/dist/tournaments/tournament-players/index.d.ts +0 -2
  239. package/dist/tournaments/tournament-players/index.d.ts.map +0 -1
  240. package/dist/tournaments/tournament-players/index.js.map +0 -1
  241. package/dist/tournaments/tournament-players/tournament-player.entity.d.ts +0 -19
  242. package/dist/tournaments/tournament-players/tournament-player.entity.d.ts.map +0 -1
  243. package/dist/tournaments/tournament-players/tournament-player.entity.js.map +0 -1
  244. package/dist/tournaments/tournament-prize-rules/index.d.ts +0 -2
  245. package/dist/tournaments/tournament-prize-rules/index.d.ts.map +0 -1
  246. package/dist/tournaments/tournament-prize-rules/index.js.map +0 -1
  247. package/dist/tournaments/tournament-prize-rules/tournament-prize-rule.entity.d.ts +0 -13
  248. package/dist/tournaments/tournament-prize-rules/tournament-prize-rule.entity.d.ts.map +0 -1
  249. package/dist/tournaments/tournament-prize-rules/tournament-prize-rule.entity.js.map +0 -1
  250. package/dist/tournaments/tournament-rules/index.d.ts +0 -2
  251. package/dist/tournaments/tournament-rules/index.d.ts.map +0 -1
  252. package/dist/tournaments/tournament-rules/index.js.map +0 -1
  253. package/dist/tournaments/tournament-rules/tournament-rule.entity.d.ts +0 -17
  254. package/dist/tournaments/tournament-rules/tournament-rule.entity.d.ts.map +0 -1
  255. package/dist/tournaments/tournament-rules/tournament-rule.entity.js.map +0 -1
  256. package/dist/tournaments/tournament-teams/enums/tournament-team-status.enum.d.ts +0 -5
  257. package/dist/tournaments/tournament-teams/enums/tournament-team-status.enum.d.ts.map +0 -1
  258. package/dist/tournaments/tournament-teams/enums/tournament-team-status.enum.js.map +0 -1
  259. package/dist/tournaments/tournament-teams/index.d.ts +0 -3
  260. package/dist/tournaments/tournament-teams/index.d.ts.map +0 -1
  261. package/dist/tournaments/tournament-teams/index.js.map +0 -1
  262. package/dist/tournaments/tournament-teams/tournament-team.entity.d.ts +0 -26
  263. package/dist/tournaments/tournament-teams/tournament-team.entity.d.ts.map +0 -1
  264. package/dist/tournaments/tournament-teams/tournament-team.entity.js.map +0 -1
  265. package/dist/tournaments/tournament-teams/utils/invite-code-generator.d.ts +0 -2
  266. package/dist/tournaments/tournament-teams/utils/invite-code-generator.d.ts.map +0 -1
  267. package/dist/tournaments/tournament-teams/utils/invite-code-generator.js.map +0 -1
  268. package/dist/tournaments/tournaments/index.d.ts +0 -2
  269. package/dist/tournaments/tournaments/index.d.ts.map +0 -1
  270. package/dist/tournaments/tournaments/index.js.map +0 -1
  271. package/dist/tournaments/tournaments/tournament.entity.d.ts +0 -39
  272. package/dist/tournaments/tournaments/tournament.entity.d.ts.map +0 -1
  273. package/dist/tournaments/tournaments/tournament.entity.js.map +0 -1
@@ -1,76 +1,78 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
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;
6
10
  };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11
+ import {
12
+ Column,
13
+ CreateDateColumn,
14
+ Entity,
15
+ Index,
16
+ JoinColumn,
17
+ ManyToOne,
18
+ OneToMany,
19
+ PrimaryGeneratedColumn,
20
+ Unique,
21
+ UpdateDateColumn
22
+ } from "typeorm";
23
+ import { User } from "../../app-auth";
24
+ import { TournamentMatchCard } from "../tournament-match-cards";
25
+ import { TournamentMatchGoal } from "../tournament-match-goals";
26
+ import { TournamentTeam } from "../tournament-teams";
27
+ let TournamentPlayer = class {
9
28
  };
10
- import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn, ManyToOne, JoinColumn, Unique, Index, OneToMany, } from 'typeorm';
11
- import { User } from 'app-auth';
12
- import { TournamentMatchCard } from 'tournaments/tournament-match-cards';
13
- import { TournamentMatchGoal } from 'tournaments/tournament-match-goals';
14
- import { TournamentTeam } from 'tournaments/tournament-teams';
15
- let TournamentPlayer = class TournamentPlayer {
16
- };
17
- __decorate([
18
- PrimaryGeneratedColumn(),
19
- __metadata("design:type", Number)
20
- ], TournamentPlayer.prototype, "id", void 0);
21
- __decorate([
22
- Column({ name: 'user_id', type: 'uuid' }),
23
- __metadata("design:type", String)
24
- ], TournamentPlayer.prototype, "userId", void 0);
25
- __decorate([
26
- Column({ name: 'team_id', type: 'int' }),
27
- __metadata("design:type", Number)
28
- ], TournamentPlayer.prototype, "teamId", void 0);
29
- __decorate([
30
- Column({ name: 'is_owner', type: 'boolean', default: false }),
31
- __metadata("design:type", Boolean)
32
- ], TournamentPlayer.prototype, "isOwner", void 0);
33
- __decorate([
34
- CreateDateColumn({ name: 'created_at', type: 'timestamptz' }),
35
- __metadata("design:type", Date)
36
- ], TournamentPlayer.prototype, "createdAt", void 0);
37
- __decorate([
38
- UpdateDateColumn({ name: 'updated_at', type: 'timestamptz' }),
39
- __metadata("design:type", Date)
40
- ], TournamentPlayer.prototype, "updatedAt", void 0);
41
- __decorate([
42
- ManyToOne(() => TournamentTeam, (team) => team.players, {
43
- onDelete: 'CASCADE',
44
- eager: true,
45
- }),
46
- JoinColumn({ name: 'team_id' }),
47
- __metadata("design:type", TournamentTeam)
48
- ], TournamentPlayer.prototype, "team", void 0);
49
- __decorate([
50
- ManyToOne(() => User, (user) => user.tournamentPlayers, {
51
- onDelete: 'CASCADE',
52
- eager: true,
53
- }),
54
- JoinColumn({ name: 'user_id' }),
55
- __metadata("design:type", User)
56
- ], TournamentPlayer.prototype, "user", void 0);
57
- __decorate([
58
- OneToMany(() => TournamentMatchGoal, (goal) => goal.scorer),
59
- __metadata("design:type", Array)
60
- ], TournamentPlayer.prototype, "goals", void 0);
61
- __decorate([
62
- OneToMany(() => TournamentMatchGoal, (goal) => goal.assist),
63
- __metadata("design:type", Array)
64
- ], TournamentPlayer.prototype, "assists", void 0);
65
- __decorate([
66
- OneToMany(() => TournamentMatchCard, (card) => card.player),
67
- __metadata("design:type", Array)
68
- ], TournamentPlayer.prototype, "cards", void 0);
69
- TournamentPlayer = __decorate([
70
- Entity('tournament_players'),
71
- Unique(['userId', 'teamId']),
72
- Index('IDX_user_id', ['userId']),
73
- Index('IDX_team_id', ['teamId'])
29
+ __decorateClass([
30
+ PrimaryGeneratedColumn()
31
+ ], TournamentPlayer.prototype, "id", 2);
32
+ __decorateClass([
33
+ Column({ name: "user_id", type: "uuid" })
34
+ ], TournamentPlayer.prototype, "userId", 2);
35
+ __decorateClass([
36
+ Column({ name: "team_id", type: "int" })
37
+ ], TournamentPlayer.prototype, "teamId", 2);
38
+ __decorateClass([
39
+ Column({ name: "is_owner", type: "boolean", default: false })
40
+ ], TournamentPlayer.prototype, "isOwner", 2);
41
+ __decorateClass([
42
+ CreateDateColumn({ name: "created_at", type: "timestamptz" })
43
+ ], TournamentPlayer.prototype, "createdAt", 2);
44
+ __decorateClass([
45
+ UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
46
+ ], TournamentPlayer.prototype, "updatedAt", 2);
47
+ __decorateClass([
48
+ ManyToOne(() => TournamentTeam, (team) => team.players, {
49
+ onDelete: "CASCADE",
50
+ eager: true
51
+ }),
52
+ JoinColumn({ name: "team_id" })
53
+ ], TournamentPlayer.prototype, "team", 2);
54
+ __decorateClass([
55
+ ManyToOne(() => User, (user) => user.tournamentPlayers, {
56
+ onDelete: "CASCADE",
57
+ eager: true
58
+ }),
59
+ JoinColumn({ name: "user_id" })
60
+ ], TournamentPlayer.prototype, "user", 2);
61
+ __decorateClass([
62
+ OneToMany(() => TournamentMatchGoal, (goal) => goal.scorer)
63
+ ], TournamentPlayer.prototype, "goals", 2);
64
+ __decorateClass([
65
+ OneToMany(() => TournamentMatchGoal, (goal) => goal.assist)
66
+ ], TournamentPlayer.prototype, "assists", 2);
67
+ __decorateClass([
68
+ OneToMany(() => TournamentMatchCard, (card) => card.player)
69
+ ], TournamentPlayer.prototype, "cards", 2);
70
+ TournamentPlayer = __decorateClass([
71
+ Entity("tournament_players"),
72
+ Unique(["userId", "teamId"]),
73
+ Index("IDX_user_id", ["userId"]),
74
+ Index("IDX_team_id", ["teamId"])
74
75
  ], TournamentPlayer);
75
- export { TournamentPlayer };
76
- //# sourceMappingURL=tournament-player.entity.js.map
76
+ export {
77
+ TournamentPlayer
78
+ };
@@ -1,2 +1,4 @@
1
- export { TournamentPrizeRule } from './tournament-prize-rule.entity';
2
- //# sourceMappingURL=index.js.map
1
+ import { TournamentPrizeRule } from "./tournament-prize-rule.entity.js";
2
+ export {
3
+ TournamentPrizeRule
4
+ };
@@ -1,55 +1,59 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
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;
6
10
  };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11
+ import {
12
+ Check,
13
+ Column,
14
+ CreateDateColumn,
15
+ Entity,
16
+ Index,
17
+ JoinColumn,
18
+ ManyToOne,
19
+ PrimaryGeneratedColumn,
20
+ UpdateDateColumn
21
+ } from "typeorm";
22
+ import { Tournament } from "../tournaments";
23
+ let TournamentPrizeRule = class {
9
24
  };
10
- import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn, Index, Check, ManyToOne, JoinColumn, } from 'typeorm';
11
- import { Tournament } from 'tournaments/tournaments';
12
- let TournamentPrizeRule = class TournamentPrizeRule {
13
- };
14
- __decorate([
15
- PrimaryGeneratedColumn(),
16
- __metadata("design:type", Number)
17
- ], TournamentPrizeRule.prototype, "id", void 0);
18
- __decorate([
19
- Column({ name: 'tournament_id', type: 'int' }),
20
- __metadata("design:type", Number)
21
- ], TournamentPrizeRule.prototype, "tournamentId", void 0);
22
- __decorate([
23
- Column({ type: 'int' }),
24
- __metadata("design:type", Number)
25
- ], TournamentPrizeRule.prototype, "amount", void 0);
26
- __decorate([
27
- Column({ type: 'int' }),
28
- __metadata("design:type", Number)
29
- ], TournamentPrizeRule.prototype, "rank", void 0);
30
- __decorate([
31
- Column({ type: 'varchar', length: 255, nullable: true }),
32
- __metadata("design:type", String)
33
- ], TournamentPrizeRule.prototype, "description", void 0);
34
- __decorate([
35
- CreateDateColumn({ name: 'created_at', type: 'timestamptz' }),
36
- __metadata("design:type", Date)
37
- ], TournamentPrizeRule.prototype, "createdAt", void 0);
38
- __decorate([
39
- UpdateDateColumn({ name: 'updated_at', type: 'timestamptz' }),
40
- __metadata("design:type", Date)
41
- ], TournamentPrizeRule.prototype, "updatedAt", void 0);
42
- __decorate([
43
- ManyToOne(() => Tournament, (tournament) => tournament.prizeRules, {
44
- onDelete: 'CASCADE',
45
- }),
46
- JoinColumn({ name: 'tournament_id' }),
47
- __metadata("design:type", Tournament)
48
- ], TournamentPrizeRule.prototype, "tournament", void 0);
49
- TournamentPrizeRule = __decorate([
50
- Entity('tournament_prize_rules'),
51
- Index(['tournamentId', 'rank']),
52
- Check('CHK_TOURNAMENT_PRIZE_RULES_NON_NEGATIVE', 'amount >= 0 AND rank >= 0')
25
+ __decorateClass([
26
+ PrimaryGeneratedColumn()
27
+ ], TournamentPrizeRule.prototype, "id", 2);
28
+ __decorateClass([
29
+ Column({ name: "tournament_id", type: "int" })
30
+ ], TournamentPrizeRule.prototype, "tournamentId", 2);
31
+ __decorateClass([
32
+ Column({ type: "int" })
33
+ ], TournamentPrizeRule.prototype, "amount", 2);
34
+ __decorateClass([
35
+ Column({ type: "int" })
36
+ ], TournamentPrizeRule.prototype, "rank", 2);
37
+ __decorateClass([
38
+ Column({ type: "varchar", length: 255, nullable: true })
39
+ ], TournamentPrizeRule.prototype, "description", 2);
40
+ __decorateClass([
41
+ CreateDateColumn({ name: "created_at", type: "timestamptz" })
42
+ ], TournamentPrizeRule.prototype, "createdAt", 2);
43
+ __decorateClass([
44
+ UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
45
+ ], TournamentPrizeRule.prototype, "updatedAt", 2);
46
+ __decorateClass([
47
+ ManyToOne(() => Tournament, (tournament) => tournament.prizeRules, {
48
+ onDelete: "CASCADE"
49
+ }),
50
+ JoinColumn({ name: "tournament_id" })
51
+ ], TournamentPrizeRule.prototype, "tournament", 2);
52
+ TournamentPrizeRule = __decorateClass([
53
+ Entity("tournament_prize_rules"),
54
+ Index(["tournamentId", "rank"]),
55
+ Check("CHK_TOURNAMENT_PRIZE_RULES_NON_NEGATIVE", "amount >= 0 AND rank >= 0")
53
56
  ], TournamentPrizeRule);
54
- export { TournamentPrizeRule };
55
- //# sourceMappingURL=tournament-prize-rule.entity.js.map
57
+ export {
58
+ TournamentPrizeRule
59
+ };
@@ -1,2 +1,4 @@
1
- export { TournamentRule } from './tournament-rule.entity';
2
- //# sourceMappingURL=index.js.map
1
+ import { TournamentRule } from "./tournament-rule.entity.js";
2
+ export {
3
+ TournamentRule
4
+ };
@@ -1,77 +1,76 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
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;
6
10
  };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11
+ import {
12
+ Check,
13
+ Column,
14
+ CreateDateColumn,
15
+ Entity,
16
+ JoinColumn,
17
+ OneToOne,
18
+ PrimaryGeneratedColumn,
19
+ UpdateDateColumn
20
+ } from "typeorm";
21
+ import { Tournament } from "../tournaments";
22
+ let TournamentRule = class {
9
23
  };
10
- import { Check, Column, CreateDateColumn, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn, } from 'typeorm';
11
- import { Tournament } from 'tournaments/tournaments';
12
- let TournamentRule = class TournamentRule {
13
- };
14
- __decorate([
15
- PrimaryGeneratedColumn(),
16
- __metadata("design:type", Number)
17
- ], TournamentRule.prototype, "id", void 0);
18
- __decorate([
19
- Column({ name: 'tournament_id', type: 'int', unique: true }),
20
- __metadata("design:type", Number)
21
- ], TournamentRule.prototype, "tournamentId", void 0);
22
- __decorate([
23
- Column({ name: 'max_player_per_team', type: 'int' }),
24
- __metadata("design:type", Number)
25
- ], TournamentRule.prototype, "maxPlayerPerTeam", void 0);
26
- __decorate([
27
- Column({ name: 'min_player_per_team', type: 'int' }),
28
- __metadata("design:type", Number)
29
- ], TournamentRule.prototype, "minPlayerPerTeam", void 0);
30
- __decorate([
31
- Column({ name: 'min_age', type: 'int' }),
32
- __metadata("design:type", Number)
33
- ], TournamentRule.prototype, "minAge", void 0);
34
- __decorate([
35
- Column({ name: 'max_age', type: 'int', nullable: true }),
36
- __metadata("design:type", Number)
37
- ], TournamentRule.prototype, "maxAge", void 0);
38
- __decorate([
39
- Column({ name: 'expected_teams', type: 'int' }),
40
- __metadata("design:type", Number)
41
- ], TournamentRule.prototype, "expectedTeams", void 0);
42
- __decorate([
43
- Column({ type: 'varchar', length: 255, nullable: true }),
44
- __metadata("design:type", String)
45
- ], TournamentRule.prototype, "notes", void 0);
46
- __decorate([
47
- Column({
48
- name: 'regulation_pdf_url',
49
- type: 'varchar',
50
- length: 500,
51
- nullable: true,
52
- }),
53
- __metadata("design:type", String)
54
- ], TournamentRule.prototype, "regulationPdfUrl", void 0);
55
- __decorate([
56
- CreateDateColumn({ name: 'created_at', type: 'timestamptz' }),
57
- __metadata("design:type", Date)
58
- ], TournamentRule.prototype, "createdAt", void 0);
59
- __decorate([
60
- UpdateDateColumn({ name: 'updated_at', type: 'timestamptz' }),
61
- __metadata("design:type", Date)
62
- ], TournamentRule.prototype, "updatedAt", void 0);
63
- __decorate([
64
- OneToOne(() => Tournament, (tournament) => tournament.rule, {
65
- cascade: true,
66
- }),
67
- JoinColumn({ name: 'tournament_id' }),
68
- __metadata("design:type", Tournament)
69
- ], TournamentRule.prototype, "tournament", void 0);
70
- TournamentRule = __decorate([
71
- Entity('tournament_rules'),
72
- Check('CHK_PLAYERS_PER_TEAM', '"max_player_per_team" >= "min_player_per_team"'),
73
- Check('CHK_MIN_AGE', '"min_age" >= 0'),
74
- Check('CHK_MAX_AGE', '"max_age" IS NULL OR "max_age" > "min_age"')
24
+ __decorateClass([
25
+ PrimaryGeneratedColumn()
26
+ ], TournamentRule.prototype, "id", 2);
27
+ __decorateClass([
28
+ Column({ name: "tournament_id", type: "int", unique: true })
29
+ ], TournamentRule.prototype, "tournamentId", 2);
30
+ __decorateClass([
31
+ Column({ name: "max_player_per_team", type: "int" })
32
+ ], TournamentRule.prototype, "maxPlayerPerTeam", 2);
33
+ __decorateClass([
34
+ Column({ name: "min_player_per_team", type: "int" })
35
+ ], TournamentRule.prototype, "minPlayerPerTeam", 2);
36
+ __decorateClass([
37
+ Column({ name: "min_age", type: "int" })
38
+ ], TournamentRule.prototype, "minAge", 2);
39
+ __decorateClass([
40
+ Column({ name: "max_age", type: "int", nullable: true })
41
+ ], TournamentRule.prototype, "maxAge", 2);
42
+ __decorateClass([
43
+ Column({ name: "expected_teams", type: "int" })
44
+ ], TournamentRule.prototype, "expectedTeams", 2);
45
+ __decorateClass([
46
+ Column({ type: "varchar", length: 255, nullable: true })
47
+ ], TournamentRule.prototype, "notes", 2);
48
+ __decorateClass([
49
+ Column({
50
+ name: "regulation_pdf_url",
51
+ type: "varchar",
52
+ length: 500,
53
+ nullable: true
54
+ })
55
+ ], TournamentRule.prototype, "regulationPdfUrl", 2);
56
+ __decorateClass([
57
+ CreateDateColumn({ name: "created_at", type: "timestamptz" })
58
+ ], TournamentRule.prototype, "createdAt", 2);
59
+ __decorateClass([
60
+ UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
61
+ ], TournamentRule.prototype, "updatedAt", 2);
62
+ __decorateClass([
63
+ OneToOne(() => Tournament, (tournament) => tournament.rule, {
64
+ cascade: true
65
+ }),
66
+ JoinColumn({ name: "tournament_id" })
67
+ ], TournamentRule.prototype, "tournament", 2);
68
+ TournamentRule = __decorateClass([
69
+ Entity("tournament_rules"),
70
+ Check("CHK_PLAYERS_PER_TEAM", '"max_player_per_team" >= "min_player_per_team"'),
71
+ Check("CHK_MIN_AGE", '"min_age" >= 0'),
72
+ Check("CHK_MAX_AGE", '"max_age" IS NULL OR "max_age" > "min_age"')
75
73
  ], TournamentRule);
76
- export { TournamentRule };
77
- //# sourceMappingURL=tournament-rule.entity.js.map
74
+ export {
75
+ TournamentRule
76
+ };
@@ -1,6 +1,8 @@
1
- export var TournamentTeamStatus;
2
- (function (TournamentTeamStatus) {
3
- TournamentTeamStatus["DEFAULT"] = "default";
4
- TournamentTeamStatus["REGISTERED"] = "registered";
5
- })(TournamentTeamStatus || (TournamentTeamStatus = {}));
6
- //# sourceMappingURL=tournament-team-status.enum.js.map
1
+ var TournamentTeamStatus = /* @__PURE__ */ ((TournamentTeamStatus2) => {
2
+ TournamentTeamStatus2["DEFAULT"] = "default";
3
+ TournamentTeamStatus2["REGISTERED"] = "registered";
4
+ return TournamentTeamStatus2;
5
+ })(TournamentTeamStatus || {});
6
+ export {
7
+ TournamentTeamStatus
8
+ };
@@ -1,3 +1,6 @@
1
- export { TournamentTeam } from './tournament-team.entity';
2
- export { TournamentTeamStatus } from './enums/tournament-team-status.enum';
3
- //# sourceMappingURL=index.js.map
1
+ import { TournamentTeam } from "./tournament-team.entity.js";
2
+ import { TournamentTeamStatus } from "./enums/tournament-team-status.enum.js";
3
+ export {
4
+ TournamentTeam,
5
+ TournamentTeamStatus
6
+ };