@natrave/shared-entities 1.1.9 → 1.2.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.
- package/dist/app-auth/index.js +5 -6
- package/dist/app-auth/password-resets/index.js +4 -2
- package/dist/app-auth/password-resets/password-reset.entity.js +48 -45
- package/dist/app-auth/refresh-tokens/index.js +4 -2
- package/dist/app-auth/refresh-tokens/refresh-token.entity.js +48 -45
- package/dist/app-auth/user-auth-providers/enums/auth-provider.enum.js +9 -7
- package/dist/app-auth/user-auth-providers/index.js +6 -3
- package/dist/app-auth/user-auth-providers/user-auth-provider.entity.js +53 -50
- package/dist/app-auth/user-verifications/enums/verification-type.enum.js +8 -6
- package/dist/app-auth/user-verifications/index.js +6 -3
- package/dist/app-auth/user-verifications/user-verification.entity.js +57 -57
- package/dist/app-auth/users/index.js +4 -2
- package/dist/app-auth/users/user.entity.js +123 -133
- package/dist/app-auth/users/utils/format-data.utils.js +19 -17
- package/dist/common/utils/decimal-transformer.utils.js +15 -14
- package/dist/facilities/addresses/address.entity.js +79 -84
- package/dist/facilities/addresses/index.js +4 -2
- package/dist/facilities/facilities/enums/facility-status.enum.js +9 -7
- package/dist/facilities/facilities/facility.entity.js +118 -121
- package/dist/facilities/facilities/index.js +6 -3
- package/dist/facilities/facilities/utils/sanititze.utils.js +12 -10
- package/dist/facilities/facility-images/facility-image.entity.js +60 -56
- package/dist/facilities/facility-images/index.js +4 -2
- package/dist/facilities/facility-owners/facility-owner.entity.js +64 -62
- package/dist/facilities/facility-owners/index.js +4 -2
- package/dist/facilities/facility-owners/utils/sanitize.utils.js +10 -8
- package/dist/facilities/fields/enums/surface-type.enum.js +11 -9
- package/dist/facilities/fields/field.entity.js +69 -69
- package/dist/facilities/fields/index.js +6 -3
- package/dist/facilities/index.js +5 -6
- package/dist/index.js +4 -5
- package/dist/payments/index.js +3 -4
- package/dist/payments/payment-providers/enums/payment-provider-name.enum.js +7 -5
- package/dist/payments/payment-providers/index.js +6 -3
- package/dist/payments/payment-providers/payment-provider.entity.js +57 -47
- package/dist/payments/payments/enums/payment-method.enum.js +8 -6
- package/dist/payments/payments/enums/payment-status.enum.js +13 -11
- package/dist/payments/payments/index.js +8 -4
- package/dist/payments/payments/payment.entity.js +79 -82
- package/dist/payments/user-payment-providers/index.js +4 -2
- package/dist/payments/user-payment-providers/user-payment-provider.entity.js +62 -58
- package/dist/tournaments/index.js +12 -13
- package/dist/tournaments/tournament-facilities/index.js +4 -2
- package/dist/tournaments/tournament-facilities/tournament-facility.entity.js +62 -58
- package/dist/tournaments/tournament-format-configs/index.js +4 -2
- package/dist/tournaments/tournament-format-configs/tournament-format-config.entity.js +70 -73
- package/dist/tournaments/tournament-match-cards/index.js +4 -2
- package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.js +74 -72
- package/dist/tournaments/tournament-match-goals/index.js +4 -2
- package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.js +74 -76
- package/dist/tournaments/tournament-match-schemas/index.js +4 -2
- package/dist/tournaments/tournament-match-schemas/tournament-match-schema.entity.js +47 -44
- package/dist/tournaments/tournament-matches/index.js +4 -2
- package/dist/tournaments/tournament-matches/tournament-match.entity.js +89 -94
- package/dist/tournaments/tournament-payments/index.js +4 -2
- package/dist/tournaments/tournament-payments/tournament-payment.entity.js +57 -56
- package/dist/tournaments/tournament-players/index.js +4 -2
- package/dist/tournaments/tournament-players/tournament-player.entity.js +75 -73
- package/dist/tournaments/tournament-prize-rules/index.js +4 -2
- package/dist/tournaments/tournament-prize-rules/tournament-prize-rule.entity.js +56 -52
- package/dist/tournaments/tournament-rules/index.js +4 -2
- package/dist/tournaments/tournament-rules/tournament-rule.entity.js +73 -74
- package/dist/tournaments/tournament-teams/enums/tournament-team-status.enum.js +8 -6
- package/dist/tournaments/tournament-teams/index.js +6 -3
- package/dist/tournaments/tournament-teams/tournament-team.entity.js +93 -97
- package/dist/tournaments/tournament-teams/utils/invite-code-generator.js +5 -3
- package/dist/tournaments/tournaments/index.js +4 -2
- package/dist/tournaments/tournaments/tournament.entity.js +129 -144
- package/package.json +6 -2
- package/dist/app-auth/index.js.map +0 -1
- package/dist/app-auth/password-resets/index.js.map +0 -1
- package/dist/app-auth/password-resets/password-reset.entity.js.map +0 -1
- package/dist/app-auth/refresh-tokens/index.js.map +0 -1
- package/dist/app-auth/refresh-tokens/refresh-token.entity.js.map +0 -1
- package/dist/app-auth/user-auth-providers/enums/auth-provider.enum.js.map +0 -1
- package/dist/app-auth/user-auth-providers/index.js.map +0 -1
- package/dist/app-auth/user-auth-providers/user-auth-provider.entity.js.map +0 -1
- package/dist/app-auth/user-verifications/enums/verification-type.enum.js.map +0 -1
- package/dist/app-auth/user-verifications/index.js.map +0 -1
- package/dist/app-auth/user-verifications/user-verification.entity.js.map +0 -1
- package/dist/app-auth/users/index.js.map +0 -1
- package/dist/app-auth/users/user.entity.js.map +0 -1
- package/dist/app-auth/users/utils/format-data.utils.js.map +0 -1
- package/dist/common/utils/decimal-transformer.utils.js.map +0 -1
- package/dist/facilities/addresses/address.entity.js.map +0 -1
- package/dist/facilities/addresses/index.js.map +0 -1
- package/dist/facilities/facilities/enums/facility-status.enum.js.map +0 -1
- package/dist/facilities/facilities/facility.entity.js.map +0 -1
- package/dist/facilities/facilities/index.js.map +0 -1
- package/dist/facilities/facilities/utils/sanititze.utils.js.map +0 -1
- package/dist/facilities/facility-images/facility-image.entity.js.map +0 -1
- package/dist/facilities/facility-images/index.js.map +0 -1
- package/dist/facilities/facility-owners/facility-owner.entity.js.map +0 -1
- package/dist/facilities/facility-owners/index.js.map +0 -1
- package/dist/facilities/facility-owners/utils/sanitize.utils.js.map +0 -1
- package/dist/facilities/fields/enums/surface-type.enum.js.map +0 -1
- package/dist/facilities/fields/field.entity.js.map +0 -1
- package/dist/facilities/fields/index.js.map +0 -1
- package/dist/facilities/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/payments/index.js.map +0 -1
- package/dist/payments/payment-providers/enums/payment-provider-name.enum.js.map +0 -1
- package/dist/payments/payment-providers/index.js.map +0 -1
- package/dist/payments/payment-providers/payment-provider.entity.js.map +0 -1
- package/dist/payments/payments/enums/payment-method.enum.js.map +0 -1
- package/dist/payments/payments/enums/payment-status.enum.js.map +0 -1
- package/dist/payments/payments/index.js.map +0 -1
- package/dist/payments/payments/payment.entity.js.map +0 -1
- package/dist/payments/user-payment-providers/index.js.map +0 -1
- package/dist/payments/user-payment-providers/user-payment-provider.entity.js.map +0 -1
- package/dist/tournaments/index.js.map +0 -1
- package/dist/tournaments/tournament-facilities/index.js.map +0 -1
- package/dist/tournaments/tournament-facilities/tournament-facility.entity.js.map +0 -1
- package/dist/tournaments/tournament-format-configs/index.js.map +0 -1
- package/dist/tournaments/tournament-format-configs/tournament-format-config.entity.js.map +0 -1
- package/dist/tournaments/tournament-match-cards/index.js.map +0 -1
- package/dist/tournaments/tournament-match-cards/tournament-match-card.entity.js.map +0 -1
- package/dist/tournaments/tournament-match-goals/index.js.map +0 -1
- package/dist/tournaments/tournament-match-goals/tournament-match-goal.entity.js.map +0 -1
- package/dist/tournaments/tournament-match-schemas/index.js.map +0 -1
- package/dist/tournaments/tournament-match-schemas/tournament-match-schema.entity.js.map +0 -1
- package/dist/tournaments/tournament-matches/index.js.map +0 -1
- package/dist/tournaments/tournament-matches/tournament-match.entity.js.map +0 -1
- package/dist/tournaments/tournament-payments/index.js.map +0 -1
- package/dist/tournaments/tournament-payments/tournament-payment.entity.js.map +0 -1
- package/dist/tournaments/tournament-players/index.js.map +0 -1
- package/dist/tournaments/tournament-players/tournament-player.entity.js.map +0 -1
- package/dist/tournaments/tournament-prize-rules/index.js.map +0 -1
- package/dist/tournaments/tournament-prize-rules/tournament-prize-rule.entity.js.map +0 -1
- package/dist/tournaments/tournament-rules/index.js.map +0 -1
- package/dist/tournaments/tournament-rules/tournament-rule.entity.js.map +0 -1
- package/dist/tournaments/tournament-teams/enums/tournament-team-status.enum.js.map +0 -1
- package/dist/tournaments/tournament-teams/index.js.map +0 -1
- package/dist/tournaments/tournament-teams/tournament-team.entity.js.map +0 -1
- package/dist/tournaments/tournament-teams/utils/invite-code-generator.js.map +0 -1
- package/dist/tournaments/tournaments/index.js.map +0 -1
- package/dist/tournaments/tournaments/tournament.entity.js.map +0 -1
|
@@ -1,79 +1,77 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
6
10
|
};
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
import { MatchPeriod } from "@natrave/tournaments-service-types";
|
|
12
|
+
import {
|
|
13
|
+
Column,
|
|
14
|
+
CreateDateColumn,
|
|
15
|
+
Entity,
|
|
16
|
+
Index,
|
|
17
|
+
JoinColumn,
|
|
18
|
+
ManyToOne,
|
|
19
|
+
PrimaryGeneratedColumn,
|
|
20
|
+
UpdateDateColumn
|
|
21
|
+
} from "typeorm";
|
|
22
|
+
import { TournamentMatch } from "../tournament-matches";
|
|
23
|
+
import { TournamentPlayer } from "../tournament-players";
|
|
24
|
+
import { TournamentTeam } from "../tournament-teams";
|
|
25
|
+
let TournamentMatchGoal = class {
|
|
9
26
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
], TournamentMatchGoal.prototype, "
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
], TournamentMatchGoal.prototype, "
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
], TournamentMatchGoal.prototype, "
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
], TournamentMatchGoal.prototype, "
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
], TournamentMatchGoal.prototype, "
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
], TournamentMatchGoal.prototype, "
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
], TournamentMatchGoal.prototype, "team", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
ManyToOne(() => TournamentMatch, (match) => match.goals, { onDelete: 'CASCADE' }),
|
|
60
|
-
JoinColumn({ name: 'team_id' }),
|
|
61
|
-
__metadata("design:type", TournamentMatch)
|
|
62
|
-
], TournamentMatchGoal.prototype, "match", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
ManyToOne(() => TournamentPlayer, (team) => team.goals, { onDelete: 'CASCADE' }),
|
|
65
|
-
JoinColumn({ name: 'scorer_id' }),
|
|
66
|
-
__metadata("design:type", TournamentPlayer)
|
|
67
|
-
], TournamentMatchGoal.prototype, "scorer", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
ManyToOne(() => TournamentPlayer, (team) => team.assists, { onDelete: 'CASCADE' }),
|
|
70
|
-
JoinColumn({ name: 'assist_id' }),
|
|
71
|
-
__metadata("design:type", TournamentPlayer)
|
|
72
|
-
], TournamentMatchGoal.prototype, "assist", void 0);
|
|
73
|
-
TournamentMatchGoal = __decorate([
|
|
74
|
-
Entity('tournament_match_goals'),
|
|
75
|
-
Index(['teamId']),
|
|
76
|
-
Index(['matchId'])
|
|
27
|
+
__decorateClass([
|
|
28
|
+
PrimaryGeneratedColumn()
|
|
29
|
+
], TournamentMatchGoal.prototype, "id", 2);
|
|
30
|
+
__decorateClass([
|
|
31
|
+
Column({ name: "team_id", type: "int" })
|
|
32
|
+
], TournamentMatchGoal.prototype, "teamId", 2);
|
|
33
|
+
__decorateClass([
|
|
34
|
+
Column({ name: "match_id", type: "int" })
|
|
35
|
+
], TournamentMatchGoal.prototype, "matchId", 2);
|
|
36
|
+
__decorateClass([
|
|
37
|
+
Column({ type: "int", nullable: true })
|
|
38
|
+
], TournamentMatchGoal.prototype, "minute", 2);
|
|
39
|
+
__decorateClass([
|
|
40
|
+
Column({ type: "enum", enum: MatchPeriod, nullable: true })
|
|
41
|
+
], TournamentMatchGoal.prototype, "period", 2);
|
|
42
|
+
__decorateClass([
|
|
43
|
+
Column({ name: "scorer_id", type: "int", nullable: true })
|
|
44
|
+
], TournamentMatchGoal.prototype, "scorerId", 2);
|
|
45
|
+
__decorateClass([
|
|
46
|
+
Column({ name: "assist_id", type: "int", nullable: true })
|
|
47
|
+
], TournamentMatchGoal.prototype, "assistId", 2);
|
|
48
|
+
__decorateClass([
|
|
49
|
+
CreateDateColumn({ name: "created_at", type: "timestamptz" })
|
|
50
|
+
], TournamentMatchGoal.prototype, "createdAt", 2);
|
|
51
|
+
__decorateClass([
|
|
52
|
+
UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
|
|
53
|
+
], TournamentMatchGoal.prototype, "updatedAt", 2);
|
|
54
|
+
__decorateClass([
|
|
55
|
+
ManyToOne(() => TournamentTeam, (team) => team.goals, { onDelete: "CASCADE" }),
|
|
56
|
+
JoinColumn({ name: "team_id" })
|
|
57
|
+
], TournamentMatchGoal.prototype, "team", 2);
|
|
58
|
+
__decorateClass([
|
|
59
|
+
ManyToOne(() => TournamentMatch, (match) => match.goals, { onDelete: "CASCADE" }),
|
|
60
|
+
JoinColumn({ name: "team_id" })
|
|
61
|
+
], TournamentMatchGoal.prototype, "match", 2);
|
|
62
|
+
__decorateClass([
|
|
63
|
+
ManyToOne(() => TournamentPlayer, (team) => team.goals, { onDelete: "CASCADE" }),
|
|
64
|
+
JoinColumn({ name: "scorer_id" })
|
|
65
|
+
], TournamentMatchGoal.prototype, "scorer", 2);
|
|
66
|
+
__decorateClass([
|
|
67
|
+
ManyToOne(() => TournamentPlayer, (team) => team.assists, { onDelete: "CASCADE" }),
|
|
68
|
+
JoinColumn({ name: "assist_id" })
|
|
69
|
+
], TournamentMatchGoal.prototype, "assist", 2);
|
|
70
|
+
TournamentMatchGoal = __decorateClass([
|
|
71
|
+
Entity("tournament_match_goals"),
|
|
72
|
+
Index(["teamId"]),
|
|
73
|
+
Index(["matchId"])
|
|
77
74
|
], TournamentMatchGoal);
|
|
78
|
-
export {
|
|
79
|
-
|
|
75
|
+
export {
|
|
76
|
+
TournamentMatchGoal
|
|
77
|
+
};
|
|
@@ -1,47 +1,50 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
6
10
|
};
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
import {
|
|
12
|
+
Column,
|
|
13
|
+
CreateDateColumn,
|
|
14
|
+
Entity,
|
|
15
|
+
Index,
|
|
16
|
+
OneToMany,
|
|
17
|
+
PrimaryGeneratedColumn,
|
|
18
|
+
UpdateDateColumn
|
|
19
|
+
} from "typeorm";
|
|
20
|
+
import { Tournament } from "../tournaments";
|
|
21
|
+
let TournamentMatchSchema = class {
|
|
9
22
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
], TournamentMatchSchema.prototype, "
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
__decorate([
|
|
35
|
-
UpdateDateColumn({ name: 'updated_at', type: 'timestamptz' }),
|
|
36
|
-
__metadata("design:type", Date)
|
|
37
|
-
], TournamentMatchSchema.prototype, "updatedAt", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
OneToMany(() => Tournament, (tournament) => tournament.matchSchema),
|
|
40
|
-
__metadata("design:type", Array)
|
|
41
|
-
], TournamentMatchSchema.prototype, "tournaments", void 0);
|
|
42
|
-
TournamentMatchSchema = __decorate([
|
|
43
|
-
Entity('tournament_match_schemas'),
|
|
44
|
-
Index(['name'])
|
|
23
|
+
__decorateClass([
|
|
24
|
+
PrimaryGeneratedColumn()
|
|
25
|
+
], TournamentMatchSchema.prototype, "id", 2);
|
|
26
|
+
__decorateClass([
|
|
27
|
+
Column({ type: "varchar", length: 100 })
|
|
28
|
+
], TournamentMatchSchema.prototype, "name", 2);
|
|
29
|
+
__decorateClass([
|
|
30
|
+
Column({ type: "varchar", length: 255, nullable: true })
|
|
31
|
+
], TournamentMatchSchema.prototype, "description", 2);
|
|
32
|
+
__decorateClass([
|
|
33
|
+
Column({ type: "int", name: "players_per_team" })
|
|
34
|
+
], TournamentMatchSchema.prototype, "playersPerTeam", 2);
|
|
35
|
+
__decorateClass([
|
|
36
|
+
CreateDateColumn({ name: "created_at", type: "timestamptz" })
|
|
37
|
+
], TournamentMatchSchema.prototype, "createdAt", 2);
|
|
38
|
+
__decorateClass([
|
|
39
|
+
UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
|
|
40
|
+
], TournamentMatchSchema.prototype, "updatedAt", 2);
|
|
41
|
+
__decorateClass([
|
|
42
|
+
OneToMany(() => Tournament, (tournament) => tournament.matchSchema)
|
|
43
|
+
], TournamentMatchSchema.prototype, "tournaments", 2);
|
|
44
|
+
TournamentMatchSchema = __decorateClass([
|
|
45
|
+
Entity("tournament_match_schemas"),
|
|
46
|
+
Index(["name"])
|
|
45
47
|
], TournamentMatchSchema);
|
|
46
|
-
export {
|
|
47
|
-
|
|
48
|
+
export {
|
|
49
|
+
TournamentMatchSchema
|
|
50
|
+
};
|
|
@@ -1,97 +1,92 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
6
10
|
};
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
import { TournamentMatchPhase } from "@natrave/tournaments-service-types";
|
|
12
|
+
import {
|
|
13
|
+
Column,
|
|
14
|
+
CreateDateColumn,
|
|
15
|
+
Entity,
|
|
16
|
+
JoinColumn,
|
|
17
|
+
ManyToOne,
|
|
18
|
+
OneToMany,
|
|
19
|
+
PrimaryGeneratedColumn,
|
|
20
|
+
UpdateDateColumn
|
|
21
|
+
} from "typeorm";
|
|
22
|
+
import { Field } from "../../facilities";
|
|
23
|
+
import { TournamentMatchCard } from "../tournament-match-cards";
|
|
24
|
+
import { TournamentMatchGoal } from "../tournament-match-goals";
|
|
25
|
+
import { TournamentTeam } from "../tournament-teams";
|
|
26
|
+
import { Tournament } from "../tournaments";
|
|
27
|
+
let TournamentMatch = class {
|
|
9
28
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
], TournamentMatch.prototype, "
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
], TournamentMatch.prototype, "tournament", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
ManyToOne(() => TournamentTeam, (team) => team.homeMatches, {
|
|
73
|
-
onDelete: 'CASCADE',
|
|
74
|
-
}),
|
|
75
|
-
JoinColumn({ name: 'home_team_id' }),
|
|
76
|
-
__metadata("design:type", TournamentTeam)
|
|
77
|
-
], TournamentMatch.prototype, "homeTeam", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
ManyToOne(() => TournamentTeam, (team) => team.awayMatches, {
|
|
80
|
-
onDelete: 'CASCADE',
|
|
81
|
-
}),
|
|
82
|
-
JoinColumn({ name: 'away_team_id' }),
|
|
83
|
-
__metadata("design:type", TournamentTeam)
|
|
84
|
-
], TournamentMatch.prototype, "awayTeam", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
OneToMany(() => TournamentMatchGoal, (goal) => goal.match),
|
|
87
|
-
__metadata("design:type", Array)
|
|
88
|
-
], TournamentMatch.prototype, "goals", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
OneToMany(() => TournamentMatchCard, (card) => card.match),
|
|
91
|
-
__metadata("design:type", Array)
|
|
92
|
-
], TournamentMatch.prototype, "cards", void 0);
|
|
93
|
-
TournamentMatch = __decorate([
|
|
94
|
-
Entity('tournament_matches')
|
|
29
|
+
__decorateClass([
|
|
30
|
+
PrimaryGeneratedColumn()
|
|
31
|
+
], TournamentMatch.prototype, "id", 2);
|
|
32
|
+
__decorateClass([
|
|
33
|
+
Column({ name: "tournament_id", type: "int" })
|
|
34
|
+
], TournamentMatch.prototype, "tournamentId", 2);
|
|
35
|
+
__decorateClass([
|
|
36
|
+
Column({ name: "home_team_id", type: "int" })
|
|
37
|
+
], TournamentMatch.prototype, "homeTeamId", 2);
|
|
38
|
+
__decorateClass([
|
|
39
|
+
Column({ name: "away_team_id", type: "int" })
|
|
40
|
+
], TournamentMatch.prototype, "awayTeamId", 2);
|
|
41
|
+
__decorateClass([
|
|
42
|
+
Column({ name: "field_id", type: "int", nullable: true })
|
|
43
|
+
], TournamentMatch.prototype, "fieldId", 2);
|
|
44
|
+
__decorateClass([
|
|
45
|
+
Column({ name: "match_date", type: "timestamptz", default: null, nullable: true })
|
|
46
|
+
], TournamentMatch.prototype, "matchDate", 2);
|
|
47
|
+
__decorateClass([
|
|
48
|
+
Column({ type: "enum", enum: TournamentMatchPhase })
|
|
49
|
+
], TournamentMatch.prototype, "phase", 2);
|
|
50
|
+
__decorateClass([
|
|
51
|
+
Column({ name: "round_indicator", type: "int", default: 1 })
|
|
52
|
+
], TournamentMatch.prototype, "roundIndicator", 2);
|
|
53
|
+
__decorateClass([
|
|
54
|
+
CreateDateColumn({ name: "created_at", type: "timestamptz" })
|
|
55
|
+
], TournamentMatch.prototype, "createdAt", 2);
|
|
56
|
+
__decorateClass([
|
|
57
|
+
UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
|
|
58
|
+
], TournamentMatch.prototype, "updatedAt", 2);
|
|
59
|
+
__decorateClass([
|
|
60
|
+
ManyToOne(() => Field, (field) => field.tournamentMatches, { onDelete: "SET NULL" }),
|
|
61
|
+
JoinColumn({ name: "field_id" })
|
|
62
|
+
], TournamentMatch.prototype, "field", 2);
|
|
63
|
+
__decorateClass([
|
|
64
|
+
ManyToOne(() => Tournament, (tournament) => tournament.matches, {
|
|
65
|
+
onDelete: "CASCADE"
|
|
66
|
+
}),
|
|
67
|
+
JoinColumn({ name: "tournament_id" })
|
|
68
|
+
], TournamentMatch.prototype, "tournament", 2);
|
|
69
|
+
__decorateClass([
|
|
70
|
+
ManyToOne(() => TournamentTeam, (team) => team.homeMatches, {
|
|
71
|
+
onDelete: "CASCADE"
|
|
72
|
+
}),
|
|
73
|
+
JoinColumn({ name: "home_team_id" })
|
|
74
|
+
], TournamentMatch.prototype, "homeTeam", 2);
|
|
75
|
+
__decorateClass([
|
|
76
|
+
ManyToOne(() => TournamentTeam, (team) => team.awayMatches, {
|
|
77
|
+
onDelete: "CASCADE"
|
|
78
|
+
}),
|
|
79
|
+
JoinColumn({ name: "away_team_id" })
|
|
80
|
+
], TournamentMatch.prototype, "awayTeam", 2);
|
|
81
|
+
__decorateClass([
|
|
82
|
+
OneToMany(() => TournamentMatchGoal, (goal) => goal.match)
|
|
83
|
+
], TournamentMatch.prototype, "goals", 2);
|
|
84
|
+
__decorateClass([
|
|
85
|
+
OneToMany(() => TournamentMatchCard, (card) => card.match)
|
|
86
|
+
], TournamentMatch.prototype, "cards", 2);
|
|
87
|
+
TournamentMatch = __decorateClass([
|
|
88
|
+
Entity("tournament_matches")
|
|
95
89
|
], TournamentMatch);
|
|
96
|
-
export {
|
|
97
|
-
|
|
90
|
+
export {
|
|
91
|
+
TournamentMatch
|
|
92
|
+
};
|
|
@@ -1,59 +1,60 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
6
10
|
};
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
import {
|
|
12
|
+
Column,
|
|
13
|
+
CreateDateColumn,
|
|
14
|
+
Entity,
|
|
15
|
+
JoinColumn,
|
|
16
|
+
ManyToOne,
|
|
17
|
+
PrimaryGeneratedColumn,
|
|
18
|
+
UpdateDateColumn
|
|
19
|
+
} from "typeorm";
|
|
20
|
+
import { User } from "../../app-auth";
|
|
21
|
+
import { Payment } from "../../payments";
|
|
22
|
+
import { Tournament } from "../tournaments";
|
|
23
|
+
let TournamentPayment = class {
|
|
9
24
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
], TournamentPayment.prototype, "
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
], TournamentPayment.prototype, "
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
], TournamentPayment.prototype, "
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
], TournamentPayment.prototype, "
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
JoinColumn({ name: 'user_id' }),
|
|
43
|
-
__metadata("design:type", User)
|
|
44
|
-
], TournamentPayment.prototype, "user", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
ManyToOne(() => Payment, { onDelete: 'CASCADE', eager: true }),
|
|
47
|
-
JoinColumn({ name: 'payment_id' }),
|
|
48
|
-
__metadata("design:type", Payment)
|
|
49
|
-
], TournamentPayment.prototype, "payment", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
ManyToOne(() => Tournament, { onDelete: 'CASCADE' }),
|
|
52
|
-
JoinColumn({ name: 'tournament_id' }),
|
|
53
|
-
__metadata("design:type", Tournament)
|
|
54
|
-
], TournamentPayment.prototype, "tournament", void 0);
|
|
55
|
-
TournamentPayment = __decorate([
|
|
56
|
-
Entity('tournament_payments')
|
|
25
|
+
__decorateClass([
|
|
26
|
+
PrimaryGeneratedColumn("uuid")
|
|
27
|
+
], TournamentPayment.prototype, "id", 2);
|
|
28
|
+
__decorateClass([
|
|
29
|
+
Column({ name: "payment_id", type: "int" })
|
|
30
|
+
], TournamentPayment.prototype, "paymentId", 2);
|
|
31
|
+
__decorateClass([
|
|
32
|
+
Column({ name: "tournament_id", type: "int" })
|
|
33
|
+
], TournamentPayment.prototype, "tournamentId", 2);
|
|
34
|
+
__decorateClass([
|
|
35
|
+
Column({ name: "user_id", type: "uuid" })
|
|
36
|
+
], TournamentPayment.prototype, "userId", 2);
|
|
37
|
+
__decorateClass([
|
|
38
|
+
CreateDateColumn({ name: "created_at", type: "timestamptz" })
|
|
39
|
+
], TournamentPayment.prototype, "createdAt", 2);
|
|
40
|
+
__decorateClass([
|
|
41
|
+
UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
|
|
42
|
+
], TournamentPayment.prototype, "updatedAt", 2);
|
|
43
|
+
__decorateClass([
|
|
44
|
+
ManyToOne(() => User, { onDelete: "CASCADE" }),
|
|
45
|
+
JoinColumn({ name: "user_id" })
|
|
46
|
+
], TournamentPayment.prototype, "user", 2);
|
|
47
|
+
__decorateClass([
|
|
48
|
+
ManyToOne(() => Payment, { onDelete: "CASCADE", eager: true }),
|
|
49
|
+
JoinColumn({ name: "payment_id" })
|
|
50
|
+
], TournamentPayment.prototype, "payment", 2);
|
|
51
|
+
__decorateClass([
|
|
52
|
+
ManyToOne(() => Tournament, { onDelete: "CASCADE" }),
|
|
53
|
+
JoinColumn({ name: "tournament_id" })
|
|
54
|
+
], TournamentPayment.prototype, "tournament", 2);
|
|
55
|
+
TournamentPayment = __decorateClass([
|
|
56
|
+
Entity("tournament_payments")
|
|
57
57
|
], TournamentPayment);
|
|
58
|
-
export {
|
|
59
|
-
|
|
58
|
+
export {
|
|
59
|
+
TournamentPayment
|
|
60
|
+
};
|