@natrave/shared-entities 1.4.108 → 1.5.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.
Files changed (64) hide show
  1. package/dist/app-auth/users/user.entity.d.ts +2 -2
  2. package/dist/app-auth/users/user.entity.d.ts.map +1 -1
  3. package/dist/app-auth/users/user.entity.js +4 -3
  4. package/dist/database-entities/index.d.ts +3 -3
  5. package/dist/database-entities/index.d.ts.map +1 -1
  6. package/dist/database-entities/index.js +5 -2
  7. package/dist/notifications/enums/index.d.ts +4 -0
  8. package/dist/notifications/enums/index.d.ts.map +1 -0
  9. package/dist/notifications/enums/index.js +8 -0
  10. package/dist/notifications/enums/notification-channel.enum.d.ts +8 -0
  11. package/dist/notifications/enums/notification-channel.enum.d.ts.map +1 -0
  12. package/dist/notifications/enums/notification-channel.enum.js +11 -0
  13. package/dist/notifications/enums/notification-delivery-status.enum.d.ts +9 -0
  14. package/dist/notifications/enums/notification-delivery-status.enum.d.ts.map +1 -0
  15. package/dist/notifications/enums/notification-delivery-status.enum.js +12 -0
  16. package/dist/notifications/enums/notification-status.enum.d.ts +10 -0
  17. package/dist/notifications/enums/notification-status.enum.d.ts.map +1 -0
  18. package/dist/notifications/enums/notification-status.enum.js +13 -0
  19. package/dist/notifications/index.d.ts +3 -1
  20. package/dist/notifications/index.d.ts.map +1 -1
  21. package/dist/notifications/index.js +3 -1
  22. package/dist/notifications/notification-deliveries/index.d.ts +2 -0
  23. package/dist/notifications/notification-deliveries/index.d.ts.map +1 -0
  24. package/dist/notifications/notification-deliveries/index.js +4 -0
  25. package/dist/notifications/notification-deliveries/notification-delivery.entity.d.ts +21 -0
  26. package/dist/notifications/notification-deliveries/notification-delivery.entity.d.ts.map +1 -0
  27. package/dist/notifications/notification-deliveries/notification-delivery.entity.js +159 -0
  28. package/dist/notifications/notifications/index.d.ts +2 -0
  29. package/dist/notifications/notifications/index.d.ts.map +1 -0
  30. package/dist/notifications/notifications/index.js +4 -0
  31. package/dist/notifications/notifications/notification.entity.d.ts +22 -0
  32. package/dist/notifications/notifications/notification.entity.d.ts.map +1 -0
  33. package/dist/notifications/notifications/notification.entity.js +154 -0
  34. package/dist/tournaments/index.d.ts +1 -0
  35. package/dist/tournaments/index.d.ts.map +1 -1
  36. package/dist/tournaments/index.js +1 -0
  37. package/dist/tournaments/tournament-registration-requirements/enums/registration-field.enum.d.ts +5 -0
  38. package/dist/tournaments/tournament-registration-requirements/enums/registration-field.enum.d.ts.map +1 -0
  39. package/dist/tournaments/tournament-registration-requirements/enums/registration-field.enum.js +8 -0
  40. package/dist/tournaments/tournament-registration-requirements/enums/requirement-level.enum.d.ts +5 -0
  41. package/dist/tournaments/tournament-registration-requirements/enums/requirement-level.enum.d.ts.map +1 -0
  42. package/dist/tournaments/tournament-registration-requirements/enums/requirement-level.enum.js +8 -0
  43. package/dist/tournaments/tournament-registration-requirements/enums/requirement-target.enum.d.ts +6 -0
  44. package/dist/tournaments/tournament-registration-requirements/enums/requirement-target.enum.d.ts.map +1 -0
  45. package/dist/tournaments/tournament-registration-requirements/enums/requirement-target.enum.js +9 -0
  46. package/dist/tournaments/tournament-registration-requirements/index.d.ts +5 -0
  47. package/dist/tournaments/tournament-registration-requirements/index.d.ts.map +1 -0
  48. package/dist/tournaments/tournament-registration-requirements/index.js +10 -0
  49. package/dist/tournaments/tournament-registration-requirements/tournament-registration-requirement.entity.d.ts +17 -0
  50. package/dist/tournaments/tournament-registration-requirements/tournament-registration-requirement.entity.d.ts.map +1 -0
  51. package/dist/tournaments/tournament-registration-requirements/tournament-registration-requirement.entity.js +114 -0
  52. package/dist/tournaments/tournaments/tournament.entity.d.ts +2 -0
  53. package/dist/tournaments/tournaments/tournament.entity.d.ts.map +1 -1
  54. package/dist/tournaments/tournaments/tournament.entity.js +4 -0
  55. package/package.json +1 -1
  56. package/dist/notifications/notification-tokens/enums/notification-platform.enum.d.ts +0 -6
  57. package/dist/notifications/notification-tokens/enums/notification-platform.enum.d.ts.map +0 -1
  58. package/dist/notifications/notification-tokens/enums/notification-platform.enum.js +0 -9
  59. package/dist/notifications/notification-tokens/index.d.ts +0 -3
  60. package/dist/notifications/notification-tokens/index.d.ts.map +0 -1
  61. package/dist/notifications/notification-tokens/index.js +0 -6
  62. package/dist/notifications/notification-tokens/notification-token.entity.d.ts +0 -14
  63. package/dist/notifications/notification-tokens/notification-token.entity.d.ts.map +0 -1
  64. package/dist/notifications/notification-tokens/notification-token.entity.js +0 -94
@@ -1,4 +1,4 @@
1
- import { NotificationToken } from '../../notifications';
1
+ import { Notification } from '../../notifications';
2
2
  import { Player } from '../../players';
3
3
  import { TournamentRegistrationRequest } from '../../tournaments';
4
4
  import { RefreshToken } from '../refresh-tokens';
@@ -22,7 +22,7 @@ export declare class User {
22
22
  refreshTokens: RefreshToken[];
23
23
  userAuthProviders: UserAuthProvider[];
24
24
  player: Player;
25
- notificationTokens: NotificationToken[];
25
+ notifications: Notification[];
26
26
  tournamentRegistrationRequests: TournamentRegistrationRequest[];
27
27
  prepareData(): void;
28
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../../src/app-auth/users/user.entity.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAa7C,qBAgBa,IAAI;IAIf,EAAE,EAAE,MAAM,CAAC;IAUX,SAAS,EAAE,MAAM,CAAC;IAOlB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,GAAG,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AAC;IAQpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAQzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ3B,KAAK,EAAE,MAAM,CAAC;IAQd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAQtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAS5B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAUvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IASrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAKxB,aAAa,EAAE,YAAY,EAAE,CAAC;IAK9B,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IAKtC,MAAM,EAAE,MAAM,CAAC;IAGf,aAAa,EAAE,YAAY,EAAE,CAAC;IAG9B,8BAA8B,EAAE,6BAA6B,EAAE,CAAC;IAMhE,WAAW,IAAI,IAAI;CAGpB"}
@@ -21,7 +21,7 @@ import {
21
21
  Unique,
22
22
  UpdateDateColumn
23
23
  } from "typeorm";
24
- import { NotificationToken } from "../../notifications/index.js";
24
+ import { Notification } from "../../notifications/index.js";
25
25
  import { Player } from "../../players/index.js";
26
26
  import { TournamentRegistrationRequest } from "../../tournaments/index.js";
27
27
  import { RefreshToken } from "../refresh-tokens/index.js";
@@ -161,8 +161,8 @@ __decorateClass([
161
161
  })
162
162
  ], User.prototype, "player", 2);
163
163
  __decorateClass([
164
- OneToMany(() => NotificationToken, (token) => token.user)
165
- ], User.prototype, "notificationTokens", 2);
164
+ OneToMany(() => Notification, (notification) => notification.user)
165
+ ], User.prototype, "notifications", 2);
166
166
  __decorateClass([
167
167
  OneToMany(() => TournamentRegistrationRequest, (request) => request.requestedBy)
168
168
  ], User.prototype, "tournamentRegistrationRequests", 2);
@@ -178,6 +178,7 @@ User = __decorateClass([
178
178
  Index("IDX_users_email_lookup", ["email"], { where: '"deleted_at" IS NULL' }),
179
179
  Index("IDX_users_phone_lookup", ["phone"], { where: '"deleted_at" IS NULL' }),
180
180
  Index("IDX_users_cpf_hash_lookup", ["cpfHash"], {
181
+ unique: true,
181
182
  where: '"deleted_at" IS NULL AND "cpf_hash" IS NOT NULL'
182
183
  }),
183
184
  Index("IDX_users_deleted_at", ["deletedAt"]),
@@ -3,11 +3,11 @@ import { Organization, OrganizationUser, OrganizationUserBillingInfo, PhoneNumbe
3
3
  import { Coupon, CouponUsage } from '../coupons';
4
4
  import { Address, Facility, FacilityImage, FacilityOwner, Field, FieldImage } from '../facilities';
5
5
  import { TeamPlayerMergeHistory } from '../history-logs';
6
- import { NotificationToken } from '../notifications';
6
+ import { Notification, NotificationDelivery } from '../notifications';
7
7
  import { Payment, PaymentProvider, UserPaymentProvider } from '../payments';
8
8
  import { Player, PlayerPersonalData, PlayerPosition } from '../players';
9
9
  import { PlayerTeam, Team, TeamJoinRequest, TeamModality, TeamTrophy } from '../teams';
10
- import { Tournament, TournamentAllowedPhone, TournamentBracket, TournamentBracketSlot, TournamentContact, TournamentCoupon, TournamentFacility, TournamentFormatConfig, TournamentGroup, TournamentMatch, TournamentMatchAvailability, TournamentMatchCard, TournamentMatchGoal, TournamentMatchRule, TournamentMatchSchema, TournamentPayment, TournamentPenaltyShootout, TournamentPlayer, TournamentPlayerRule, TournamentPrizeRule, TournamentPublicationChargeRule, TournamentRegistrationRequest, TournamentTeam, TournamentTeamContactAttempt } from '../tournaments';
10
+ import { Tournament, TournamentAllowedPhone, TournamentBracket, TournamentBracketSlot, TournamentContact, TournamentCoupon, TournamentFacility, TournamentFormatConfig, TournamentGroup, TournamentMatch, TournamentMatchAvailability, TournamentMatchCard, TournamentMatchGoal, TournamentMatchRule, TournamentMatchSchema, TournamentPayment, TournamentPenaltyShootout, TournamentPlayer, TournamentPlayerRule, TournamentPrizeRule, TournamentPublicationChargeRule, TournamentRegistrationRequirement, TournamentRegistrationRequest, TournamentTeam, TournamentTeamContactAttempt } from '../tournaments';
11
11
  import { UserDomainEvent, UserEventView } from '../user-events';
12
- export declare const DATABASE_ENTITIES: (typeof FacilityImage | typeof Facility | typeof FieldImage | typeof Field | typeof Address | typeof TournamentFacility | typeof OrganizationUserBillingInfo | typeof OrganizationUser | typeof Organization | typeof TournamentPayment | typeof PhoneNumber | typeof TournamentAllowedPhone | typeof Tournament | typeof FacilityOwner | typeof PasswordReset | typeof NotificationToken | typeof User | typeof UserAuthProvider | typeof RefreshToken | typeof Player | typeof TournamentRegistrationRequest | typeof UserVerification | typeof PlayerPersonalData | typeof PlayerPosition | typeof PlayerTeam | typeof TeamJoinRequest | typeof TeamPlayerMergeHistory | typeof Team | typeof TournamentPlayer | typeof TournamentTeam | typeof TeamModality | typeof TournamentTeamContactAttempt | typeof TeamTrophy | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentFormatConfig | typeof TournamentMatchGoal | typeof TournamentMatch | typeof TournamentMatchCard | typeof TournamentPenaltyShootout | typeof TournamentGroup | typeof TournamentBracketSlot | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentBracket | typeof TournamentPublicationChargeRule | typeof UserDomainEvent | typeof UserEventView)[];
12
+ export declare const DATABASE_ENTITIES: (typeof FacilityImage | typeof Facility | typeof FieldImage | typeof Field | typeof Address | typeof TournamentFacility | typeof OrganizationUserBillingInfo | typeof OrganizationUser | typeof Organization | typeof TournamentPayment | typeof PhoneNumber | typeof TournamentAllowedPhone | typeof Tournament | typeof FacilityOwner | typeof PasswordReset | typeof NotificationDelivery | typeof Notification | typeof User | typeof UserAuthProvider | typeof RefreshToken | typeof Player | typeof TournamentRegistrationRequest | typeof UserVerification | typeof PlayerPersonalData | typeof PlayerPosition | typeof PlayerTeam | typeof TeamJoinRequest | typeof TeamPlayerMergeHistory | typeof Team | typeof TournamentPlayer | typeof TournamentTeam | typeof TeamModality | typeof TournamentTeamContactAttempt | typeof TeamTrophy | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentFormatConfig | typeof TournamentMatchGoal | typeof TournamentMatch | typeof TournamentMatchCard | typeof TournamentPenaltyShootout | typeof TournamentGroup | typeof TournamentBracketSlot | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentRegistrationRequirement | typeof TournamentBracket | typeof TournamentPublicationChargeRule | typeof UserDomainEvent | typeof UserEventView)[];
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database-entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,2BAA2B,EAC3B,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACvF,OAAO,EACL,UAAU,EACV,sBAAsB,EACtB,iBAAiB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AACvF,OAAO,EACL,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,EAC/B,iCAAiC,EACjC,6BAA6B,EAE7B,cAAc,EACd,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,i+CA4D7B,CAAC"}
@@ -8,7 +8,7 @@ import {
8
8
  import { Coupon, CouponUsage } from "../coupons/index.js";
9
9
  import { Address, Facility, FacilityImage, FacilityOwner, Field, FieldImage } from "../facilities/index.js";
10
10
  import { TeamPlayerMergeHistory } from "../history-logs/index.js";
11
- import { NotificationToken } from "../notifications/index.js";
11
+ import { Notification, NotificationDelivery } from "../notifications/index.js";
12
12
  import { Payment, PaymentProvider, UserPaymentProvider } from "../payments/index.js";
13
13
  import { Player, PlayerPersonalData, PlayerPosition } from "../players/index.js";
14
14
  import { PlayerTeam, Team, TeamJoinRequest, TeamModality, TeamTrophy } from "../teams/index.js";
@@ -34,6 +34,7 @@ import {
34
34
  TournamentPlayerRule,
35
35
  TournamentPrizeRule,
36
36
  TournamentPublicationChargeRule,
37
+ TournamentRegistrationRequirement,
37
38
  TournamentRegistrationRequest,
38
39
  TournamentRule,
39
40
  TournamentTeam,
@@ -73,6 +74,7 @@ const DATABASE_ENTITIES = [
73
74
  TournamentPlayer,
74
75
  TournamentPlayerRule,
75
76
  TournamentPublicationChargeRule,
77
+ TournamentRegistrationRequirement,
76
78
  TournamentPrizeRule,
77
79
  TournamentRegistrationRequest,
78
80
  TournamentRule,
@@ -91,7 +93,8 @@ const DATABASE_ENTITIES = [
91
93
  PlayerTeam,
92
94
  TeamModality,
93
95
  TeamJoinRequest,
94
- NotificationToken,
96
+ Notification,
97
+ NotificationDelivery,
95
98
  PhoneNumber,
96
99
  TournamentAllowedPhone,
97
100
  TeamTrophy,
@@ -0,0 +1,4 @@
1
+ export { NotificationChannel } from './notification-channel.enum';
2
+ export { NotificationStatus } from './notification-status.enum';
3
+ export { NotificationDeliveryStatus } from './notification-delivery-status.enum';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/notifications/enums/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { NotificationChannel } from "./notification-channel.enum.js";
2
+ import { NotificationStatus } from "./notification-status.enum.js";
3
+ import { NotificationDeliveryStatus } from "./notification-delivery-status.enum.js";
4
+ export {
5
+ NotificationChannel,
6
+ NotificationDeliveryStatus,
7
+ NotificationStatus
8
+ };
@@ -0,0 +1,8 @@
1
+ export declare enum NotificationChannel {
2
+ IN_APP = "IN_APP",
3
+ PUSH = "PUSH",
4
+ EMAIL = "EMAIL",
5
+ SMS = "SMS",
6
+ WHATSAPP = "WHATSAPP"
7
+ }
8
+ //# sourceMappingURL=notification-channel.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-channel.enum.d.ts","sourceRoot":"","sources":["../../../src/notifications/enums/notification-channel.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC7B,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,QAAQ,aAAa;CACtB"}
@@ -0,0 +1,11 @@
1
+ var NotificationChannel = /* @__PURE__ */ ((NotificationChannel2) => {
2
+ NotificationChannel2["IN_APP"] = "IN_APP";
3
+ NotificationChannel2["PUSH"] = "PUSH";
4
+ NotificationChannel2["EMAIL"] = "EMAIL";
5
+ NotificationChannel2["SMS"] = "SMS";
6
+ NotificationChannel2["WHATSAPP"] = "WHATSAPP";
7
+ return NotificationChannel2;
8
+ })(NotificationChannel || {});
9
+ export {
10
+ NotificationChannel
11
+ };
@@ -0,0 +1,9 @@
1
+ export declare enum NotificationDeliveryStatus {
2
+ PENDING = "PENDING",
3
+ PROCESSING = "PROCESSING",
4
+ SENT = "SENT",
5
+ DELIVERED = "DELIVERED",
6
+ FAILED = "FAILED",
7
+ CANCELED = "CANCELED"
8
+ }
9
+ //# sourceMappingURL=notification-delivery-status.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-delivery-status.enum.d.ts","sourceRoot":"","sources":["../../../src/notifications/enums/notification-delivery-status.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,0BAA0B;IACpC,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB"}
@@ -0,0 +1,12 @@
1
+ var NotificationDeliveryStatus = /* @__PURE__ */ ((NotificationDeliveryStatus2) => {
2
+ NotificationDeliveryStatus2["PENDING"] = "PENDING";
3
+ NotificationDeliveryStatus2["PROCESSING"] = "PROCESSING";
4
+ NotificationDeliveryStatus2["SENT"] = "SENT";
5
+ NotificationDeliveryStatus2["DELIVERED"] = "DELIVERED";
6
+ NotificationDeliveryStatus2["FAILED"] = "FAILED";
7
+ NotificationDeliveryStatus2["CANCELED"] = "CANCELED";
8
+ return NotificationDeliveryStatus2;
9
+ })(NotificationDeliveryStatus || {});
10
+ export {
11
+ NotificationDeliveryStatus
12
+ };
@@ -0,0 +1,10 @@
1
+ export declare enum NotificationStatus {
2
+ PENDING = "PENDING",
3
+ PROCESSING = "PROCESSING",
4
+ SENT = "SENT",
5
+ DELIVERED = "DELIVERED",
6
+ FAILED = "FAILED",
7
+ READ = "READ",
8
+ CANCELED = "CANCELED"
9
+ }
10
+ //# sourceMappingURL=notification-status.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-status.enum.d.ts","sourceRoot":"","sources":["../../../src/notifications/enums/notification-status.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB"}
@@ -0,0 +1,13 @@
1
+ var NotificationStatus = /* @__PURE__ */ ((NotificationStatus2) => {
2
+ NotificationStatus2["PENDING"] = "PENDING";
3
+ NotificationStatus2["PROCESSING"] = "PROCESSING";
4
+ NotificationStatus2["SENT"] = "SENT";
5
+ NotificationStatus2["DELIVERED"] = "DELIVERED";
6
+ NotificationStatus2["FAILED"] = "FAILED";
7
+ NotificationStatus2["READ"] = "READ";
8
+ NotificationStatus2["CANCELED"] = "CANCELED";
9
+ return NotificationStatus2;
10
+ })(NotificationStatus || {});
11
+ export {
12
+ NotificationStatus
13
+ };
@@ -1,3 +1,5 @@
1
1
  export * from './email-templates';
2
- export * from './notification-tokens';
2
+ export * from './notifications';
3
+ export * from './notification-deliveries';
4
+ export * from './enums';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notifications/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAElC,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notifications/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAElC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,2BAA2B,CAAC;AAE1C,cAAc,SAAS,CAAC"}
@@ -1,2 +1,4 @@
1
1
  export * from "./email-templates/index.js";
2
- export * from "./notification-tokens/index.js";
2
+ export * from "./notifications/index.js";
3
+ export * from "./notification-deliveries/index.js";
4
+ export * from "./enums/index.js";
@@ -0,0 +1,2 @@
1
+ export { NotificationDelivery } from './notification-delivery.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/notifications/notification-deliveries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { NotificationDelivery } from "./notification-delivery.entity.js";
2
+ export {
3
+ NotificationDelivery
4
+ };
@@ -0,0 +1,21 @@
1
+ import { NotificationChannel, NotificationDeliveryStatus } from '../enums';
2
+ import { Notification } from '../notifications';
3
+ export declare class NotificationDelivery {
4
+ id: string;
5
+ notificationId: string;
6
+ channel: NotificationChannel;
7
+ status: NotificationDeliveryStatus;
8
+ attempts: number;
9
+ scheduledAt: Date | null;
10
+ sentAt: Date | null;
11
+ deliveredAt: Date | null;
12
+ failedAt: Date | null;
13
+ providerMessageId: string | null;
14
+ lastErrorCode: string | null;
15
+ lastErrorMessage: string | null;
16
+ metadata: Record<string, unknown>;
17
+ createdAt: Date;
18
+ updatedAt: Date;
19
+ notification: Notification;
20
+ }
21
+ //# sourceMappingURL=notification-delivery.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-delivery.entity.d.ts","sourceRoot":"","sources":["../../../src/notifications/notification-deliveries/notification-delivery.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,qBASa,oBAAoB;IAI/B,EAAE,EAAE,MAAM,CAAC;IAOX,cAAc,EAAE,MAAM,CAAC;IAQvB,OAAO,EAAE,mBAAmB,CAAC;IAS7B,MAAM,EAAE,0BAA0B,CAAC;IAOnC,QAAQ,EAAE,MAAM,CAAC;IAQjB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAQzB,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IAQpB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAQzB,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IAStB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IASjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ7B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAOhC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAOlC,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAMhB,YAAY,EAAE,YAAY,CAAC;CAC5B"}
@@ -0,0 +1,159 @@
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 {
12
+ Column,
13
+ CreateDateColumn,
14
+ Entity,
15
+ Index,
16
+ JoinColumn,
17
+ ManyToOne,
18
+ PrimaryGeneratedColumn,
19
+ UpdateDateColumn
20
+ } from "typeorm";
21
+ import { NotificationChannel, NotificationDeliveryStatus } from "../enums/index.js";
22
+ import { Notification } from "../notifications/index.js";
23
+ let NotificationDelivery = class {
24
+ };
25
+ __decorateClass([
26
+ PrimaryGeneratedColumn("uuid", {
27
+ comment: "Identificador \xFAnico da tentativa de entrega por canal."
28
+ })
29
+ ], NotificationDelivery.prototype, "id", 2);
30
+ __decorateClass([
31
+ Column({
32
+ name: "notification_id",
33
+ type: "uuid",
34
+ comment: "FK notifications.id."
35
+ })
36
+ ], NotificationDelivery.prototype, "notificationId", 2);
37
+ __decorateClass([
38
+ Column({
39
+ type: "enum",
40
+ enum: NotificationChannel,
41
+ enumName: "NotificationChannel",
42
+ comment: "Canal de entrega da notifica\xE7\xE3o."
43
+ })
44
+ ], NotificationDelivery.prototype, "channel", 2);
45
+ __decorateClass([
46
+ Column({
47
+ type: "enum",
48
+ enum: NotificationDeliveryStatus,
49
+ enumName: "NotificationDeliveryStatus",
50
+ default: NotificationDeliveryStatus.PENDING,
51
+ comment: "Status da entrega por canal."
52
+ })
53
+ ], NotificationDelivery.prototype, "status", 2);
54
+ __decorateClass([
55
+ Column({
56
+ type: "smallint",
57
+ default: 0,
58
+ comment: "N\xFAmero de tentativas de envio para o canal."
59
+ })
60
+ ], NotificationDelivery.prototype, "attempts", 2);
61
+ __decorateClass([
62
+ Column({
63
+ name: "scheduled_at",
64
+ type: "timestamptz",
65
+ nullable: true,
66
+ comment: "Data/hora em que o envio foi agendado."
67
+ })
68
+ ], NotificationDelivery.prototype, "scheduledAt", 2);
69
+ __decorateClass([
70
+ Column({
71
+ name: "sent_at",
72
+ type: "timestamptz",
73
+ nullable: true,
74
+ comment: "Data/hora em que o envio foi efetuado."
75
+ })
76
+ ], NotificationDelivery.prototype, "sentAt", 2);
77
+ __decorateClass([
78
+ Column({
79
+ name: "delivered_at",
80
+ type: "timestamptz",
81
+ nullable: true,
82
+ comment: "Data/hora em que o provedor confirmou entrega."
83
+ })
84
+ ], NotificationDelivery.prototype, "deliveredAt", 2);
85
+ __decorateClass([
86
+ Column({
87
+ name: "failed_at",
88
+ type: "timestamptz",
89
+ nullable: true,
90
+ comment: "Data/hora da \xFAltima falha de envio."
91
+ })
92
+ ], NotificationDelivery.prototype, "failedAt", 2);
93
+ __decorateClass([
94
+ Column({
95
+ name: "provider_message_id",
96
+ type: "varchar",
97
+ length: 128,
98
+ nullable: true,
99
+ comment: "Identificador retornado pelo provedor externo."
100
+ })
101
+ ], NotificationDelivery.prototype, "providerMessageId", 2);
102
+ __decorateClass([
103
+ Column({
104
+ name: "last_error_code",
105
+ type: "varchar",
106
+ length: 64,
107
+ nullable: true,
108
+ comment: "C\xF3digo da \xFAltima falha de envio."
109
+ })
110
+ ], NotificationDelivery.prototype, "lastErrorCode", 2);
111
+ __decorateClass([
112
+ Column({
113
+ name: "last_error_message",
114
+ type: "text",
115
+ nullable: true,
116
+ comment: "Mensagem da \xFAltima falha de envio."
117
+ })
118
+ ], NotificationDelivery.prototype, "lastErrorMessage", 2);
119
+ __decorateClass([
120
+ Column({
121
+ type: "jsonb",
122
+ default: () => "'{}'::jsonb",
123
+ comment: "Metadados do canal/provedor para troubleshooting."
124
+ })
125
+ ], NotificationDelivery.prototype, "metadata", 2);
126
+ __decorateClass([
127
+ CreateDateColumn({
128
+ name: "created_at",
129
+ type: "timestamptz",
130
+ comment: "Data/hora de cria\xE7\xE3o da entrega."
131
+ })
132
+ ], NotificationDelivery.prototype, "createdAt", 2);
133
+ __decorateClass([
134
+ UpdateDateColumn({
135
+ name: "updated_at",
136
+ type: "timestamptz",
137
+ comment: "Data/hora da \xFAltima atualiza\xE7\xE3o da entrega."
138
+ })
139
+ ], NotificationDelivery.prototype, "updatedAt", 2);
140
+ __decorateClass([
141
+ ManyToOne(() => Notification, (notification) => notification.deliveries, {
142
+ onDelete: "CASCADE"
143
+ }),
144
+ JoinColumn({ name: "notification_id" })
145
+ ], NotificationDelivery.prototype, "notification", 2);
146
+ NotificationDelivery = __decorateClass([
147
+ Entity("notification_deliveries"),
148
+ Index("UQ_notification_deliveries_notification_channel", ["notificationId", "channel"], {
149
+ unique: true
150
+ }),
151
+ Index("IDX_notification_deliveries_channel_status_scheduled", ["channel", "status", "scheduledAt"]),
152
+ Index("IDX_notification_deliveries_notification_status", ["notificationId", "status"]),
153
+ Index("IDX_notification_deliveries_provider_message", ["providerMessageId"], {
154
+ where: '"provider_message_id" IS NOT NULL'
155
+ })
156
+ ], NotificationDelivery);
157
+ export {
158
+ NotificationDelivery
159
+ };
@@ -0,0 +1,2 @@
1
+ export { Notification } from './notification.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/notifications/notifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Notification } from "./notification.entity.js";
2
+ export {
3
+ Notification
4
+ };
@@ -0,0 +1,22 @@
1
+ import { User } from '../../app-auth';
2
+ import { NotificationStatus } from '../enums';
3
+ import { NotificationDelivery } from '../notification-deliveries';
4
+ export declare class Notification {
5
+ id: string;
6
+ userId: string;
7
+ type: string;
8
+ title: string;
9
+ body: string;
10
+ payload: Record<string, unknown>;
11
+ status: NotificationStatus;
12
+ dedupeKey: string | null;
13
+ availableAt: Date | null;
14
+ expiresAt: Date | null;
15
+ readAt: Date | null;
16
+ createdAt: Date;
17
+ updatedAt: Date;
18
+ deletedAt: Date | null;
19
+ user: User;
20
+ deliveries: NotificationDelivery[];
21
+ }
22
+ //# sourceMappingURL=notification.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.entity.d.ts","sourceRoot":"","sources":["../../../src/notifications/notifications/notification.entity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,qBAYa,YAAY;IAIvB,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,EAAE,MAAM,CAAC;IAOf,IAAI,EAAE,MAAM,CAAC;IAOb,KAAK,EAAE,MAAM,CAAC;IAMd,IAAI,EAAE,MAAM,CAAC;IAOb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IASjC,MAAM,EAAE,kBAAkB,CAAC;IAS3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAQzB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAQzB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAQvB,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IAOpB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAIvB,IAAI,EAAE,IAAI,CAAC;IAGX,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACpC"}
@@ -0,0 +1,154 @@
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 {
12
+ Column,
13
+ CreateDateColumn,
14
+ DeleteDateColumn,
15
+ Entity,
16
+ Index,
17
+ JoinColumn,
18
+ ManyToOne,
19
+ OneToMany,
20
+ PrimaryGeneratedColumn,
21
+ UpdateDateColumn
22
+ } from "typeorm";
23
+ import { User } from "../../app-auth/index.js";
24
+ import { NotificationStatus } from "../enums/index.js";
25
+ import { NotificationDelivery } from "../notification-deliveries/index.js";
26
+ let Notification = class {
27
+ };
28
+ __decorateClass([
29
+ PrimaryGeneratedColumn("uuid", {
30
+ comment: "Identificador \xFAnico da notifica\xE7\xE3o."
31
+ })
32
+ ], Notification.prototype, "id", 2);
33
+ __decorateClass([
34
+ Column({
35
+ name: "user_id",
36
+ type: "uuid",
37
+ comment: "FK users.id."
38
+ })
39
+ ], Notification.prototype, "userId", 2);
40
+ __decorateClass([
41
+ Column({
42
+ type: "varchar",
43
+ length: 80,
44
+ comment: "Tipo funcional da notifica\xE7\xE3o."
45
+ })
46
+ ], Notification.prototype, "type", 2);
47
+ __decorateClass([
48
+ Column({
49
+ type: "varchar",
50
+ length: 160,
51
+ comment: "T\xEDtulo para exibi\xE7\xE3o in-app e canais externos."
52
+ })
53
+ ], Notification.prototype, "title", 2);
54
+ __decorateClass([
55
+ Column({
56
+ type: "text",
57
+ comment: "Corpo principal da notifica\xE7\xE3o."
58
+ })
59
+ ], Notification.prototype, "body", 2);
60
+ __decorateClass([
61
+ Column({
62
+ type: "jsonb",
63
+ default: () => "'{}'::jsonb",
64
+ comment: "Payload gen\xE9rico para dados complementares."
65
+ })
66
+ ], Notification.prototype, "payload", 2);
67
+ __decorateClass([
68
+ Column({
69
+ type: "enum",
70
+ enum: NotificationStatus,
71
+ enumName: "NotificationStatus",
72
+ default: NotificationStatus.PENDING,
73
+ comment: "Status de lifecycle unificado da notifica\xE7\xE3o."
74
+ })
75
+ ], Notification.prototype, "status", 2);
76
+ __decorateClass([
77
+ Column({
78
+ name: "dedupe_key",
79
+ type: "varchar",
80
+ length: 120,
81
+ nullable: true,
82
+ comment: "Chave opcional de deduplica\xE7\xE3o por usu\xE1rio."
83
+ })
84
+ ], Notification.prototype, "dedupeKey", 2);
85
+ __decorateClass([
86
+ Column({
87
+ name: "available_at",
88
+ type: "timestamptz",
89
+ nullable: true,
90
+ comment: "Data/hora a partir de quando pode ser exibida/processada."
91
+ })
92
+ ], Notification.prototype, "availableAt", 2);
93
+ __decorateClass([
94
+ Column({
95
+ name: "expires_at",
96
+ type: "timestamptz",
97
+ nullable: true,
98
+ comment: "Data/hora de expira\xE7\xE3o da notifica\xE7\xE3o."
99
+ })
100
+ ], Notification.prototype, "expiresAt", 2);
101
+ __decorateClass([
102
+ Column({
103
+ name: "read_at",
104
+ type: "timestamptz",
105
+ nullable: true,
106
+ comment: "Data/hora em que a notifica\xE7\xE3o foi lida na central in-app."
107
+ })
108
+ ], Notification.prototype, "readAt", 2);
109
+ __decorateClass([
110
+ CreateDateColumn({
111
+ name: "created_at",
112
+ type: "timestamptz",
113
+ comment: "Data/hora de cria\xE7\xE3o da notifica\xE7\xE3o."
114
+ })
115
+ ], Notification.prototype, "createdAt", 2);
116
+ __decorateClass([
117
+ UpdateDateColumn({
118
+ name: "updated_at",
119
+ type: "timestamptz",
120
+ comment: "Data/hora da \xFAltima atualiza\xE7\xE3o da notifica\xE7\xE3o."
121
+ })
122
+ ], Notification.prototype, "updatedAt", 2);
123
+ __decorateClass([
124
+ DeleteDateColumn({
125
+ name: "deleted_at",
126
+ type: "timestamptz",
127
+ nullable: true,
128
+ comment: "Data/hora de remo\xE7\xE3o l\xF3gica para preserva\xE7\xE3o de hist\xF3rico."
129
+ })
130
+ ], Notification.prototype, "deletedAt", 2);
131
+ __decorateClass([
132
+ ManyToOne(() => User, (user) => user.notifications, { onDelete: "CASCADE" }),
133
+ JoinColumn({ name: "user_id" })
134
+ ], Notification.prototype, "user", 2);
135
+ __decorateClass([
136
+ OneToMany(() => NotificationDelivery, (delivery) => delivery.notification)
137
+ ], Notification.prototype, "deliveries", 2);
138
+ Notification = __decorateClass([
139
+ Entity("notifications"),
140
+ Index("IDX_notifications_user_created", ["userId", "createdAt"]),
141
+ Index("IDX_notifications_user_status_created", ["userId", "status", "createdAt"]),
142
+ Index("IDX_notifications_user_unread", ["userId", "createdAt"], {
143
+ where: '"read_at" IS NULL AND "deleted_at" IS NULL'
144
+ }),
145
+ Index("IDX_notifications_available_at", ["availableAt"]),
146
+ Index("IDX_notifications_expires_at", ["expiresAt"]),
147
+ Index("UQ_notifications_user_dedupe_active", ["userId", "dedupeKey"], {
148
+ unique: true,
149
+ where: '"dedupe_key" IS NOT NULL AND "deleted_at" IS NULL'
150
+ })
151
+ ], Notification);
152
+ export {
153
+ Notification
154
+ };
@@ -18,6 +18,7 @@ export * from './tournament-player-rules';
18
18
  export * from './tournament-players';
19
19
  export * from './tournament-prize-rules';
20
20
  export * from './tournament-publication-charge-rules';
21
+ export * from './tournament-registration-requirements';
21
22
  export * from './tournament-registration-requests';
22
23
  export * from './tournament-rules';
23
24
  export * from './tournament-team-contact-attempts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tournaments/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,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,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tournaments/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,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,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
@@ -18,6 +18,7 @@ export * from "./tournament-player-rules/index.js";
18
18
  export * from "./tournament-players/index.js";
19
19
  export * from "./tournament-prize-rules/index.js";
20
20
  export * from "./tournament-publication-charge-rules/index.js";
21
+ export * from "./tournament-registration-requirements/index.js";
21
22
  export * from "./tournament-registration-requests/index.js";
22
23
  export * from "./tournament-rules/index.js";
23
24
  export * from "./tournament-team-contact-attempts/index.js";
@@ -0,0 +1,5 @@
1
+ export declare enum RegistrationField {
2
+ CPF = "cpf",
3
+ BIRTH_DATE = "birth_date"
4
+ }
5
+ //# sourceMappingURL=registration-field.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registration-field.enum.d.ts","sourceRoot":"","sources":["../../../../src/tournaments/tournament-registration-requirements/enums/registration-field.enum.ts"],"names":[],"mappings":"AAKA,oBAAY,iBAAiB;IAC3B,GAAG,QAAQ;IACX,UAAU,eAAe;CAC1B"}
@@ -0,0 +1,8 @@
1
+ var RegistrationField = /* @__PURE__ */ ((RegistrationField2) => {
2
+ RegistrationField2["CPF"] = "cpf";
3
+ RegistrationField2["BIRTH_DATE"] = "birth_date";
4
+ return RegistrationField2;
5
+ })(RegistrationField || {});
6
+ export {
7
+ RegistrationField
8
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum RequirementLevel {
2
+ OPTIONAL = "optional",
3
+ REQUIRED = "required"
4
+ }
5
+ //# sourceMappingURL=requirement-level.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement-level.enum.d.ts","sourceRoot":"","sources":["../../../../src/tournaments/tournament-registration-requirements/enums/requirement-level.enum.ts"],"names":[],"mappings":"AAKA,oBAAY,gBAAgB;IAC1B,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACtB"}
@@ -0,0 +1,8 @@
1
+ var RequirementLevel = /* @__PURE__ */ ((RequirementLevel2) => {
2
+ RequirementLevel2["OPTIONAL"] = "optional";
3
+ RequirementLevel2["REQUIRED"] = "required";
4
+ return RequirementLevel2;
5
+ })(RequirementLevel || {});
6
+ export {
7
+ RequirementLevel
8
+ };
@@ -0,0 +1,6 @@
1
+ export declare enum RequirementTarget {
2
+ PLAYER = "player",
3
+ TEAM = "team",
4
+ MANAGER = "manager"
5
+ }
6
+ //# sourceMappingURL=requirement-target.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement-target.enum.d.ts","sourceRoot":"","sources":["../../../../src/tournaments/tournament-registration-requirements/enums/requirement-target.enum.ts"],"names":[],"mappings":"AAKA,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,OAAO,YAAY;CACpB"}
@@ -0,0 +1,9 @@
1
+ var RequirementTarget = /* @__PURE__ */ ((RequirementTarget2) => {
2
+ RequirementTarget2["PLAYER"] = "player";
3
+ RequirementTarget2["TEAM"] = "team";
4
+ RequirementTarget2["MANAGER"] = "manager";
5
+ return RequirementTarget2;
6
+ })(RequirementTarget || {});
7
+ export {
8
+ RequirementTarget
9
+ };
@@ -0,0 +1,5 @@
1
+ export { RegistrationField } from './enums/registration-field.enum';
2
+ export { RequirementLevel } from './enums/requirement-level.enum';
3
+ export { RequirementTarget } from './enums/requirement-target.enum';
4
+ export { TournamentRegistrationRequirement } from './tournament-registration-requirement.entity';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-registration-requirements/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,iCAAiC,EAAE,MAAM,8CAA8C,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { RegistrationField } from "./enums/registration-field.enum.js";
2
+ import { RequirementLevel } from "./enums/requirement-level.enum.js";
3
+ import { RequirementTarget } from "./enums/requirement-target.enum.js";
4
+ import { TournamentRegistrationRequirement } from "./tournament-registration-requirement.entity.js";
5
+ export {
6
+ RegistrationField,
7
+ RequirementLevel,
8
+ RequirementTarget,
9
+ TournamentRegistrationRequirement
10
+ };
@@ -0,0 +1,17 @@
1
+ import { Tournament } from '../tournaments';
2
+ import { RegistrationField } from './enums/registration-field.enum';
3
+ import { RequirementLevel } from './enums/requirement-level.enum';
4
+ import { RequirementTarget } from './enums/requirement-target.enum';
5
+ export declare class TournamentRegistrationRequirement {
6
+ id: number;
7
+ tournamentId: number;
8
+ field: RegistrationField;
9
+ level: RequirementLevel;
10
+ appliesTo: RequirementTarget;
11
+ effectiveFrom: Date | null;
12
+ effectiveUntil: Date | null;
13
+ createdAt: Date;
14
+ updatedAt: Date;
15
+ tournament: Tournament;
16
+ }
17
+ //# sourceMappingURL=tournament-registration-requirement.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tournament-registration-requirement.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-registration-requirements/tournament-registration-requirement.entity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAUpE,qBASa,iCAAiC;IAI5C,EAAE,EAAE,MAAM,CAAC;IAOX,YAAY,EAAE,MAAM,CAAC;IAOrB,KAAK,EAAE,iBAAiB,CAAC;IAQzB,KAAK,EAAE,gBAAgB,CAAC;IASxB,SAAS,EAAE,iBAAiB,CAAC;IAQ7B,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;IAQ3B,cAAc,EAAE,IAAI,GAAG,IAAI,CAAC;IAO5B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAOhB,UAAU,EAAE,UAAU,CAAC;CACxB"}
@@ -0,0 +1,114 @@
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 {
12
+ Check,
13
+ Column,
14
+ CreateDateColumn,
15
+ Entity,
16
+ Index,
17
+ JoinColumn,
18
+ ManyToOne,
19
+ PrimaryGeneratedColumn,
20
+ Unique,
21
+ UpdateDateColumn
22
+ } from "typeorm";
23
+ import { Tournament } from "../tournaments/index.js";
24
+ import { RegistrationField } from "./enums/registration-field.enum.js";
25
+ import { RequirementLevel } from "./enums/requirement-level.enum.js";
26
+ import { RequirementTarget } from "./enums/requirement-target.enum.js";
27
+ let TournamentRegistrationRequirement = class {
28
+ };
29
+ __decorateClass([
30
+ PrimaryGeneratedColumn({
31
+ comment: "Identificador \xFAnico do requisito de inscri\xE7\xE3o."
32
+ })
33
+ ], TournamentRegistrationRequirement.prototype, "id", 2);
34
+ __decorateClass([
35
+ Column({
36
+ name: "tournament_id",
37
+ type: "int",
38
+ comment: "FK tournaments.id."
39
+ })
40
+ ], TournamentRegistrationRequirement.prototype, "tournamentId", 2);
41
+ __decorateClass([
42
+ Column({
43
+ type: "enum",
44
+ enum: RegistrationField,
45
+ comment: "Campo alvo da exig\xEAncia (ex.: cpf, birth_date)."
46
+ })
47
+ ], TournamentRegistrationRequirement.prototype, "field", 2);
48
+ __decorateClass([
49
+ Column({
50
+ type: "enum",
51
+ enum: RequirementLevel,
52
+ default: RequirementLevel.OPTIONAL,
53
+ comment: "N\xEDvel da exig\xEAncia para o campo configurado."
54
+ })
55
+ ], TournamentRegistrationRequirement.prototype, "level", 2);
56
+ __decorateClass([
57
+ Column({
58
+ name: "applies_to",
59
+ type: "enum",
60
+ enum: RequirementTarget,
61
+ default: RequirementTarget.PLAYER,
62
+ comment: "Alvo da exig\xEAncia (jogador, time ou manager)."
63
+ })
64
+ ], TournamentRegistrationRequirement.prototype, "appliesTo", 2);
65
+ __decorateClass([
66
+ Column({
67
+ name: "effective_from",
68
+ type: "timestamptz",
69
+ nullable: true,
70
+ comment: "Data/hora inicial de vig\xEAncia da exig\xEAncia (opcional)."
71
+ })
72
+ ], TournamentRegistrationRequirement.prototype, "effectiveFrom", 2);
73
+ __decorateClass([
74
+ Column({
75
+ name: "effective_until",
76
+ type: "timestamptz",
77
+ nullable: true,
78
+ comment: "Data/hora final de vig\xEAncia da exig\xEAncia (opcional)."
79
+ })
80
+ ], TournamentRegistrationRequirement.prototype, "effectiveUntil", 2);
81
+ __decorateClass([
82
+ CreateDateColumn({
83
+ name: "created_at",
84
+ type: "timestamptz",
85
+ comment: "Data/hora de cria\xE7\xE3o do requisito."
86
+ })
87
+ ], TournamentRegistrationRequirement.prototype, "createdAt", 2);
88
+ __decorateClass([
89
+ UpdateDateColumn({
90
+ name: "updated_at",
91
+ type: "timestamptz",
92
+ comment: "Data/hora da \xFAltima atualiza\xE7\xE3o do requisito."
93
+ })
94
+ ], TournamentRegistrationRequirement.prototype, "updatedAt", 2);
95
+ __decorateClass([
96
+ ManyToOne(() => Tournament, (tournament) => tournament.registrationRequirements, {
97
+ onDelete: "CASCADE"
98
+ }),
99
+ JoinColumn({ name: "tournament_id" })
100
+ ], TournamentRegistrationRequirement.prototype, "tournament", 2);
101
+ TournamentRegistrationRequirement = __decorateClass([
102
+ Entity("tournament_registration_requirements"),
103
+ Unique("UX_trr_tournament_field", ["tournamentId", "field"]),
104
+ Index("IDX_trr_tournament", ["tournamentId"]),
105
+ Index("IDX_trr_target", ["appliesTo"]),
106
+ Index("IDX_trr_field", ["field"]),
107
+ Check(
108
+ "CHK_trr_effective_range",
109
+ '"effective_until" IS NULL OR "effective_from" IS NULL OR "effective_until" > "effective_from"'
110
+ )
111
+ ], TournamentRegistrationRequirement);
112
+ export {
113
+ TournamentRegistrationRequirement
114
+ };
@@ -18,6 +18,7 @@ import { TournamentPayment } from '../tournament-payments';
18
18
  import { TournamentPlayerRule } from '../tournament-player-rules';
19
19
  import { TournamentPrizeRule } from '../tournament-prize-rules';
20
20
  import { TournamentRegistrationRequest } from '../tournament-registration-requests';
21
+ import { TournamentRegistrationRequirement } from '../tournament-registration-requirements';
21
22
  import { TournamentRule } from '../tournament-rules';
22
23
  import { TournamentTeamContactAttempt } from '../tournament-team-contact-attempts';
23
24
  import { TournamentTeam } from '../tournament-teams';
@@ -68,6 +69,7 @@ export declare class Tournament implements TournamentContract {
68
69
  matchRules: TournamentMatchRule[];
69
70
  contacts: TournamentContact[];
70
71
  registrationRequests: TournamentRegistrationRequest[];
72
+ registrationRequirements: TournamentRegistrationRequirement[];
71
73
  contactAttempts: TournamentTeamContactAttempt[];
72
74
  allowedPhones: TournamentAllowedPhone[];
73
75
  trophies: TeamTrophy[];
@@ -1 +1 @@
1
- {"version":3,"file":"tournament.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournaments/tournament.entity.ts"],"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EAAE,sBAAsB,CAAC;IAG/B,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAGlC,QAAQ,EAAE,iBAAiB,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;IAGnD,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAG9B,YAAY,EAAE,qBAAqB,EAAE,CAAC;IAItC,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAGlC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAG9B,oBAAoB,EAAE,6BAA6B,EAAE,CAAC;IAGtD,wBAAwB,EAAE,iCAAiC,EAAE,CAAC;IAG9D,eAAe,EAAE,4BAA4B,EAAE,CAAC;IAGhD,aAAa,EAAE,sBAAsB,EAAE,CAAC;IAKxC,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB"}
@@ -45,6 +45,7 @@ import { TournamentPayment } from "../tournament-payments/index.js";
45
45
  import { TournamentPlayerRule } from "../tournament-player-rules/index.js";
46
46
  import { TournamentPrizeRule } from "../tournament-prize-rules/index.js";
47
47
  import { TournamentRegistrationRequest } from "../tournament-registration-requests/index.js";
48
+ import { TournamentRegistrationRequirement } from "../tournament-registration-requirements/index.js";
48
49
  import { TournamentRule } from "../tournament-rules/index.js";
49
50
  import { TournamentTeamContactAttempt } from "../tournament-team-contact-attempts/index.js";
50
51
  import { TournamentTeam } from "../tournament-teams/index.js";
@@ -294,6 +295,9 @@ __decorateClass([
294
295
  __decorateClass([
295
296
  OneToMany(() => TournamentRegistrationRequest, (request) => request.tournament)
296
297
  ], Tournament.prototype, "registrationRequests", 2);
298
+ __decorateClass([
299
+ OneToMany(() => TournamentRegistrationRequirement, (requirement) => requirement.tournament)
300
+ ], Tournament.prototype, "registrationRequirements", 2);
297
301
  __decorateClass([
298
302
  OneToMany(() => TournamentTeamContactAttempt, (attempt) => attempt.tournament)
299
303
  ], Tournament.prototype, "contactAttempts", 2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.4.108",
3
+ "version": "1.5.1",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -1,6 +0,0 @@
1
- export declare enum NotificationPlatform {
2
- ANDROID = "android",
3
- IOS = "ios",
4
- WEB = "web"
5
- }
6
- //# sourceMappingURL=notification-platform.enum.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notification-platform.enum.d.ts","sourceRoot":"","sources":["../../../../src/notifications/notification-tokens/enums/notification-platform.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC9B,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,GAAG,QAAQ;CACZ"}
@@ -1,9 +0,0 @@
1
- var NotificationPlatform = /* @__PURE__ */ ((NotificationPlatform2) => {
2
- NotificationPlatform2["ANDROID"] = "android";
3
- NotificationPlatform2["IOS"] = "ios";
4
- NotificationPlatform2["WEB"] = "web";
5
- return NotificationPlatform2;
6
- })(NotificationPlatform || {});
7
- export {
8
- NotificationPlatform
9
- };
@@ -1,3 +0,0 @@
1
- export { NotificationToken } from './notification-token.entity';
2
- export { NotificationPlatform } from './enums/notification-platform.enum';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/notifications/notification-tokens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC"}
@@ -1,6 +0,0 @@
1
- import { NotificationToken } from "./notification-token.entity.js";
2
- import { NotificationPlatform } from "./enums/notification-platform.enum.js";
3
- export {
4
- NotificationPlatform,
5
- NotificationToken
6
- };
@@ -1,14 +0,0 @@
1
- import { User } from '../../app-auth';
2
- import { NotificationPlatform } from './enums/notification-platform.enum';
3
- export declare class NotificationToken {
4
- id: string;
5
- token: string;
6
- platform: NotificationPlatform;
7
- appVersion: string | null;
8
- isRevoked: boolean;
9
- createdAt: Date;
10
- lastSeenAt: Date;
11
- userId: string;
12
- user: User;
13
- }
14
- //# sourceMappingURL=notification-token.entity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notification-token.entity.d.ts","sourceRoot":"","sources":["../../../src/notifications/notification-tokens/notification-token.entity.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAY1E,qBAGa,iBAAiB;IAI5B,EAAE,EAAE,MAAM,CAAC;IAQX,KAAK,EAAE,MAAM,CAAC;IAOd,QAAQ,EAAE,oBAAoB,CAAC;IAS/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,SAAS,EAAE,OAAO,CAAC;IAOnB,SAAS,EAAE,IAAI,CAAC;IAOhB,UAAU,EAAE,IAAI,CAAC;IASjB,MAAM,EAAE,MAAM,CAAC;IAKf,IAAI,EAAE,IAAI,CAAC;CACZ"}
@@ -1,94 +0,0 @@
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 {
12
- Column,
13
- CreateDateColumn,
14
- Entity,
15
- Index,
16
- ManyToOne,
17
- PrimaryGeneratedColumn,
18
- UpdateDateColumn
19
- } from "typeorm";
20
- import { User } from "../../app-auth/index.js";
21
- import { NotificationPlatform } from "./enums/notification-platform.enum.js";
22
- let NotificationToken = class {
23
- };
24
- __decorateClass([
25
- PrimaryGeneratedColumn("uuid", {
26
- comment: "Identificador \xFAnico do token (UUID)."
27
- })
28
- ], NotificationToken.prototype, "id", 2);
29
- __decorateClass([
30
- Column({
31
- name: "token",
32
- type: "varchar",
33
- length: 255,
34
- comment: "Registration token gerado pelo Firebase para o dispositivo."
35
- })
36
- ], NotificationToken.prototype, "token", 2);
37
- __decorateClass([
38
- Column({
39
- type: "enum",
40
- enum: NotificationPlatform,
41
- comment: "Plataforma do dispositivo."
42
- })
43
- ], NotificationToken.prototype, "platform", 2);
44
- __decorateClass([
45
- Column({
46
- name: "app_version",
47
- type: "varchar",
48
- length: 32,
49
- nullable: true,
50
- comment: "Vers\xE3o do app no momento do cadastro/refresh."
51
- })
52
- ], NotificationToken.prototype, "appVersion", 2);
53
- __decorateClass([
54
- Column({
55
- name: "is_revoked",
56
- type: "bool",
57
- default: false,
58
- comment: "Indica se o token foi revogado (logout, erro 404/410 do FCM)."
59
- })
60
- ], NotificationToken.prototype, "isRevoked", 2);
61
- __decorateClass([
62
- CreateDateColumn({
63
- name: "created_at",
64
- type: "timestamptz",
65
- comment: "Data de cria\xE7\xE3o do token."
66
- })
67
- ], NotificationToken.prototype, "createdAt", 2);
68
- __decorateClass([
69
- UpdateDateColumn({
70
- name: "last_seen_at",
71
- type: "timestamptz",
72
- comment: "\xDAltima vez que este token foi visto (refresh ou push bem-sucedido)."
73
- })
74
- ], NotificationToken.prototype, "lastSeenAt", 2);
75
- __decorateClass([
76
- Column({
77
- name: "user_id",
78
- type: "uuid",
79
- comment: "FK users.id"
80
- })
81
- ], NotificationToken.prototype, "userId", 2);
82
- __decorateClass([
83
- ManyToOne(() => User, (user) => user.notificationTokens, {
84
- onDelete: "CASCADE"
85
- })
86
- ], NotificationToken.prototype, "user", 2);
87
- NotificationToken = __decorateClass([
88
- Entity("notification_tokens"),
89
- Index("IDX_notification_tokens_token", ["token"], { unique: true }),
90
- Index("IDX_notification_tokens_user", ["userId"])
91
- ], NotificationToken);
92
- export {
93
- NotificationToken
94
- };