@natrave/shared-entities 1.2.60 → 1.2.62
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/password-resets/password-reset.entity.d.ts +0 -2
- package/dist/app-auth/password-resets/password-reset.entity.d.ts.map +1 -1
- package/dist/app-auth/password-resets/password-reset.entity.js +2 -14
- package/dist/app-auth/user-verifications/user-verification.entity.d.ts +0 -2
- package/dist/app-auth/user-verifications/user-verification.entity.d.ts.map +1 -1
- package/dist/app-auth/user-verifications/user-verification.entity.js +0 -7
- package/dist/app-auth/users/enums/gender.enum.d.ts +6 -0
- package/dist/app-auth/users/enums/gender.enum.d.ts.map +1 -0
- package/dist/app-auth/users/enums/gender.enum.js +9 -0
- package/dist/app-auth/users/index.d.ts +1 -0
- package/dist/app-auth/users/index.d.ts.map +1 -1
- package/dist/app-auth/users/index.js +2 -0
- package/dist/app-auth/users/user.entity.d.ts +12 -14
- package/dist/app-auth/users/user.entity.d.ts.map +1 -1
- package/dist/app-auth/users/user.entity.js +30 -34
- package/dist/app-auth/users/utils/format-data.utils.d.ts +4 -4
- package/dist/app-auth/users/utils/format-data.utils.d.ts.map +1 -1
- package/dist/app-auth/users/utils/format-data.utils.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/payments/user-payment-providers/user-payment-provider.entity.d.ts +0 -2
- package/dist/payments/user-payment-providers/user-payment-provider.entity.d.ts.map +1 -1
- package/dist/payments/user-payment-providers/user-payment-provider.entity.js +0 -7
- package/dist/players/index.d.ts +3 -0
- package/dist/players/index.d.ts.map +1 -0
- package/dist/players/index.js +2 -0
- package/dist/players/player-position/enums/position.enum.d.ts +9 -0
- package/dist/players/player-position/enums/position.enum.d.ts.map +1 -0
- package/dist/players/player-position/enums/position.enum.js +12 -0
- package/dist/players/player-position/index.d.ts +3 -0
- package/dist/players/player-position/index.d.ts.map +1 -0
- package/dist/players/player-position/index.js +6 -0
- package/dist/players/player-position/player-position.entity.d.ts +10 -0
- package/dist/players/player-position/player-position.entity.d.ts.map +1 -0
- package/dist/players/player-position/player-position.entity.js +59 -0
- package/dist/players/players/enums/preferred-leg.enum.d.ts +6 -0
- package/dist/players/players/enums/preferred-leg.enum.d.ts.map +1 -0
- package/dist/players/players/enums/preferred-leg.enum.js +9 -0
- package/dist/players/players/index.d.ts +3 -0
- package/dist/players/players/index.d.ts.map +1 -0
- package/dist/players/players/index.js +6 -0
- package/dist/players/players/player.entity.d.ts +13 -0
- package/dist/players/players/player.entity.d.ts.map +1 -0
- package/dist/players/players/player.entity.js +82 -0
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { User } from '../users';
|
|
2
1
|
export declare class PasswordReset {
|
|
3
2
|
id: number;
|
|
4
3
|
createdAt: Date;
|
|
@@ -6,6 +5,5 @@ export declare class PasswordReset {
|
|
|
6
5
|
usedAt: Date | null;
|
|
7
6
|
userId: string;
|
|
8
7
|
token: string;
|
|
9
|
-
user: User;
|
|
10
8
|
}
|
|
11
9
|
//# sourceMappingURL=password-reset.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-reset.entity.d.ts","sourceRoot":"","sources":["../../../src/app-auth/password-resets/password-reset.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"password-reset.entity.d.ts","sourceRoot":"","sources":["../../../src/app-auth/password-resets/password-reset.entity.ts"],"names":[],"mappings":"AAYA,qBAEa,aAAa;IAExB,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IAOpB,MAAM,EAAE,MAAM,CAAC;IAOf,KAAK,EAAE,MAAM,CAAC;CAGf"}
|
|
@@ -8,17 +8,9 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
8
8
|
if (kind && result) __defProp(target, key, result);
|
|
9
9
|
return result;
|
|
10
10
|
};
|
|
11
|
-
import {
|
|
12
|
-
Column,
|
|
13
|
-
CreateDateColumn,
|
|
14
|
-
Entity,
|
|
15
|
-
JoinColumn,
|
|
16
|
-
ManyToOne,
|
|
17
|
-
PrimaryGeneratedColumn,
|
|
18
|
-
Unique
|
|
19
|
-
} from "typeorm";
|
|
20
|
-
import { User } from "../users/index.js";
|
|
11
|
+
import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, Unique } from "typeorm";
|
|
21
12
|
let PasswordReset = class {
|
|
13
|
+
/** RELAÇÕES */
|
|
22
14
|
};
|
|
23
15
|
__decorateClass([
|
|
24
16
|
PrimaryGeneratedColumn({ comment: "Identificador \xFAnico do reset de senha." })
|
|
@@ -59,10 +51,6 @@ __decorateClass([
|
|
|
59
51
|
comment: "Token \xFAnico utilizado para validar o reset de senha."
|
|
60
52
|
})
|
|
61
53
|
], PasswordReset.prototype, "token", 2);
|
|
62
|
-
__decorateClass([
|
|
63
|
-
ManyToOne(() => User, (user) => user.passwordResets, { onDelete: "CASCADE" }),
|
|
64
|
-
JoinColumn({ name: "user_id" })
|
|
65
|
-
], PasswordReset.prototype, "user", 2);
|
|
66
54
|
PasswordReset = __decorateClass([
|
|
67
55
|
Entity("password_resets"),
|
|
68
56
|
Unique(["token", "userId"])
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { User } from '../users';
|
|
2
1
|
import { VerificationType } from './enums/verification-type.enum';
|
|
3
2
|
export declare class UserVerification {
|
|
4
3
|
id: number;
|
|
@@ -10,6 +9,5 @@ export declare class UserVerification {
|
|
|
10
9
|
token: string;
|
|
11
10
|
userId: string;
|
|
12
11
|
type: VerificationType;
|
|
13
|
-
user: User;
|
|
14
12
|
}
|
|
15
13
|
//# sourceMappingURL=user-verification.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-verification.entity.d.ts","sourceRoot":"","sources":["../../../src/app-auth/user-verifications/user-verification.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user-verification.entity.d.ts","sourceRoot":"","sources":["../../../src/app-auth/user-verifications/user-verification.entity.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAYlE,qBACa,gBAAgB;IAI3B,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IAOxB,SAAS,EAAE,OAAO,CAAC;IAQnB,KAAK,EAAE,MAAM,CAAC;IAOd,MAAM,EAAE,MAAM,CAAC;IAOf,IAAI,EAAE,gBAAgB,CAAC;CACxB"}
|
|
@@ -12,12 +12,9 @@ import {
|
|
|
12
12
|
Column,
|
|
13
13
|
CreateDateColumn,
|
|
14
14
|
Entity,
|
|
15
|
-
JoinColumn,
|
|
16
|
-
ManyToOne,
|
|
17
15
|
PrimaryGeneratedColumn,
|
|
18
16
|
UpdateDateColumn
|
|
19
17
|
} from "typeorm";
|
|
20
|
-
import { User } from "../users/index.js";
|
|
21
18
|
import { VerificationType } from "./enums/verification-type.enum.js";
|
|
22
19
|
let UserVerification = class {
|
|
23
20
|
};
|
|
@@ -84,10 +81,6 @@ __decorateClass([
|
|
|
84
81
|
comment: "Tipo da verifica\xE7\xE3o (ex: email, telefone)."
|
|
85
82
|
})
|
|
86
83
|
], UserVerification.prototype, "type", 2);
|
|
87
|
-
__decorateClass([
|
|
88
|
-
ManyToOne(() => User, (user) => user.verifications, { onDelete: "CASCADE" }),
|
|
89
|
-
JoinColumn({ name: "user_id" })
|
|
90
|
-
], UserVerification.prototype, "user", 2);
|
|
91
84
|
UserVerification = __decorateClass([
|
|
92
85
|
Entity("user_verifications")
|
|
93
86
|
], UserVerification);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gender.enum.d.ts","sourceRoot":"","sources":["../../../../src/app-auth/users/enums/gender.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,MAAM;IAChB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app-auth/users/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app-auth/users/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Player } from '../../players';
|
|
2
2
|
import { TournamentPlayer } from '../../tournaments';
|
|
3
|
-
import { PasswordReset } from '../password-resets';
|
|
4
3
|
import { RefreshToken } from '../refresh-tokens';
|
|
5
4
|
import { UserAuthProvider } from '../user-auth-providers';
|
|
6
|
-
import {
|
|
5
|
+
import { Gender } from './enums/gender.enum';
|
|
7
6
|
export declare class User {
|
|
8
7
|
id: string;
|
|
9
8
|
numericId: number;
|
|
10
9
|
createdAt: Date;
|
|
11
10
|
updatedAt: Date;
|
|
12
|
-
deletedAt
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
deletedAt: Date | null;
|
|
12
|
+
name: string | null;
|
|
13
|
+
birthDate: Date | null;
|
|
14
|
+
shirtNumber: number | null;
|
|
15
15
|
email: string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
imageUrl
|
|
16
|
+
nickname: string | null;
|
|
17
|
+
gender: Gender | null;
|
|
18
|
+
cpf: string | null;
|
|
19
|
+
phone: string | null;
|
|
20
|
+
imageUrl: string | null;
|
|
21
21
|
refreshTokens: RefreshToken[];
|
|
22
|
-
passwordResets: PasswordReset[];
|
|
23
|
-
verifications: UserVerification[];
|
|
24
22
|
userAuthProviders: UserAuthProvider[];
|
|
25
23
|
tournamentPlayers: TournamentPlayer[];
|
|
26
|
-
|
|
24
|
+
player: Player;
|
|
27
25
|
prepareData(): void;
|
|
28
26
|
}
|
|
29
27
|
//# sourceMappingURL=user.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../../src/app-auth/users/user.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../../src/app-auth/users/user.entity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAa7C,qBAIa,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,IAAI,CAAC;IASvB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAQpB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAQvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ3B,KAAK,EAAE,MAAM,CAAC;IAQd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAQxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAStB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAUnB,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,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IAGtC,MAAM,EAAE,MAAM,CAAC;IAMf,WAAW,IAAI,IAAI;CAGpB"}
|
|
@@ -15,16 +15,16 @@ import {
|
|
|
15
15
|
DeleteDateColumn,
|
|
16
16
|
Entity,
|
|
17
17
|
OneToMany,
|
|
18
|
+
OneToOne,
|
|
18
19
|
PrimaryGeneratedColumn,
|
|
19
20
|
Unique,
|
|
20
21
|
UpdateDateColumn
|
|
21
22
|
} from "typeorm";
|
|
22
|
-
import {
|
|
23
|
+
import { Player } from "../../players/index.js";
|
|
23
24
|
import { TournamentPlayer } from "../../tournaments/index.js";
|
|
24
|
-
import { PasswordReset } from "../password-resets/index.js";
|
|
25
25
|
import { RefreshToken } from "../refresh-tokens/index.js";
|
|
26
26
|
import { UserAuthProvider } from "../user-auth-providers/index.js";
|
|
27
|
-
import {
|
|
27
|
+
import { Gender } from "./enums/gender.enum.js";
|
|
28
28
|
import { formatUserBeforeInsertData } from "./utils/format-data.utils.js";
|
|
29
29
|
let User = class {
|
|
30
30
|
prepareData() {
|
|
@@ -70,22 +70,29 @@ __decorateClass([
|
|
|
70
70
|
], User.prototype, "deletedAt", 2);
|
|
71
71
|
__decorateClass([
|
|
72
72
|
Column({
|
|
73
|
-
name: "
|
|
73
|
+
name: "name",
|
|
74
74
|
type: "varchar",
|
|
75
75
|
length: 255,
|
|
76
76
|
nullable: true,
|
|
77
|
-
comment: "
|
|
77
|
+
comment: "Nome do usu\xE1rio."
|
|
78
78
|
})
|
|
79
|
-
], User.prototype, "
|
|
79
|
+
], User.prototype, "name", 2);
|
|
80
80
|
__decorateClass([
|
|
81
81
|
Column({
|
|
82
|
-
name: "
|
|
83
|
-
type: "
|
|
84
|
-
length: 255,
|
|
82
|
+
name: "birth_date",
|
|
83
|
+
type: "date",
|
|
85
84
|
nullable: true,
|
|
86
|
-
comment: "
|
|
85
|
+
comment: "Data de nascimento do usu\xE1rio."
|
|
87
86
|
})
|
|
88
|
-
], User.prototype, "
|
|
87
|
+
], User.prototype, "birthDate", 2);
|
|
88
|
+
__decorateClass([
|
|
89
|
+
Column({
|
|
90
|
+
name: "shirt_number",
|
|
91
|
+
type: "int",
|
|
92
|
+
nullable: true,
|
|
93
|
+
comment: "N\xFAmero da camisa do usu\xE1rio, se aplic\xE1vel."
|
|
94
|
+
})
|
|
95
|
+
], User.prototype, "shirtNumber", 2);
|
|
89
96
|
__decorateClass([
|
|
90
97
|
Column({
|
|
91
98
|
type: "varchar",
|
|
@@ -98,11 +105,18 @@ __decorateClass([
|
|
|
98
105
|
Column({
|
|
99
106
|
type: "varchar",
|
|
100
107
|
length: 255,
|
|
101
|
-
unique: true,
|
|
102
108
|
nullable: true,
|
|
103
|
-
comment: "
|
|
109
|
+
comment: "Apelido ou nome de usu\xE1rio do usu\xE1rio."
|
|
110
|
+
})
|
|
111
|
+
], User.prototype, "nickname", 2);
|
|
112
|
+
__decorateClass([
|
|
113
|
+
Column({
|
|
114
|
+
type: "enum",
|
|
115
|
+
enum: Object.values(Gender),
|
|
116
|
+
nullable: true,
|
|
117
|
+
comment: "G\xEAnero do usu\xE1rio (masculino, feminino ou outro)."
|
|
104
118
|
})
|
|
105
|
-
], User.prototype, "
|
|
119
|
+
], User.prototype, "gender", 2);
|
|
106
120
|
__decorateClass([
|
|
107
121
|
Column({
|
|
108
122
|
type: "varchar",
|
|
@@ -122,15 +136,6 @@ __decorateClass([
|
|
|
122
136
|
comment: "N\xFAmero de telefone do usu\xE1rio."
|
|
123
137
|
})
|
|
124
138
|
], User.prototype, "phone", 2);
|
|
125
|
-
__decorateClass([
|
|
126
|
-
Column({
|
|
127
|
-
name: "password_hash",
|
|
128
|
-
type: "varchar",
|
|
129
|
-
length: 255,
|
|
130
|
-
nullable: true,
|
|
131
|
-
comment: "Hash da senha do usu\xE1rio."
|
|
132
|
-
})
|
|
133
|
-
], User.prototype, "passwordHash", 2);
|
|
134
139
|
__decorateClass([
|
|
135
140
|
Column({
|
|
136
141
|
name: "image_url",
|
|
@@ -143,12 +148,6 @@ __decorateClass([
|
|
|
143
148
|
__decorateClass([
|
|
144
149
|
OneToMany(() => RefreshToken, (refreshToken) => refreshToken.user)
|
|
145
150
|
], User.prototype, "refreshTokens", 2);
|
|
146
|
-
__decorateClass([
|
|
147
|
-
OneToMany(() => PasswordReset, (passwordReset) => passwordReset.user)
|
|
148
|
-
], User.prototype, "passwordResets", 2);
|
|
149
|
-
__decorateClass([
|
|
150
|
-
OneToMany(() => UserVerification, (verification) => verification.user)
|
|
151
|
-
], User.prototype, "verifications", 2);
|
|
152
151
|
__decorateClass([
|
|
153
152
|
OneToMany(() => UserAuthProvider, (userAuthProvider) => userAuthProvider.user, {
|
|
154
153
|
cascade: true
|
|
@@ -160,17 +159,14 @@ __decorateClass([
|
|
|
160
159
|
})
|
|
161
160
|
], User.prototype, "tournamentPlayers", 2);
|
|
162
161
|
__decorateClass([
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
})
|
|
166
|
-
], User.prototype, "userPaymentProviders", 2);
|
|
162
|
+
OneToOne(() => Player, (player) => player.user, { onDelete: "CASCADE" })
|
|
163
|
+
], User.prototype, "player", 2);
|
|
167
164
|
__decorateClass([
|
|
168
165
|
BeforeInsert()
|
|
169
166
|
], User.prototype, "prepareData", 1);
|
|
170
167
|
User = __decorateClass([
|
|
171
168
|
Entity("users"),
|
|
172
169
|
Unique(["email"]),
|
|
173
|
-
Unique(["username"]),
|
|
174
170
|
Unique(["phone"]),
|
|
175
171
|
Unique(["cpf"])
|
|
176
172
|
], User);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare function formatUserBeforeInsertData(user: {
|
|
2
|
-
email
|
|
3
|
-
|
|
4
|
-
cpf
|
|
5
|
-
phone
|
|
2
|
+
email: string | null;
|
|
3
|
+
nickname: string | null;
|
|
4
|
+
cpf: string | null;
|
|
5
|
+
phone: string | null;
|
|
6
6
|
}): void;
|
|
7
7
|
//# sourceMappingURL=format-data.utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-data.utils.d.ts","sourceRoot":"","sources":["../../../../src/app-auth/users/utils/format-data.utils.ts"],"names":[],"mappings":"AAWA,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAC/C,KAAK,
|
|
1
|
+
{"version":3,"file":"format-data.utils.d.ts","sourceRoot":"","sources":["../../../../src/app-auth/users/utils/format-data.utils.ts"],"names":[],"mappings":"AAWA,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAC/C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,GAAG,IAAI,CAqBP"}
|
|
@@ -2,8 +2,8 @@ function formatUserBeforeInsertData(user) {
|
|
|
2
2
|
if (user.email) {
|
|
3
3
|
user.email = user.email.toLowerCase().trim();
|
|
4
4
|
}
|
|
5
|
-
if (user.
|
|
6
|
-
user.
|
|
5
|
+
if (user.nickname) {
|
|
6
|
+
user.nickname = user.nickname.toLowerCase().trim();
|
|
7
7
|
}
|
|
8
8
|
if (user.cpf) {
|
|
9
9
|
user.cpf = user.cpf.replace(/\D/g, "").trim();
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAE9B,cAAc,YAAY,CAAC;AAE3B,cAAc,YAAY,CAAC;AAE3B,cAAc,cAAc,CAAC;AAE7B,cAAc,WAAW,CAAC;AAE1B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAE9B,cAAc,YAAY,CAAC;AAE3B,cAAc,YAAY,CAAC;AAE3B,cAAc,cAAc,CAAC;AAE7B,cAAc,WAAW,CAAC;AAE1B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { User } from '../../app-auth';
|
|
2
1
|
import { PaymentProvider } from '../payment-providers';
|
|
3
2
|
export declare class UserPaymentProvider {
|
|
4
3
|
id: number;
|
|
@@ -7,7 +6,6 @@ export declare class UserPaymentProvider {
|
|
|
7
6
|
providerCustomerId: string;
|
|
8
7
|
createdAt: Date;
|
|
9
8
|
updatedAt: Date;
|
|
10
|
-
user: User;
|
|
11
9
|
paymentProvider: PaymentProvider;
|
|
12
10
|
}
|
|
13
11
|
//# sourceMappingURL=user-payment-provider.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-payment-provider.entity.d.ts","sourceRoot":"","sources":["../../../src/payments/user-payment-providers/user-payment-provider.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"user-payment-provider.entity.d.ts","sourceRoot":"","sources":["../../../src/payments/user-payment-providers/user-payment-provider.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAYvD,qBAKa,mBAAmB;IAI9B,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,EAAE,MAAM,CAAC;IAOf,iBAAiB,EAAE,MAAM,CAAC;IAO1B,kBAAkB,EAAE,MAAM,CAAC;IAO3B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAWhB,eAAe,EAAE,eAAe,CAAC;CAClC"}
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
Unique,
|
|
20
20
|
UpdateDateColumn
|
|
21
21
|
} from "typeorm";
|
|
22
|
-
import { User } from "../../app-auth/index.js";
|
|
23
22
|
import { PaymentProvider } from "../payment-providers/index.js";
|
|
24
23
|
let UserPaymentProvider = class {
|
|
25
24
|
};
|
|
@@ -63,12 +62,6 @@ __decorateClass([
|
|
|
63
62
|
comment: "Data e hora da \xFAltima atualiza\xE7\xE3o do v\xEDnculo."
|
|
64
63
|
})
|
|
65
64
|
], UserPaymentProvider.prototype, "updatedAt", 2);
|
|
66
|
-
__decorateClass([
|
|
67
|
-
ManyToOne(() => User, (user) => user.userPaymentProviders, {
|
|
68
|
-
onDelete: "CASCADE"
|
|
69
|
-
}),
|
|
70
|
-
JoinColumn({ name: "user_id" })
|
|
71
|
-
], UserPaymentProvider.prototype, "user", 2);
|
|
72
65
|
__decorateClass([
|
|
73
66
|
ManyToOne(() => PaymentProvider, (provider) => provider.userPaymentProviders, {
|
|
74
67
|
onDelete: "CASCADE"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/players/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position.enum.d.ts","sourceRoot":"","sources":["../../../../src/players/player-position/enums/position.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,oBAAoB,yBAAyB;IAC7C,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var Position = /* @__PURE__ */ ((Position2) => {
|
|
2
|
+
Position2["GOALKEEPER"] = "goalkeeper";
|
|
3
|
+
Position2["DEFENDER"] = "defender";
|
|
4
|
+
Position2["FULLBACK"] = "fullback";
|
|
5
|
+
Position2["DEFENSIVE_MIDFIELDER"] = "defensive_midfielder";
|
|
6
|
+
Position2["MIDFIELDER"] = "midfielder";
|
|
7
|
+
Position2["FORWARD"] = "forward";
|
|
8
|
+
return Position2;
|
|
9
|
+
})(Position || {});
|
|
10
|
+
export {
|
|
11
|
+
Position
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/players/player-position/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Player } from '../players';
|
|
2
|
+
import { Position } from './enums/position.enum';
|
|
3
|
+
export declare class PlayerPosition {
|
|
4
|
+
id: number;
|
|
5
|
+
createdAt: Date;
|
|
6
|
+
updatedAt: Date;
|
|
7
|
+
position: Position;
|
|
8
|
+
players: Player[];
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=player-position.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player-position.entity.d.ts","sourceRoot":"","sources":["../../../src/players/player-position/player-position.entity.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,qBAEa,cAAc;IAIzB,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAOhB,QAAQ,EAAE,QAAQ,CAAC;IAGnB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
ManyToMany,
|
|
16
|
+
PrimaryGeneratedColumn,
|
|
17
|
+
Unique,
|
|
18
|
+
UpdateDateColumn
|
|
19
|
+
} from "typeorm";
|
|
20
|
+
import { Player } from "../players/index.js";
|
|
21
|
+
import { Position } from "./enums/position.enum.js";
|
|
22
|
+
let PlayerPosition = class {
|
|
23
|
+
};
|
|
24
|
+
__decorateClass([
|
|
25
|
+
PrimaryGeneratedColumn({
|
|
26
|
+
comment: "Identificador \xFAnico da posi\xE7\xE3o."
|
|
27
|
+
})
|
|
28
|
+
], PlayerPosition.prototype, "id", 2);
|
|
29
|
+
__decorateClass([
|
|
30
|
+
CreateDateColumn({
|
|
31
|
+
name: "created_at",
|
|
32
|
+
type: "timestamptz",
|
|
33
|
+
comment: "Data e hora em que a posi\xE7\xE3o foi criado."
|
|
34
|
+
})
|
|
35
|
+
], PlayerPosition.prototype, "createdAt", 2);
|
|
36
|
+
__decorateClass([
|
|
37
|
+
UpdateDateColumn({
|
|
38
|
+
name: "updated_at",
|
|
39
|
+
type: "timestamptz",
|
|
40
|
+
comment: "Data e hora da \xFAltima atualiza\xE7\xE3o dos dados da posi\xE7\xE3o."
|
|
41
|
+
})
|
|
42
|
+
], PlayerPosition.prototype, "updatedAt", 2);
|
|
43
|
+
__decorateClass([
|
|
44
|
+
Column({
|
|
45
|
+
type: "enum",
|
|
46
|
+
enum: Object.values(Position),
|
|
47
|
+
comment: "Posi\xE7\xE3o do jogador no campo, representada por um enum."
|
|
48
|
+
})
|
|
49
|
+
], PlayerPosition.prototype, "position", 2);
|
|
50
|
+
__decorateClass([
|
|
51
|
+
ManyToMany(() => Player, (player) => player.positions)
|
|
52
|
+
], PlayerPosition.prototype, "players", 2);
|
|
53
|
+
PlayerPosition = __decorateClass([
|
|
54
|
+
Entity("player-positions"),
|
|
55
|
+
Unique(["position"])
|
|
56
|
+
], PlayerPosition);
|
|
57
|
+
export {
|
|
58
|
+
PlayerPosition
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preferred-leg.enum.d.ts","sourceRoot":"","sources":["../../../../src/players/players/enums/preferred-leg.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;CACd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/players/players/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { User } from '../../app-auth';
|
|
2
|
+
import { PlayerPosition } from '../player-position';
|
|
3
|
+
import { PreferredLeg } from './enums/preferred-leg.enum';
|
|
4
|
+
export declare class Player {
|
|
5
|
+
id: number;
|
|
6
|
+
userId: number;
|
|
7
|
+
createdAt: Date;
|
|
8
|
+
updatedAt: Date;
|
|
9
|
+
preferredLeg: PreferredLeg | null;
|
|
10
|
+
user: User;
|
|
11
|
+
positions: PlayerPosition[];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=player.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player.entity.d.ts","sourceRoot":"","sources":["../../../src/players/players/player.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,qBACa,MAAM;IAIjB,EAAE,EAAE,MAAM,CAAC;IAQX,MAAM,EAAE,MAAM,CAAC;IAOf,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAMlC,IAAI,EAAE,IAAI,CAAC;IAUX,SAAS,EAAE,cAAc,EAAE,CAAC;CAC7B"}
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
JoinColumn,
|
|
16
|
+
JoinTable,
|
|
17
|
+
ManyToMany,
|
|
18
|
+
OneToOne,
|
|
19
|
+
PrimaryGeneratedColumn,
|
|
20
|
+
UpdateDateColumn
|
|
21
|
+
} from "typeorm";
|
|
22
|
+
import { User } from "../../app-auth/index.js";
|
|
23
|
+
import { PlayerPosition } from "../player-position/index.js";
|
|
24
|
+
import { PreferredLeg } from "./enums/preferred-leg.enum.js";
|
|
25
|
+
let Player = class {
|
|
26
|
+
};
|
|
27
|
+
__decorateClass([
|
|
28
|
+
PrimaryGeneratedColumn({
|
|
29
|
+
comment: "Identificador \xFAnico da posi\xE7\xE3o."
|
|
30
|
+
})
|
|
31
|
+
], Player.prototype, "id", 2);
|
|
32
|
+
__decorateClass([
|
|
33
|
+
Column({
|
|
34
|
+
name: "user_id",
|
|
35
|
+
type: "int",
|
|
36
|
+
unique: true,
|
|
37
|
+
comment: "Identificador do usu\xE1rio associado a este jogador."
|
|
38
|
+
})
|
|
39
|
+
], Player.prototype, "userId", 2);
|
|
40
|
+
__decorateClass([
|
|
41
|
+
CreateDateColumn({
|
|
42
|
+
name: "created_at",
|
|
43
|
+
type: "timestamptz",
|
|
44
|
+
comment: "Data e hora em que a posi\xE7\xE3o foi criado."
|
|
45
|
+
})
|
|
46
|
+
], Player.prototype, "createdAt", 2);
|
|
47
|
+
__decorateClass([
|
|
48
|
+
UpdateDateColumn({
|
|
49
|
+
name: "updated_at",
|
|
50
|
+
type: "timestamptz",
|
|
51
|
+
comment: "Data e hora da \xFAltima atualiza\xE7\xE3o dos dados da posi\xE7\xE3o."
|
|
52
|
+
})
|
|
53
|
+
], Player.prototype, "updatedAt", 2);
|
|
54
|
+
__decorateClass([
|
|
55
|
+
Column({
|
|
56
|
+
type: "enum",
|
|
57
|
+
nullable: true,
|
|
58
|
+
enum: Object.values(PreferredLeg),
|
|
59
|
+
comment: "Perna preferencial do jogador, representada por um enum."
|
|
60
|
+
})
|
|
61
|
+
], Player.prototype, "preferredLeg", 2);
|
|
62
|
+
__decorateClass([
|
|
63
|
+
OneToOne(() => User, (user) => user.player, { onDelete: "CASCADE" }),
|
|
64
|
+
JoinColumn({ name: "user_id" })
|
|
65
|
+
], Player.prototype, "user", 2);
|
|
66
|
+
__decorateClass([
|
|
67
|
+
ManyToMany(() => PlayerPosition, (position) => position.players, {
|
|
68
|
+
cascade: ["insert", "update"]
|
|
69
|
+
}),
|
|
70
|
+
JoinTable({
|
|
71
|
+
name: "player_player_positions",
|
|
72
|
+
// nome da tabela de junção (join table)
|
|
73
|
+
joinColumn: { name: "player_id", referencedColumnName: "id" },
|
|
74
|
+
inverseJoinColumn: { name: "position_id", referencedColumnName: "id" }
|
|
75
|
+
})
|
|
76
|
+
], Player.prototype, "positions", 2);
|
|
77
|
+
Player = __decorateClass([
|
|
78
|
+
Entity("players")
|
|
79
|
+
], Player);
|
|
80
|
+
export {
|
|
81
|
+
Player
|
|
82
|
+
};
|