@natrave/shared-entities 1.1.3 → 1.1.5
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.
- package/dist/app-auth/index.d.ts +6 -0
- package/dist/app-auth/index.d.ts.map +1 -0
- package/{src/app-auth/index.ts → dist/app-auth/index.js} +1 -0
- package/dist/app-auth/index.js.map +1 -0
- package/dist/app-auth/password-resets/index.d.ts +2 -0
- package/dist/app-auth/password-resets/index.d.ts.map +1 -0
- package/{src/app-auth/password-resets/index.ts → dist/app-auth/password-resets/index.js} +1 -0
- package/dist/app-auth/password-resets/index.js.map +1 -0
- package/dist/app-auth/password-resets/password-reset.entity.d.ts +11 -0
- package/dist/app-auth/password-resets/password-reset.entity.d.ts.map +1 -0
- package/dist/app-auth/password-resets/password-reset.entity.js +48 -0
- package/dist/app-auth/password-resets/password-reset.entity.js.map +1 -0
- package/dist/app-auth/refresh-tokens/index.d.ts +2 -0
- package/dist/app-auth/refresh-tokens/index.d.ts.map +1 -0
- package/{src/app-auth/refresh-tokens/index.ts → dist/app-auth/refresh-tokens/index.js} +1 -0
- package/dist/app-auth/refresh-tokens/index.js.map +1 -0
- package/dist/app-auth/refresh-tokens/refresh-token.entity.d.ts +11 -0
- package/dist/app-auth/refresh-tokens/refresh-token.entity.d.ts.map +1 -0
- package/dist/app-auth/refresh-tokens/refresh-token.entity.js +48 -0
- package/dist/app-auth/refresh-tokens/refresh-token.entity.js.map +1 -0
- package/dist/app-auth/user-auth-providers/enums/auth-provider.enum.d.ts +6 -0
- package/dist/app-auth/user-auth-providers/enums/auth-provider.enum.d.ts.map +1 -0
- package/dist/app-auth/user-auth-providers/enums/auth-provider.enum.js +7 -0
- package/dist/app-auth/user-auth-providers/enums/auth-provider.enum.js.map +1 -0
- package/dist/app-auth/user-auth-providers/index.d.ts +3 -0
- package/dist/app-auth/user-auth-providers/index.d.ts.map +1 -0
- package/{src/app-auth/user-auth-providers/index.ts → dist/app-auth/user-auth-providers/index.js} +1 -1
- package/dist/app-auth/user-auth-providers/index.js.map +1 -0
- package/dist/app-auth/user-auth-providers/user-auth-provider.entity.d.ts +13 -0
- package/dist/app-auth/user-auth-providers/user-auth-provider.entity.d.ts.map +1 -0
- package/dist/app-auth/user-auth-providers/user-auth-provider.entity.js +53 -0
- package/dist/app-auth/user-auth-providers/user-auth-provider.entity.js.map +1 -0
- package/dist/app-auth/user-verifications/enums/verification-type.enum.d.ts +5 -0
- package/dist/app-auth/user-verifications/enums/verification-type.enum.d.ts.map +1 -0
- package/dist/app-auth/user-verifications/enums/verification-type.enum.js +6 -0
- package/dist/app-auth/user-verifications/enums/verification-type.enum.js.map +1 -0
- package/dist/app-auth/user-verifications/index.d.ts +3 -0
- package/dist/app-auth/user-verifications/index.d.ts.map +1 -0
- package/{src/app-auth/user-verifications/index.ts → dist/app-auth/user-verifications/index.js} +1 -1
- package/dist/app-auth/user-verifications/index.js.map +1 -0
- package/dist/app-auth/user-verifications/user-verification.entity.d.ts +15 -0
- package/dist/app-auth/user-verifications/user-verification.entity.d.ts.map +1 -0
- package/dist/app-auth/user-verifications/user-verification.entity.js +60 -0
- package/dist/app-auth/user-verifications/user-verification.entity.js.map +1 -0
- package/dist/app-auth/users/index.d.ts +2 -0
- package/dist/app-auth/users/index.d.ts.map +1 -0
- package/{src/app-auth/users/index.ts → dist/app-auth/users/index.js} +1 -0
- package/dist/app-auth/users/index.js.map +1 -0
- package/dist/app-auth/users/user.entity.d.ts +29 -0
- package/dist/app-auth/users/user.entity.d.ts.map +1 -0
- package/dist/app-auth/users/user.entity.js +136 -0
- package/dist/app-auth/users/user.entity.js.map +1 -0
- package/dist/app-auth/users/utils/format-data.utils.d.ts +7 -0
- package/dist/app-auth/users/utils/format-data.utils.d.ts.map +1 -0
- package/dist/app-auth/users/utils/format-data.utils.js +19 -0
- package/dist/app-auth/users/utils/format-data.utils.js.map +1 -0
- package/dist/common/utils/decimal-transformer.utils.d.ts +5 -0
- package/dist/common/utils/decimal-transformer.utils.d.ts.map +1 -0
- package/dist/common/utils/decimal-transformer.utils.js +15 -0
- package/dist/common/utils/decimal-transformer.utils.js.map +1 -0
- package/dist/facilities/addresses/address.entity.d.ts +18 -0
- package/dist/facilities/addresses/address.entity.d.ts.map +1 -0
- package/dist/facilities/addresses/address.entity.js +87 -0
- package/dist/facilities/addresses/address.entity.js.map +1 -0
- package/dist/facilities/addresses/index.d.ts +2 -0
- package/dist/facilities/addresses/index.d.ts.map +1 -0
- package/{src/facilities/addresses/index.ts → dist/facilities/addresses/index.js} +1 -0
- package/dist/facilities/addresses/index.js.map +1 -0
- package/dist/facilities/facilities/enums/facility-status.enum.d.ts +6 -0
- package/dist/facilities/facilities/enums/facility-status.enum.d.ts.map +1 -0
- package/dist/facilities/facilities/enums/facility-status.enum.js +7 -0
- package/dist/facilities/facilities/enums/facility-status.enum.js.map +1 -0
- package/dist/facilities/facilities/facility.entity.d.ts +26 -0
- package/dist/facilities/facilities/facility.entity.d.ts.map +1 -0
- package/dist/facilities/facilities/facility.entity.js +124 -0
- package/dist/facilities/facilities/facility.entity.js.map +1 -0
- package/dist/facilities/facilities/index.d.ts +3 -0
- package/dist/facilities/facilities/index.d.ts.map +1 -0
- package/{src/facilities/facilities/index.ts → dist/facilities/facilities/index.js} +1 -1
- package/dist/facilities/facilities/index.js.map +1 -0
- package/dist/facilities/facilities/utils/sanititze.utils.d.ts +5 -0
- package/dist/facilities/facilities/utils/sanititze.utils.d.ts.map +1 -0
- package/dist/facilities/facilities/utils/sanititze.utils.js +12 -0
- package/dist/facilities/facilities/utils/sanititze.utils.js.map +1 -0
- package/dist/facilities/facility-images/facility-image.entity.d.ts +12 -0
- package/dist/facilities/facility-images/facility-image.entity.d.ts.map +1 -0
- package/dist/facilities/facility-images/facility-image.entity.js +59 -0
- package/dist/facilities/facility-images/facility-image.entity.js.map +1 -0
- package/dist/facilities/facility-images/index.d.ts +2 -0
- package/dist/facilities/facility-images/index.d.ts.map +1 -0
- package/{src/facilities/facility-images/index.ts → dist/facilities/facility-images/index.js} +1 -0
- package/dist/facilities/facility-images/index.js.map +1 -0
- package/dist/facilities/facility-owners/facility-owner.entity.d.ts +13 -0
- package/dist/facilities/facility-owners/facility-owner.entity.d.ts.map +1 -0
- package/dist/facilities/facility-owners/facility-owner.entity.js +65 -0
- package/dist/facilities/facility-owners/facility-owner.entity.js.map +1 -0
- package/dist/facilities/facility-owners/index.d.ts +2 -0
- package/dist/facilities/facility-owners/index.d.ts.map +1 -0
- package/{src/facilities/facility-owners/index.ts → dist/facilities/facility-owners/index.js} +1 -0
- package/dist/facilities/facility-owners/index.js.map +1 -0
- package/dist/facilities/facility-owners/utils/sanitize.utils.d.ts +5 -0
- package/dist/facilities/facility-owners/utils/sanitize.utils.d.ts.map +1 -0
- package/dist/facilities/facility-owners/utils/sanitize.utils.js +9 -0
- package/dist/facilities/facility-owners/utils/sanitize.utils.js.map +1 -0
- package/dist/facilities/fields/enums/surface-type.enum.d.ts +8 -0
- package/dist/facilities/fields/enums/surface-type.enum.d.ts.map +1 -0
- package/dist/facilities/fields/enums/surface-type.enum.js +9 -0
- package/dist/facilities/fields/enums/surface-type.enum.js.map +1 -0
- package/dist/facilities/fields/field.entity.d.ts +18 -0
- package/dist/facilities/fields/field.entity.d.ts.map +1 -0
- package/dist/facilities/fields/field.entity.js +72 -0
- package/dist/facilities/fields/field.entity.js.map +1 -0
- package/dist/facilities/fields/index.d.ts +3 -0
- package/dist/facilities/fields/index.d.ts.map +1 -0
- package/{src/facilities/fields/index.ts → dist/facilities/fields/index.js} +1 -1
- package/dist/facilities/fields/index.js.map +1 -0
- package/dist/facilities/index.d.ts +6 -0
- package/dist/facilities/index.d.ts.map +1 -0
- package/{src/facilities/index.ts → dist/facilities/index.js} +1 -0
- package/dist/facilities/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/{src/index.ts → dist/index.js} +1 -3
- package/dist/index.js.map +1 -0
- package/dist/payments/index.d.ts +4 -0
- package/dist/payments/index.d.ts.map +1 -0
- package/{src/payments/index.ts → dist/payments/index.js} +1 -2
- package/dist/payments/index.js.map +1 -0
- package/dist/payments/payment-providers/enums/payment-provider-name.enum.d.ts +4 -0
- package/dist/payments/payment-providers/enums/payment-provider-name.enum.d.ts.map +1 -0
- package/dist/payments/payment-providers/enums/payment-provider-name.enum.js +5 -0
- package/dist/payments/payment-providers/enums/payment-provider-name.enum.js.map +1 -0
- package/dist/payments/payment-providers/index.d.ts +3 -0
- package/dist/payments/payment-providers/index.d.ts.map +1 -0
- package/{src/payments/payment-providers/index.ts → dist/payments/payment-providers/index.js} +1 -1
- package/dist/payments/payment-providers/index.js.map +1 -0
- package/dist/payments/payment-providers/payment-provider.entity.d.ts +10 -0
- package/dist/payments/payment-providers/payment-provider.entity.d.ts.map +1 -0
- package/dist/payments/payment-providers/payment-provider.entity.js +50 -0
- package/dist/payments/payment-providers/payment-provider.entity.js.map +1 -0
- package/dist/payments/payments/enums/payment-method.enum.d.ts +5 -0
- package/dist/payments/payments/enums/payment-method.enum.d.ts.map +1 -0
- package/dist/payments/payments/enums/payment-method.enum.js +6 -0
- package/dist/payments/payments/enums/payment-method.enum.js.map +1 -0
- package/dist/payments/payments/enums/payment-status.enum.d.ts +10 -0
- package/dist/payments/payments/enums/payment-status.enum.d.ts.map +1 -0
- package/dist/payments/payments/enums/payment-status.enum.js +11 -0
- package/dist/payments/payments/enums/payment-status.enum.js.map +1 -0
- package/dist/payments/payments/index.d.ts +4 -0
- package/dist/payments/payments/index.d.ts.map +1 -0
- package/{src/payments/payments/index.ts → dist/payments/payments/index.js} +1 -2
- package/dist/payments/payments/index.js.map +1 -0
- package/dist/payments/payments/payment.entity.d.ts +19 -0
- package/dist/payments/payments/payment.entity.d.ts.map +1 -0
- package/dist/payments/payments/payment.entity.js +85 -0
- package/dist/payments/payments/payment.entity.js.map +1 -0
- package/dist/payments/user-payment-providers/index.d.ts +2 -0
- package/dist/payments/user-payment-providers/index.d.ts.map +1 -0
- package/{src/payments/user-payment-providers/index.ts → dist/payments/user-payment-providers/index.js} +1 -0
- package/dist/payments/user-payment-providers/index.js.map +1 -0
- package/dist/payments/user-payment-providers/user-payment-provider.entity.d.ts +13 -0
- package/dist/payments/user-payment-providers/user-payment-provider.entity.d.ts.map +1 -0
- package/dist/payments/user-payment-providers/user-payment-provider.entity.js +61 -0
- package/dist/payments/user-payment-providers/user-payment-provider.entity.js.map +1 -0
- package/dist/tournaments/index.d.ts +13 -0
- package/dist/tournaments/index.d.ts.map +1 -0
- package/{src/tournaments/index.ts → dist/tournaments/index.js} +1 -0
- package/dist/tournaments/index.js.map +1 -0
- package/dist/tournaments/tournament-facilities/index.d.ts +2 -0
- package/dist/tournaments/tournament-facilities/index.d.ts.map +1 -0
- package/{src/tournaments/tournament-facilities/index.ts → dist/tournaments/tournament-facilities/index.js} +1 -0
- package/dist/tournaments/tournament-facilities/index.js.map +1 -0
- package/dist/tournaments/tournament-facilities/tournament-facility.entity.d.ts +14 -0
- package/dist/tournaments/tournament-facilities/tournament-facility.entity.d.ts.map +1 -0
- package/dist/tournaments/tournament-facilities/tournament-facility.entity.js +61 -0
- package/dist/tournaments/tournament-facilities/tournament-facility.entity.js.map +1 -0
- package/dist/tournaments/tournament-format-configs/index.d.ts +2 -0
- package/dist/tournaments/tournament-format-configs/index.d.ts.map +1 -0
- package/{src/tournaments/tournament-format-configs/index.ts → dist/tournaments/tournament-format-configs/index.js} +1 -0
- package/dist/tournaments/tournament-format-configs/index.js.map +1 -0
- package/dist/tournaments/tournament-format-configs/tournament-format-config.entity.d.ts +15 -0
- package/dist/tournaments/tournament-format-configs/tournament-format-config.entity.d.ts.map +1 -0
- package/dist/tournaments/tournament-format-configs/tournament-format-config.entity.js +76 -0
- package/dist/tournaments/tournament-format-configs/tournament-format-config.entity.js.map +1 -0
- package/dist/tournaments/tournament-match-cards/index.d.ts +2 -0
- package/dist/tournaments/tournament-match-cards/index.d.ts.map +1 -0
- package/{src/tournaments/tournament-match-cards/index.ts → dist/tournaments/tournament-match-cards/index.js} +1 -0
- package/dist/tournaments/tournament-match-cards/index.js.map +1 -0
- package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.d.ts +19 -0
- package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.d.ts.map +1 -0
- package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.js +75 -0
- package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.js.map +1 -0
- package/dist/tournaments/tournament-match-goals/index.d.ts +2 -0
- package/dist/tournaments/tournament-match-goals/index.d.ts.map +1 -0
- package/{src/tournaments/tournament-match-goals/index.ts → dist/tournaments/tournament-match-goals/index.js} +1 -0
- package/dist/tournaments/tournament-match-goals/index.js.map +1 -0
- package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.d.ts +20 -0
- package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.d.ts.map +1 -0
- package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.js +79 -0
- package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.js.map +1 -0
- package/dist/tournaments/tournament-match-schemas/index.d.ts +2 -0
- package/dist/tournaments/tournament-match-schemas/index.d.ts.map +1 -0
- package/{src/tournaments/tournament-match-schemas/index.ts → dist/tournaments/tournament-match-schemas/index.js} +1 -0
- package/dist/tournaments/tournament-match-schemas/index.js.map +1 -0
- package/dist/tournaments/tournament-match-schemas/tournament-match-schema.entity.d.ts +12 -0
- package/dist/tournaments/tournament-match-schemas/tournament-match-schema.entity.d.ts.map +1 -0
- package/dist/tournaments/tournament-match-schemas/tournament-match-schema.entity.js +47 -0
- package/dist/tournaments/tournament-match-schemas/tournament-match-schema.entity.js.map +1 -0
- package/dist/tournaments/tournament-matches/index.d.ts +2 -0
- package/dist/tournaments/tournament-matches/index.d.ts.map +1 -0
- package/{src/tournaments/tournament-matches/index.ts → dist/tournaments/tournament-matches/index.js} +1 -0
- package/dist/tournaments/tournament-matches/index.js.map +1 -0
- package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts +25 -0
- package/dist/tournaments/tournament-matches/tournament-match.entity.d.ts.map +1 -0
- package/dist/tournaments/tournament-matches/tournament-match.entity.js +97 -0
- package/dist/tournaments/tournament-matches/tournament-match.entity.js.map +1 -0
- package/dist/tournaments/tournament-payments/index.d.ts +2 -0
- package/dist/tournaments/tournament-payments/index.d.ts.map +1 -0
- package/{src/tournaments/tournament-payments/index.ts → dist/tournaments/tournament-payments/index.js} +1 -0
- package/dist/tournaments/tournament-payments/index.js.map +1 -0
- package/dist/tournaments/tournament-payments/tournament-payment.entity.d.ts +16 -0
- package/dist/tournaments/tournament-payments/tournament-payment.entity.d.ts.map +1 -0
- package/dist/tournaments/tournament-payments/tournament-payment.entity.js +59 -0
- package/dist/tournaments/tournament-payments/tournament-payment.entity.js.map +1 -0
- package/dist/tournaments/tournament-players/index.d.ts +2 -0
- package/dist/tournaments/tournament-players/index.d.ts.map +1 -0
- package/{src/tournaments/tournament-players/index.ts → dist/tournaments/tournament-players/index.js} +1 -0
- package/dist/tournaments/tournament-players/index.js.map +1 -0
- package/dist/tournaments/tournament-players/tournament-player.entity.d.ts +19 -0
- package/dist/tournaments/tournament-players/tournament-player.entity.d.ts.map +1 -0
- package/dist/tournaments/tournament-players/tournament-player.entity.js +76 -0
- package/dist/tournaments/tournament-players/tournament-player.entity.js.map +1 -0
- package/dist/tournaments/tournament-prize-rules/index.d.ts +2 -0
- package/dist/tournaments/tournament-prize-rules/index.d.ts.map +1 -0
- package/{src/tournaments/tournament-prize-rules/index.ts → dist/tournaments/tournament-prize-rules/index.js} +1 -0
- package/dist/tournaments/tournament-prize-rules/index.js.map +1 -0
- package/dist/tournaments/tournament-prize-rules/tournament-prize-rule.entity.d.ts +13 -0
- package/dist/tournaments/tournament-prize-rules/tournament-prize-rule.entity.d.ts.map +1 -0
- package/dist/tournaments/tournament-prize-rules/tournament-prize-rule.entity.js +55 -0
- package/dist/tournaments/tournament-prize-rules/tournament-prize-rule.entity.js.map +1 -0
- package/dist/tournaments/tournament-rules/index.d.ts +2 -0
- package/dist/tournaments/tournament-rules/index.d.ts.map +1 -0
- package/{src/tournaments/tournament-rules/index.ts → dist/tournaments/tournament-rules/index.js} +1 -0
- package/dist/tournaments/tournament-rules/index.js.map +1 -0
- package/dist/tournaments/tournament-rules/tournament-rule.entity.d.ts +17 -0
- package/dist/tournaments/tournament-rules/tournament-rule.entity.d.ts.map +1 -0
- package/dist/tournaments/tournament-rules/tournament-rule.entity.js +77 -0
- package/dist/tournaments/tournament-rules/tournament-rule.entity.js.map +1 -0
- package/dist/tournaments/tournament-teams/enums/tournament-team-status.enum.d.ts +5 -0
- package/dist/tournaments/tournament-teams/enums/tournament-team-status.enum.d.ts.map +1 -0
- package/dist/tournaments/tournament-teams/enums/tournament-team-status.enum.js +6 -0
- package/dist/tournaments/tournament-teams/enums/tournament-team-status.enum.js.map +1 -0
- package/dist/tournaments/tournament-teams/index.d.ts +3 -0
- package/dist/tournaments/tournament-teams/index.d.ts.map +1 -0
- package/{src/tournaments/tournament-teams/index.ts → dist/tournaments/tournament-teams/index.js} +1 -1
- package/dist/tournaments/tournament-teams/index.js.map +1 -0
- package/dist/tournaments/tournament-teams/tournament-team.entity.d.ts +26 -0
- package/dist/tournaments/tournament-teams/tournament-team.entity.d.ts.map +1 -0
- package/dist/tournaments/tournament-teams/tournament-team.entity.js +100 -0
- package/dist/tournaments/tournament-teams/tournament-team.entity.js.map +1 -0
- package/dist/tournaments/tournament-teams/utils/invite-code-generator.d.ts +2 -0
- package/dist/tournaments/tournament-teams/utils/invite-code-generator.d.ts.map +1 -0
- package/dist/tournaments/tournament-teams/utils/invite-code-generator.js +4 -0
- package/dist/tournaments/tournament-teams/utils/invite-code-generator.js.map +1 -0
- package/dist/tournaments/tournaments/index.d.ts +2 -0
- package/dist/tournaments/tournaments/index.d.ts.map +1 -0
- package/{src/tournaments/tournaments/index.ts → dist/tournaments/tournaments/index.js} +1 -0
- package/dist/tournaments/tournaments/index.js.map +1 -0
- package/dist/tournaments/tournaments/tournament.entity.d.ts +39 -0
- package/dist/tournaments/tournaments/tournament.entity.d.ts.map +1 -0
- package/dist/tournaments/tournaments/tournament.entity.js +147 -0
- package/dist/tournaments/tournaments/tournament.entity.js.map +1 -0
- package/package.json +5 -2
- package/.changeset/README.md +0 -9
- package/.changeset/config.json +0 -11
- package/.github/workflows/release.yml +0 -80
- package/.husky/pre-commit +0 -4
- package/.husky/pre-push +0 -4
- package/.lintstagedrc.json +0 -5
- package/.prettierignore +0 -2
- package/.prettierrc.json +0 -12
- package/CHANGELOG.md +0 -29
- package/eslint.config.js +0 -84
- package/src/app-auth/password-resets/password-reset.entity.ts +0 -52
- package/src/app-auth/refresh-tokens/refresh-token.entity.ts +0 -52
- package/src/app-auth/user-auth-providers/enums/auth-provider.enum.ts +0 -24
- package/src/app-auth/user-auth-providers/user-auth-provider.entity.ts +0 -58
- package/src/app-auth/user-verifications/enums/verification-type.enum.ts +0 -19
- package/src/app-auth/user-verifications/user-verification.entity.ts +0 -62
- package/src/app-auth/users/user.entity.ts +0 -149
- package/src/app-auth/users/utils/format-data.utils.ts +0 -38
- package/src/common/utils/decimal-transformer.utils.ts +0 -13
- package/src/facilities/addresses/address.entity.ts +0 -82
- package/src/facilities/facilities/enums/facility-status.enum.ts +0 -25
- package/src/facilities/facilities/facility.entity.ts +0 -137
- package/src/facilities/facilities/utils/sanititze.utils.ts +0 -19
- package/src/facilities/facility-images/facility-image.entity.ts +0 -64
- package/src/facilities/facility-owners/facility-owner.entity.ts +0 -74
- package/src/facilities/facility-owners/utils/sanitize.utils.ts +0 -16
- package/src/facilities/fields/enums/surface-type.enum.ts +0 -35
- package/src/facilities/fields/field.entity.ts +0 -74
- package/src/payments/payment-providers/enums/payment-provider-name.enum.ts +0 -15
- package/src/payments/payment-providers/payment-provider.entity.ts +0 -61
- package/src/payments/payments/enums/payment-method.enum.ts +0 -20
- package/src/payments/payments/enums/payment-status.enum.ts +0 -45
- package/src/payments/payments/payment.entity.ts +0 -84
- package/src/payments/user-payment-providers/user-payment-provider.entity.ts +0 -73
- package/src/tournaments/tournament-facilities/tournament-facility.entity.ts +0 -67
- package/src/tournaments/tournament-format-configs/tournament-format-config.entity.ts +0 -98
- package/src/tournaments/tournament-match-cards/tournament-match-card.entity.ts +0 -86
- package/src/tournaments/tournament-match-goals/tournament-match-goal.entity.ts +0 -88
- package/src/tournaments/tournament-match-schemas/tournament-match-schema.entity.ts +0 -51
- package/src/tournaments/tournament-matches/tournament-match.entity.ts +0 -120
- package/src/tournaments/tournament-payments/tournament-payment.entity.ts +0 -67
- package/src/tournaments/tournament-players/tournament-player.entity.ts +0 -96
- package/src/tournaments/tournament-prize-rules/tournament-prize-rule.entity.ts +0 -65
- package/src/tournaments/tournament-rules/tournament-rule.entity.ts +0 -77
- package/src/tournaments/tournament-teams/enums/tournament-team-status.enum.ts +0 -21
- package/src/tournaments/tournament-teams/tournament-team.entity.ts +0 -121
- package/src/tournaments/tournament-teams/utils/invite-code-generator.ts +0 -12
- package/src/tournaments/tournaments/tournament.entity.ts +0 -153
- package/tsconfig.json +0 -29
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enum que representa os status de pagamento disponíveis.
|
|
3
|
-
*
|
|
4
|
-
* @remarks
|
|
5
|
-
* Este enum fornece valores para identificar o status de um pagamento,
|
|
6
|
-
* garantindo consistência ao referenciar o status na aplicação.
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
export enum PaymentStatus {
|
|
11
|
-
/**
|
|
12
|
-
* Pagamento pendente.
|
|
13
|
-
*/
|
|
14
|
-
PENDING = 'PENDING',
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Pagamento realizado com sucesso.
|
|
18
|
-
*/
|
|
19
|
-
PAID = 'PAID',
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Pagamento falhou.
|
|
23
|
-
*/
|
|
24
|
-
FAILED = 'FAILED',
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Pagamento expirado.
|
|
28
|
-
*/
|
|
29
|
-
EXPIRED = 'EXPIRED',
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Pagamento cancelado.
|
|
33
|
-
*/
|
|
34
|
-
CANCELED = 'CANCELED',
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Pagamento reembolsado.
|
|
38
|
-
*/
|
|
39
|
-
REFUNDED = 'REFUNDED',
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Pagamento em processamento.
|
|
43
|
-
*/
|
|
44
|
-
PROCESSING = 'PROCESSING',
|
|
45
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Entity,
|
|
3
|
-
Column,
|
|
4
|
-
PrimaryGeneratedColumn,
|
|
5
|
-
CreateDateColumn,
|
|
6
|
-
UpdateDateColumn,
|
|
7
|
-
OneToMany,
|
|
8
|
-
} from 'typeorm';
|
|
9
|
-
|
|
10
|
-
import { PaymentProviderName } from 'payments/payment-providers';
|
|
11
|
-
import { TournamentPayment } from 'tournaments';
|
|
12
|
-
|
|
13
|
-
import { PaymentMethod } from './enums/payment-method.enum';
|
|
14
|
-
import { PaymentStatus } from './enums/payment-status.enum';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Entidade que representa um pagamento.
|
|
18
|
-
*
|
|
19
|
-
* @remarks
|
|
20
|
-
* Esta entidade armazena as informações referentes a um pagamento, incluindo o valor, método, status,
|
|
21
|
-
* provedor de pagamento, QR code (quando aplicável), data de expiração e as datas de criação e atualização.
|
|
22
|
-
* Além disso, mantém a relação com os pagamentos de torneio associados a este pagamento.
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
25
|
-
*/
|
|
26
|
-
@Entity('payments')
|
|
27
|
-
export class Payment {
|
|
28
|
-
@PrimaryGeneratedColumn()
|
|
29
|
-
id: number;
|
|
30
|
-
|
|
31
|
-
@Column({ name: 'external_id', type: 'varchar', length: 255, nullable: true })
|
|
32
|
-
externalId?: string;
|
|
33
|
-
|
|
34
|
-
@Column({ type: 'int' })
|
|
35
|
-
amount: number;
|
|
36
|
-
|
|
37
|
-
@Column({
|
|
38
|
-
name: 'payment_method',
|
|
39
|
-
type: 'enum',
|
|
40
|
-
enum: PaymentMethod,
|
|
41
|
-
})
|
|
42
|
-
paymentMethod: PaymentMethod;
|
|
43
|
-
|
|
44
|
-
@Column({
|
|
45
|
-
type: 'enum',
|
|
46
|
-
enum: PaymentStatus,
|
|
47
|
-
enumName: 'PaymentStatus',
|
|
48
|
-
default: PaymentStatus.PENDING,
|
|
49
|
-
})
|
|
50
|
-
status: PaymentStatus;
|
|
51
|
-
|
|
52
|
-
@Column({
|
|
53
|
-
type: 'enum',
|
|
54
|
-
enum: PaymentProviderName,
|
|
55
|
-
enumName: 'PaymentProviderName',
|
|
56
|
-
default: PaymentProviderName.PAGARME,
|
|
57
|
-
})
|
|
58
|
-
paymentProviderName: PaymentProviderName;
|
|
59
|
-
|
|
60
|
-
@Column({ name: 'qr_code_url', type: 'text', nullable: true })
|
|
61
|
-
qrCodeUrl?: string;
|
|
62
|
-
|
|
63
|
-
@Column({ name: 'qr_code', type: 'text', nullable: true })
|
|
64
|
-
qrCode?: string;
|
|
65
|
-
|
|
66
|
-
@Column({ name: 'expires_at', type: 'timestamptz', nullable: true })
|
|
67
|
-
expiresAt?: Date;
|
|
68
|
-
|
|
69
|
-
@CreateDateColumn({ name: 'created_at', type: 'timestamptz' })
|
|
70
|
-
createdAt: Date;
|
|
71
|
-
|
|
72
|
-
@UpdateDateColumn({ name: 'updated_at', type: 'timestamptz' })
|
|
73
|
-
updatedAt: Date;
|
|
74
|
-
|
|
75
|
-
/** RELAÇÕES */
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Relação com os pagamentos de torneio associados a este pagamento.
|
|
79
|
-
*/
|
|
80
|
-
@OneToMany(() => TournamentPayment, (tournamentPayment) => tournamentPayment.payment, {
|
|
81
|
-
cascade: true,
|
|
82
|
-
})
|
|
83
|
-
tournamentPayments: TournamentPayment[];
|
|
84
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Entity,
|
|
3
|
-
Column,
|
|
4
|
-
PrimaryGeneratedColumn,
|
|
5
|
-
CreateDateColumn,
|
|
6
|
-
UpdateDateColumn,
|
|
7
|
-
ManyToOne,
|
|
8
|
-
JoinColumn,
|
|
9
|
-
Unique,
|
|
10
|
-
Index,
|
|
11
|
-
} from 'typeorm';
|
|
12
|
-
|
|
13
|
-
import { User } from 'app-auth';
|
|
14
|
-
import { PaymentProvider } from 'payments/payment-providers';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Entidade que vincula um usuário a um provedor de pagamento.
|
|
18
|
-
*
|
|
19
|
-
* @remarks
|
|
20
|
-
* Esta entidade relaciona um usuário aos provedores de pagamento disponíveis no sistema.
|
|
21
|
-
* Ela garante que cada usuário tenha um registro único para cada provedor e armazena o identificador
|
|
22
|
-
* do usuário conforme retornado pelo provedor (providerCustomerId).
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
25
|
-
*/
|
|
26
|
-
@Entity('user_payment_providers')
|
|
27
|
-
@Unique(['providerCustomerId'])
|
|
28
|
-
@Unique(['userId', 'paymentProviderId'])
|
|
29
|
-
@Index(['userId', 'paymentProviderId'])
|
|
30
|
-
@Index(['providerCustomerId'])
|
|
31
|
-
export class UserPaymentProvider {
|
|
32
|
-
@PrimaryGeneratedColumn()
|
|
33
|
-
id: number;
|
|
34
|
-
|
|
35
|
-
@Column({ type: 'uuid', name: 'user_id' })
|
|
36
|
-
userId: string;
|
|
37
|
-
|
|
38
|
-
@Column({ type: 'int', name: 'payment_provider_id' })
|
|
39
|
-
paymentProviderId: number;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Identificador do usuário dentro do provedor de pagamento.
|
|
43
|
-
* Esse ID é retornado pelo provedor (exemplo: "cus_123456" no Pagar.me).
|
|
44
|
-
*/
|
|
45
|
-
@Column({ type: 'text', unique: true })
|
|
46
|
-
providerCustomerId: string;
|
|
47
|
-
|
|
48
|
-
@CreateDateColumn({ name: 'created_at', type: 'timestamptz' })
|
|
49
|
-
createdAt: Date;
|
|
50
|
-
|
|
51
|
-
@UpdateDateColumn({ name: 'updated_at', type: 'timestamptz' })
|
|
52
|
-
updatedAt: Date;
|
|
53
|
-
|
|
54
|
-
/** RELAÇÕES */
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Relação com o usuário ao qual este provedor de pagamento está vinculado.
|
|
58
|
-
*/
|
|
59
|
-
@ManyToOne(() => User, (user) => user.userPaymentProviders, {
|
|
60
|
-
onDelete: 'CASCADE',
|
|
61
|
-
})
|
|
62
|
-
@JoinColumn({ name: 'user_id' })
|
|
63
|
-
user: User;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Relação com o provedor de pagamento associado a este registro.
|
|
67
|
-
*/
|
|
68
|
-
@ManyToOne(() => PaymentProvider, (provider) => provider.userPaymentProviders, {
|
|
69
|
-
onDelete: 'CASCADE',
|
|
70
|
-
})
|
|
71
|
-
@JoinColumn({ name: 'payment_provider_id' })
|
|
72
|
-
paymentProvider: PaymentProvider;
|
|
73
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { ITournamentFacility } from '@natrave/tournaments-service-types';
|
|
2
|
-
import {
|
|
3
|
-
Entity,
|
|
4
|
-
Column,
|
|
5
|
-
PrimaryGeneratedColumn,
|
|
6
|
-
CreateDateColumn,
|
|
7
|
-
UpdateDateColumn,
|
|
8
|
-
ManyToOne,
|
|
9
|
-
JoinColumn,
|
|
10
|
-
Unique,
|
|
11
|
-
Index,
|
|
12
|
-
} from 'typeorm';
|
|
13
|
-
|
|
14
|
-
import { Facility } from 'facilities/facilities/facility.entity';
|
|
15
|
-
import { Tournament } from 'tournaments/tournaments';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Entidade que representa o relacionamento entre um torneio e um estabelecimento.
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
* Esta entidade armazena a associação entre um torneio e uma ão,
|
|
22
|
-
* permitindo identificar qual estabelecimento é o principal para o torneio.
|
|
23
|
-
*
|
|
24
|
-
* São aplicadas:
|
|
25
|
-
* - Uma restrição única para evitar associações duplicadas entre o mesmo torneio e estabelecimento.
|
|
26
|
-
* - Um índice composto em [tournamentId, isPrimary] para otimizar consultas que filtram pelo estabelecimento principal.
|
|
27
|
-
*
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
@Entity('tournament_facilities')
|
|
31
|
-
@Unique('tournament_facility_unique', ['tournamentId', 'facilityId'])
|
|
32
|
-
@Index('tournament_is_primary_index', ['tournamentId', 'isPrimary'])
|
|
33
|
-
export class TournamentFacility implements ITournamentFacility {
|
|
34
|
-
@PrimaryGeneratedColumn()
|
|
35
|
-
id: number;
|
|
36
|
-
|
|
37
|
-
@Column({ name: 'facility_id', type: 'int' })
|
|
38
|
-
facilityId: number;
|
|
39
|
-
|
|
40
|
-
@Column({ name: 'tournament_id', type: 'int' })
|
|
41
|
-
tournamentId: number;
|
|
42
|
-
|
|
43
|
-
@Column({ name: 'is_primary', type: 'boolean', default: false })
|
|
44
|
-
isPrimary: boolean;
|
|
45
|
-
|
|
46
|
-
@CreateDateColumn({ name: 'created_at', type: 'timestamptz' })
|
|
47
|
-
createdAt: Date;
|
|
48
|
-
|
|
49
|
-
@UpdateDateColumn({ name: 'updated_at', type: 'timestamptz' })
|
|
50
|
-
updatedAt: Date;
|
|
51
|
-
|
|
52
|
-
/** RELAÇÕES */
|
|
53
|
-
|
|
54
|
-
@ManyToOne(() => Tournament, (tournament) => tournament.tournamentFacilities, {
|
|
55
|
-
onDelete: 'CASCADE',
|
|
56
|
-
onUpdate: 'CASCADE',
|
|
57
|
-
})
|
|
58
|
-
@JoinColumn({ name: 'tournament_id' })
|
|
59
|
-
tournament: Tournament;
|
|
60
|
-
|
|
61
|
-
@ManyToOne(() => Facility, (facility) => facility.tournamentFacilities, {
|
|
62
|
-
onDelete: 'CASCADE',
|
|
63
|
-
onUpdate: 'CASCADE',
|
|
64
|
-
})
|
|
65
|
-
@JoinColumn({ name: 'facility_id' })
|
|
66
|
-
facility: Facility;
|
|
67
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
KnockoutPhase,
|
|
3
|
-
MatchLegMode,
|
|
4
|
-
TournamentFormat,
|
|
5
|
-
type ITournamentFormatConfig,
|
|
6
|
-
} from '@natrave/tournaments-service-types';
|
|
7
|
-
import {
|
|
8
|
-
Entity,
|
|
9
|
-
Column,
|
|
10
|
-
PrimaryGeneratedColumn,
|
|
11
|
-
CreateDateColumn,
|
|
12
|
-
UpdateDateColumn,
|
|
13
|
-
OneToOne,
|
|
14
|
-
JoinColumn,
|
|
15
|
-
} from 'typeorm';
|
|
16
|
-
|
|
17
|
-
import { Tournament } from 'tournaments/tournaments';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Entidade que representa a configuração adicional do formato de um torneio.
|
|
21
|
-
*
|
|
22
|
-
* @remarks
|
|
23
|
-
* Esta entidade armazena os parâmetros que detalham o formato do torneio,
|
|
24
|
-
* permitindo especificar o número de grupos, se os jogos da fase de grupos são disputados em sistema de ida e volta,
|
|
25
|
-
* a fase inicial do knockout e se os jogos do knockout são disputados em sistema de ida e volta.
|
|
26
|
-
*
|
|
27
|
-
* Geralmente, esta entidade está relacionada a um torneio por meio de uma relação 1:1.
|
|
28
|
-
*
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
@Entity('tournament_format_configs')
|
|
32
|
-
export class TournamentFormatConfig implements ITournamentFormatConfig {
|
|
33
|
-
@PrimaryGeneratedColumn()
|
|
34
|
-
id: number;
|
|
35
|
-
|
|
36
|
-
@Column({ name: 'tournament_id', type: 'int', unique: true })
|
|
37
|
-
tournamentId: number;
|
|
38
|
-
|
|
39
|
-
@Column({ type: 'enum', enum: TournamentFormat })
|
|
40
|
-
format: TournamentFormat;
|
|
41
|
-
|
|
42
|
-
@Column({ type: 'int', nullable: true, default: null })
|
|
43
|
-
numberOfGroups: number | null;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Modo de disputa na fase inicial do torneio (grupos ou round robin).
|
|
47
|
-
* Define se os jogos dessa fase serão disputados em ida única ou ida e volta.
|
|
48
|
-
* Caso não exista a fase de grupos ou round robin, deixamos como null
|
|
49
|
-
*/
|
|
50
|
-
@Column({
|
|
51
|
-
name: 'initial_phase_match_mode',
|
|
52
|
-
type: 'enum',
|
|
53
|
-
enum: MatchLegMode,
|
|
54
|
-
nullable: true,
|
|
55
|
-
default: null,
|
|
56
|
-
})
|
|
57
|
-
initialPhaseMatchMode: MatchLegMode | null;
|
|
58
|
-
|
|
59
|
-
@Column({
|
|
60
|
-
name: 'knockout_start_phase',
|
|
61
|
-
type: 'enum',
|
|
62
|
-
enum: KnockoutPhase,
|
|
63
|
-
nullable: true,
|
|
64
|
-
default: null,
|
|
65
|
-
})
|
|
66
|
-
knockoutStartPhase: KnockoutPhase | null;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Modo de disputa na fase knockout.
|
|
70
|
-
* Define se os jogos do knockout serão disputados em ida única ou ida e volta.
|
|
71
|
-
* Se o campeonato não tiver fase mata mata, deixamos como null
|
|
72
|
-
*/
|
|
73
|
-
@Column({
|
|
74
|
-
name: 'knockout_match_mode',
|
|
75
|
-
type: 'enum',
|
|
76
|
-
enum: MatchLegMode,
|
|
77
|
-
nullable: true,
|
|
78
|
-
default: null,
|
|
79
|
-
})
|
|
80
|
-
knockoutMatchMode: MatchLegMode | null;
|
|
81
|
-
|
|
82
|
-
@CreateDateColumn({ name: 'created_at', type: 'timestamptz' })
|
|
83
|
-
createdAt: Date;
|
|
84
|
-
|
|
85
|
-
@UpdateDateColumn({ name: 'updated_at', type: 'timestamptz' })
|
|
86
|
-
updatedAt: Date;
|
|
87
|
-
|
|
88
|
-
/** RELAÇÕES */
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Relação com o torneio ao qual o formato esta associado.
|
|
92
|
-
*/
|
|
93
|
-
@OneToOne(() => Tournament, (tournament) => tournament.format, {
|
|
94
|
-
onDelete: 'CASCADE',
|
|
95
|
-
})
|
|
96
|
-
@JoinColumn({ name: 'tournament_id' })
|
|
97
|
-
tournament: Tournament;
|
|
98
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CardType,
|
|
3
|
-
MatchPeriod,
|
|
4
|
-
type ITournamentMatchCard,
|
|
5
|
-
} from '@natrave/tournaments-service-types';
|
|
6
|
-
import {
|
|
7
|
-
Entity,
|
|
8
|
-
Column,
|
|
9
|
-
PrimaryGeneratedColumn,
|
|
10
|
-
CreateDateColumn,
|
|
11
|
-
UpdateDateColumn,
|
|
12
|
-
ManyToOne,
|
|
13
|
-
JoinColumn,
|
|
14
|
-
Index,
|
|
15
|
-
} from 'typeorm';
|
|
16
|
-
|
|
17
|
-
import { TournamentMatch } from 'tournaments/tournament-matches';
|
|
18
|
-
import { TournamentPlayer } from 'tournaments/tournament-players';
|
|
19
|
-
import { TournamentTeam } from 'tournaments/tournament-teams';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Entidade que representa um evento de cartão em uma partida do campeonato.
|
|
23
|
-
*
|
|
24
|
-
* @remarks
|
|
25
|
-
* Esta entidade armazena os dados referentes a um cartão emitido durante uma partida,
|
|
26
|
-
* incluindo o minuto (opcional), o período da partida (opcional),
|
|
27
|
-
* os identificadores do jogador e do time que receberam o cartão, o identificador da partida,
|
|
28
|
-
* o tipo de cartão, além das datas de criação e atualização do registro.
|
|
29
|
-
*
|
|
30
|
-
* @public
|
|
31
|
-
*/
|
|
32
|
-
@Entity('tournament_match_cards')
|
|
33
|
-
@Index(['matchId'])
|
|
34
|
-
@Index(['teamId'])
|
|
35
|
-
@Index(['playerId'])
|
|
36
|
-
export class TournamentMatchCard implements ITournamentMatchCard {
|
|
37
|
-
@PrimaryGeneratedColumn()
|
|
38
|
-
id: number;
|
|
39
|
-
|
|
40
|
-
@Column({ type: 'int', nullable: true })
|
|
41
|
-
minute?: number;
|
|
42
|
-
|
|
43
|
-
@Column({ type: 'enum', enum: MatchPeriod, nullable: true })
|
|
44
|
-
period?: MatchPeriod;
|
|
45
|
-
|
|
46
|
-
@Column({ name: 'player_id', type: 'int' })
|
|
47
|
-
playerId: number;
|
|
48
|
-
|
|
49
|
-
@Column({ name: 'team_id', type: 'int' })
|
|
50
|
-
teamId: number;
|
|
51
|
-
|
|
52
|
-
@Column({ name: 'match_id', type: 'int' })
|
|
53
|
-
matchId: number;
|
|
54
|
-
|
|
55
|
-
@Column({ type: 'enum', enum: CardType })
|
|
56
|
-
cardType: CardType;
|
|
57
|
-
|
|
58
|
-
@CreateDateColumn({ name: 'created_at', type: 'timestamptz' })
|
|
59
|
-
createdAt: Date;
|
|
60
|
-
|
|
61
|
-
@UpdateDateColumn({ name: 'updated_at', type: 'timestamptz' })
|
|
62
|
-
updatedAt: Date;
|
|
63
|
-
|
|
64
|
-
/** RELAÇÕES */
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Relação com o time associado ao evento de cartão.
|
|
68
|
-
*/
|
|
69
|
-
@ManyToOne(() => TournamentTeam, (team) => team.cards, { onDelete: 'CASCADE' })
|
|
70
|
-
@JoinColumn({ name: 'team_id' })
|
|
71
|
-
team: TournamentTeam;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Relação com a partida associada ao evento de cartão.
|
|
75
|
-
*/
|
|
76
|
-
@ManyToOne(() => TournamentMatch, (match) => match.cards, { onDelete: 'CASCADE' })
|
|
77
|
-
@JoinColumn({ name: 'match_id' })
|
|
78
|
-
match: TournamentMatch;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Relação com o jogador associado ao evento de cartão.
|
|
82
|
-
*/
|
|
83
|
-
@ManyToOne(() => TournamentPlayer, { onDelete: 'CASCADE' })
|
|
84
|
-
@JoinColumn({ name: 'player_id' })
|
|
85
|
-
player: TournamentPlayer;
|
|
86
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { ITournamentMatchGoal, MatchPeriod } from '@natrave/tournaments-service-types';
|
|
2
|
-
import {
|
|
3
|
-
Entity,
|
|
4
|
-
Column,
|
|
5
|
-
PrimaryGeneratedColumn,
|
|
6
|
-
CreateDateColumn,
|
|
7
|
-
UpdateDateColumn,
|
|
8
|
-
Index,
|
|
9
|
-
ManyToOne,
|
|
10
|
-
JoinColumn,
|
|
11
|
-
} from 'typeorm';
|
|
12
|
-
|
|
13
|
-
import { TournamentMatch } from 'tournaments/tournament-matches';
|
|
14
|
-
import { TournamentPlayer } from 'tournaments/tournament-players';
|
|
15
|
-
import { TournamentTeam } from 'tournaments/tournament-teams';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Entidade que representa um gol marcado em uma partida do campeonato.
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
* Esta entidade armazena os dados de um gol, incluindo o identificador do time que marcou,
|
|
22
|
-
* o identificador da partida, o minuto (opcional), o período da partida (opcional),
|
|
23
|
-
* os identificadores do jogador que marcou e do jogador que fez a assistência (opcionais),
|
|
24
|
-
* além das datas de criação e atualização do registro.
|
|
25
|
-
*
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
@Entity('tournament_match_goals')
|
|
29
|
-
@Index(['teamId'])
|
|
30
|
-
@Index(['matchId'])
|
|
31
|
-
export class TournamentMatchGoal implements ITournamentMatchGoal {
|
|
32
|
-
@PrimaryGeneratedColumn()
|
|
33
|
-
id: number;
|
|
34
|
-
|
|
35
|
-
@Column({ name: 'team_id', type: 'int' })
|
|
36
|
-
teamId: number;
|
|
37
|
-
|
|
38
|
-
@Column({ name: 'match_id', type: 'int' })
|
|
39
|
-
matchId: number;
|
|
40
|
-
|
|
41
|
-
@Column({ type: 'int', nullable: true })
|
|
42
|
-
minute?: number;
|
|
43
|
-
|
|
44
|
-
@Column({ type: 'enum', enum: MatchPeriod, nullable: true })
|
|
45
|
-
period?: MatchPeriod;
|
|
46
|
-
|
|
47
|
-
@Column({ name: 'scorer_id', type: 'int', nullable: true })
|
|
48
|
-
scorerId?: number;
|
|
49
|
-
|
|
50
|
-
@Column({ name: 'assist_id', type: 'int', nullable: true })
|
|
51
|
-
assistId?: number;
|
|
52
|
-
|
|
53
|
-
@CreateDateColumn({ name: 'created_at', type: 'timestamptz' })
|
|
54
|
-
createdAt: Date;
|
|
55
|
-
|
|
56
|
-
@UpdateDateColumn({ name: 'updated_at', type: 'timestamptz' })
|
|
57
|
-
updatedAt: Date;
|
|
58
|
-
|
|
59
|
-
/** RELAÇÕES */
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Relação com o time associado ao gol.
|
|
63
|
-
*/
|
|
64
|
-
@ManyToOne(() => TournamentTeam, (team) => team.goals, { onDelete: 'CASCADE' })
|
|
65
|
-
@JoinColumn({ name: 'team_id' })
|
|
66
|
-
team?: TournamentTeam;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Relação com a partida associada ao gol.
|
|
70
|
-
*/
|
|
71
|
-
@ManyToOne(() => TournamentMatch, (match) => match.goals, { onDelete: 'CASCADE' })
|
|
72
|
-
@JoinColumn({ name: 'team_id' })
|
|
73
|
-
match?: TournamentMatch;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Relação com o jogador autor do gol associado ao evento de gol.
|
|
77
|
-
*/
|
|
78
|
-
@ManyToOne(() => TournamentPlayer, (team) => team.goals, { onDelete: 'CASCADE' })
|
|
79
|
-
@JoinColumn({ name: 'scorer_id' })
|
|
80
|
-
scorer?: TournamentPlayer;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Relação com o jogador autor da assistencia associado ao evento de gol.
|
|
84
|
-
*/
|
|
85
|
-
@ManyToOne(() => TournamentPlayer, (team) => team.assists, { onDelete: 'CASCADE' })
|
|
86
|
-
@JoinColumn({ name: 'assist_id' })
|
|
87
|
-
assist?: TournamentPlayer;
|
|
88
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { ITournamentMatchSchema } from '@natrave/tournaments-service-types';
|
|
2
|
-
import {
|
|
3
|
-
Entity,
|
|
4
|
-
Column,
|
|
5
|
-
PrimaryGeneratedColumn,
|
|
6
|
-
CreateDateColumn,
|
|
7
|
-
UpdateDateColumn,
|
|
8
|
-
Index,
|
|
9
|
-
OneToMany,
|
|
10
|
-
} from 'typeorm';
|
|
11
|
-
|
|
12
|
-
import { Tournament } from 'tournaments/tournaments';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Entidade que representa um esquema de partidas de torneio.
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* Esta entidade armazena os dados referentes a um esquema de partidas, como o nome, descrição
|
|
19
|
-
* e quantidade de jogadores por equipe, além das datas de criação e atualização do registro.
|
|
20
|
-
*
|
|
21
|
-
* @public
|
|
22
|
-
*/
|
|
23
|
-
@Entity('tournament_match_schemas')
|
|
24
|
-
@Index(['name'])
|
|
25
|
-
export class TournamentMatchSchema implements ITournamentMatchSchema {
|
|
26
|
-
@PrimaryGeneratedColumn()
|
|
27
|
-
id: number;
|
|
28
|
-
|
|
29
|
-
@Column({ type: 'varchar', length: 100 })
|
|
30
|
-
name: string;
|
|
31
|
-
|
|
32
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
33
|
-
description?: string;
|
|
34
|
-
|
|
35
|
-
@Column({ type: 'int', name: 'players_per_team' })
|
|
36
|
-
playersPerTeam: number;
|
|
37
|
-
|
|
38
|
-
@CreateDateColumn({ name: 'created_at', type: 'timestamptz' })
|
|
39
|
-
createdAt: Date;
|
|
40
|
-
|
|
41
|
-
@UpdateDateColumn({ name: 'updated_at', type: 'timestamptz' })
|
|
42
|
-
updatedAt: Date;
|
|
43
|
-
|
|
44
|
-
/** RELAÇÕES */
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Relação com os campeonatos associadas ao esquema de partidas.
|
|
48
|
-
*/
|
|
49
|
-
@OneToMany(() => Tournament, (tournament) => tournament.matchSchema)
|
|
50
|
-
tournaments: Tournament[];
|
|
51
|
-
}
|