@natrave/shared-entities 1.6.4 → 1.6.6
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/users/user.entity.d.ts +0 -2
- package/dist/app-auth/users/user.entity.d.ts.map +1 -1
- package/dist/app-auth/users/user.entity.js +0 -4
- package/dist/database-entities/index.d.ts +2 -2
- package/dist/database-entities/index.d.ts.map +1 -1
- package/dist/database-entities/index.js +0 -4
- package/dist/players/player-personal-data/player-personal-data.entity.js +1 -1
- package/dist/players/players/player.entity.d.ts.map +1 -1
- package/dist/players/players/player.entity.js +1 -0
- package/dist/teams/index.d.ts +0 -2
- package/dist/teams/index.d.ts.map +1 -1
- package/dist/teams/index.js +0 -2
- package/dist/teams/player-team/enums/team-member-type.enum.d.ts +5 -0
- package/dist/teams/player-team/enums/team-member-type.enum.d.ts.map +1 -0
- package/dist/teams/player-team/enums/team-member-type.enum.js +8 -0
- package/dist/teams/player-team/enums/technical-staff-role.enum.d.ts +6 -0
- package/dist/teams/player-team/enums/technical-staff-role.enum.d.ts.map +1 -0
- package/dist/teams/player-team/enums/technical-staff-role.enum.js +9 -0
- package/dist/teams/player-team/index.d.ts +2 -0
- package/dist/teams/player-team/index.d.ts.map +1 -1
- package/dist/teams/player-team/index.js +5 -1
- package/dist/teams/player-team/player-team.entity.d.ts +10 -4
- package/dist/teams/player-team/player-team.entity.d.ts.map +1 -1
- package/dist/teams/player-team/player-team.entity.js +34 -6
- package/dist/teams/teams/team.entity.d.ts +0 -2
- package/dist/teams/teams/team.entity.d.ts.map +1 -1
- package/dist/teams/teams/team.entity.js +0 -4
- package/package.json +1 -1
- package/dist/teams/team-member/enums/team-member-role.enum.d.ts +0 -7
- package/dist/teams/team-member/enums/team-member-role.enum.d.ts.map +0 -1
- package/dist/teams/team-member/enums/team-member-role.enum.js +0 -10
- package/dist/teams/team-member/index.d.ts +0 -3
- package/dist/teams/team-member/index.d.ts.map +0 -1
- package/dist/teams/team-member/index.js +0 -6
- package/dist/teams/team-member/team-member.entity.d.ts +0 -18
- package/dist/teams/team-member/team-member.entity.d.ts.map +0 -1
- package/dist/teams/team-member/team-member.entity.js +0 -92
- package/dist/teams/team-member-personal-data/index.d.ts +0 -2
- package/dist/teams/team-member-personal-data/index.d.ts.map +0 -1
- package/dist/teams/team-member-personal-data/index.js +0 -4
- package/dist/teams/team-member-personal-data/team-member-personal-data.entity.d.ts +0 -20
- package/dist/teams/team-member-personal-data/team-member-personal-data.entity.d.ts.map +0 -1
- package/dist/teams/team-member-personal-data/team-member-personal-data.entity.js +0 -169
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Notification, PushDeviceToken, UserNotificationPreference } from '../../notifications';
|
|
2
2
|
import { Player } from '../../players';
|
|
3
|
-
import { TeamMember } from '../../teams';
|
|
4
3
|
import { TournamentRegistrationRequest } from '../../tournaments';
|
|
5
4
|
import { RefreshToken } from '../refresh-tokens';
|
|
6
5
|
import { UserAuthProvider } from '../user-auth-providers';
|
|
@@ -24,7 +23,6 @@ export declare class User {
|
|
|
24
23
|
refreshTokens: RefreshToken[];
|
|
25
24
|
userAuthProviders: UserAuthProvider[];
|
|
26
25
|
player: Player;
|
|
27
|
-
teamMemberships: TeamMember[];
|
|
28
26
|
notifications: Notification[];
|
|
29
27
|
pushDeviceTokens: PushDeviceToken[];
|
|
30
28
|
notificationPreference: UserNotificationPreference | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../../src/app-auth/users/user.entity.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../../src/app-auth/users/user.entity.ts"],"names":[],"mappings":"AAcA,OAAO,E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@@ -23,7 +23,6 @@ import {
|
|
|
23
23
|
} from "typeorm";
|
|
24
24
|
import { Notification, PushDeviceToken, UserNotificationPreference } from "../../notifications/index.js";
|
|
25
25
|
import { Player } from "../../players/index.js";
|
|
26
|
-
import { TeamMember } from "../../teams/index.js";
|
|
27
26
|
import { TournamentRegistrationRequest } from "../../tournaments/index.js";
|
|
28
27
|
import { RefreshToken } from "../refresh-tokens/index.js";
|
|
29
28
|
import { UserAuthProvider } from "../user-auth-providers/index.js";
|
|
@@ -169,9 +168,6 @@ __decorateClass([
|
|
|
169
168
|
onDelete: "CASCADE"
|
|
170
169
|
})
|
|
171
170
|
], User.prototype, "player", 2);
|
|
172
|
-
__decorateClass([
|
|
173
|
-
OneToMany(() => TeamMember, (teamMember) => teamMember.user)
|
|
174
|
-
], User.prototype, "teamMemberships", 2);
|
|
175
171
|
__decorateClass([
|
|
176
172
|
OneToMany(() => Notification, (notification) => notification.user)
|
|
177
173
|
], User.prototype, "notifications", 2);
|
|
@@ -6,8 +6,8 @@ import { TeamPlayerMergeHistory } from '../history-logs';
|
|
|
6
6
|
import { Notification, NotificationDelivery, NotificationDispatchLog, PushDeviceToken, UserNotificationPreference } from '../notifications';
|
|
7
7
|
import { Payment, PaymentProvider, UserPaymentProvider } from '../payments';
|
|
8
8
|
import { Player, PlayerPersonalData, PlayerPosition } from '../players';
|
|
9
|
-
import { PlayerTeam, Team, TeamAccessCode, TeamJoinRequest,
|
|
9
|
+
import { PlayerTeam, Team, TeamAccessCode, TeamJoinRequest, TeamModality, TeamTrophy } from '../teams';
|
|
10
10
|
import { Tournament, TournamentAllowedPhone, TournamentBracket, TournamentBracketSlot, TournamentContact, TournamentCoupon, TournamentFacility, TournamentFormatConfig, TournamentGroup, TournamentMatch, TournamentMatchAvailability, TournamentMatchCard, TournamentMatchGoal, TournamentMatchRule, TournamentMatchSchema, TournamentPayment, TournamentPenaltyShootout, TournamentPlayer, TournamentPlayerRule, TournamentPrizeRule, TournamentPublicationChargeRule, TournamentRegistrationRequest, TournamentRegistrationRequirement, TournamentTeam, TournamentTeamContactAttempt } from '../tournaments';
|
|
11
11
|
import { UserDomainEvent, UserEventView } from '../user-events';
|
|
12
|
-
export declare const DATABASE_ENTITIES: (typeof PasswordReset | typeof Notification | typeof User | typeof NotificationDelivery | typeof NotificationDispatchLog | typeof PushDeviceToken | typeof UserNotificationPreference | typeof TeamPlayerMergeHistory | typeof Team | typeof PlayerTeam | typeof Player | typeof FacilityImage | typeof Facility | typeof FieldImage | typeof Field | typeof Address | typeof TournamentFacility | typeof OrganizationUserBillingInfo | typeof PhoneNumber | typeof Organization | typeof TournamentAllowedPhone | typeof OrganizationUser | typeof Tournament | typeof TournamentPayment | typeof FacilityOwner | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentFormatConfig | typeof
|
|
12
|
+
export declare const DATABASE_ENTITIES: (typeof PasswordReset | typeof Notification | typeof User | typeof NotificationDelivery | typeof NotificationDispatchLog | typeof PushDeviceToken | typeof UserNotificationPreference | typeof TeamPlayerMergeHistory | typeof Team | typeof PlayerTeam | typeof Player | typeof FacilityImage | typeof Facility | typeof FieldImage | typeof Field | typeof Address | typeof TournamentFacility | typeof OrganizationUserBillingInfo | typeof PhoneNumber | typeof Organization | typeof TournamentAllowedPhone | typeof OrganizationUser | typeof Tournament | typeof TournamentPayment | typeof FacilityOwner | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentFormatConfig | typeof TournamentMatchCard | typeof TournamentTeam | typeof TournamentMatch | typeof TournamentPlayer | typeof TournamentMatchGoal | typeof TournamentPenaltyShootout | typeof TournamentGroup | typeof TournamentBracketSlot | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentRegistrationRequest | typeof TournamentRegistrationRequirement | typeof TournamentTeamContactAttempt | typeof TournamentBracket | typeof TeamTrophy | typeof TournamentPublicationChargeRule | typeof TeamAccessCode | typeof TeamJoinRequest | typeof TeamModality | typeof PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | typeof UserVerification | typeof UserDomainEvent | typeof UserEventView)[];
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database-entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,2BAA2B,EAC3B,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,0BAA0B,EAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EACL,UAAU,EACV,IAAI,EACJ,cAAc,EACd,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database-entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpG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essCode,
|
|
24
24
|
TeamJoinRequest,
|
|
25
|
-
TeamMember,
|
|
26
|
-
TeamMemberPersonalData,
|
|
27
25
|
TeamModality,
|
|
28
26
|
TeamTrophy
|
|
29
27
|
} from "../teams/index.js";
|
|
@@ -107,8 +105,6 @@ const DATABASE_ENTITIES = [
|
|
|
107
105
|
Team,
|
|
108
106
|
TeamAccessCode,
|
|
109
107
|
PlayerTeam,
|
|
110
|
-
TeamMember,
|
|
111
|
-
TeamMemberPersonalData,
|
|
112
108
|
TeamModality,
|
|
113
109
|
TeamJoinRequest,
|
|
114
110
|
NotificationDispatchLog,
|
|
@@ -38,7 +38,7 @@ let PlayerPersonalData = class {
|
|
|
38
38
|
};
|
|
39
39
|
__decorateClass([
|
|
40
40
|
PrimaryGeneratedColumn({
|
|
41
|
-
comment: "Identificador \xFAnico dos dados pessoais
|
|
41
|
+
comment: "Identificador \xFAnico dos dados pessoais da pessoa vinculada ao time."
|
|
42
42
|
})
|
|
43
43
|
], PlayerPersonalData.prototype, "id", 2);
|
|
44
44
|
__decorateClass([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"player.entity.d.ts","sourceRoot":"","sources":["../../../src/players/players/player.entity.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,qBAGa,MAAM;
|
|
1
|
+
{"version":3,"file":"player.entity.d.ts","sourceRoot":"","sources":["../../../src/players/players/player.entity.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,qBAGa,MAAM;IAGjB,EAAE,EAAE,MAAM,CAAC;IAGX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAQhB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAQvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAQxB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IASlC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAWlB,SAAS,EAAE,cAAc,EAAE,CAAC;IAG5B,eAAe,EAAE,UAAU,EAAE,CAAC;IAE9B,YAAY,EAAE,eAAe,EAAE,CAAC;IAGhC,YAAY,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAMxC,WAAW,IAAI,IAAI;CAKpB"}
|
|
@@ -78,6 +78,7 @@ __decorateClass([
|
|
|
78
78
|
}),
|
|
79
79
|
JoinColumn({ name: "user_id" })
|
|
80
80
|
], Player.prototype, "user", 2);
|
|
81
|
+
// TODO: migrate canonical per-team positions to PlayerTeam.positions and remove this relation.
|
|
81
82
|
__decorateClass([
|
|
82
83
|
ManyToMany(() => PlayerPosition, (position) => position.players, {
|
|
83
84
|
cascade: ["insert", "update"]
|
package/dist/teams/index.d.ts
CHANGED
|
@@ -2,8 +2,6 @@ export { TeamJoinRequestStatus } from './enums/request-status.enum';
|
|
|
2
2
|
export * from './player-team';
|
|
3
3
|
export * from './team-access-codes';
|
|
4
4
|
export * from './team-join-requests';
|
|
5
|
-
export * from './team-member';
|
|
6
|
-
export * from './team-member-personal-data';
|
|
7
5
|
export * from './team-modality';
|
|
8
6
|
export * from './team-trophy';
|
|
9
7
|
export * from './teams';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/teams/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/teams/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
|
package/dist/teams/index.js
CHANGED
|
@@ -2,8 +2,6 @@ import { TeamJoinRequestStatus } from "./enums/request-status.enum.js";
|
|
|
2
2
|
export * from "./player-team/index.js";
|
|
3
3
|
export * from "./team-access-codes/index.js";
|
|
4
4
|
export * from "./team-join-requests/index.js";
|
|
5
|
-
export * from "./team-member/index.js";
|
|
6
|
-
export * from "./team-member-personal-data/index.js";
|
|
7
5
|
export * from "./team-modality/index.js";
|
|
8
6
|
export * from "./team-trophy/index.js";
|
|
9
7
|
export * from "./teams/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-member-type.enum.d.ts","sourceRoot":"","sources":["../../../../src/teams/player-team/enums/team-member-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,WAAW,gBAAgB;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"technical-staff-role.enum.d.ts","sourceRoot":"","sources":["../../../../src/teams/player-team/enums/technical-staff-role.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,kBAAkB;IAC5B,UAAU,eAAe;IACzB,eAAe,oBAAoB;IACnC,aAAa,kBAAkB;CAChC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var TechnicalStaffRole = /* @__PURE__ */ ((TechnicalStaffRole2) => {
|
|
2
|
+
TechnicalStaffRole2["HEAD_COACH"] = "head_coach";
|
|
3
|
+
TechnicalStaffRole2["ASSISTANT_COACH"] = "assistant_coach";
|
|
4
|
+
TechnicalStaffRole2["FITNESS_COACH"] = "fitness_coach";
|
|
5
|
+
return TechnicalStaffRole2;
|
|
6
|
+
})(TechnicalStaffRole || {});
|
|
7
|
+
export {
|
|
8
|
+
TechnicalStaffRole
|
|
9
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/teams/player-team/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/teams/player-team/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { TeamMemberType } from "./enums/team-member-type.enum.js";
|
|
2
|
+
import { TechnicalStaffRole } from "./enums/technical-staff-role.enum.js";
|
|
1
3
|
import { PlayerTeam } from "./player-team.entity.js";
|
|
2
4
|
export {
|
|
3
|
-
PlayerTeam
|
|
5
|
+
PlayerTeam,
|
|
6
|
+
TeamMemberType,
|
|
7
|
+
TechnicalStaffRole
|
|
4
8
|
};
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import { TeamPlayerMergeHistory } from '../../history-logs';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { TournamentPlayer } from '../../tournaments';
|
|
1
|
+
import { TeamPlayerMergeHistory } from '../../history-logs/team-player-merge-history/team-player-merge-history.entity';
|
|
2
|
+
import { Position } from '../../players/player-position/enums/position.enum';
|
|
3
|
+
import { Player } from '../../players/players/player.entity';
|
|
4
|
+
import { TournamentPlayer } from '../../tournaments/tournament-players/tournament-player.entity';
|
|
5
|
+
import { Team } from '../teams/team.entity';
|
|
6
|
+
import { TeamMemberType } from './enums/team-member-type.enum';
|
|
7
|
+
import { TechnicalStaffRole } from './enums/technical-staff-role.enum';
|
|
5
8
|
export declare class PlayerTeam {
|
|
6
9
|
id: number;
|
|
7
10
|
playerId: number;
|
|
8
11
|
teamId: number;
|
|
12
|
+
type: TeamMemberType;
|
|
13
|
+
role: TechnicalStaffRole | null;
|
|
14
|
+
positions: Position[];
|
|
9
15
|
isAdmin: boolean;
|
|
10
16
|
lastMergeEventId: string | null;
|
|
11
17
|
lastConversionEventId: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"player-team.entity.d.ts","sourceRoot":"","sources":["../../../src/teams/player-team/player-team.entity.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"player-team.entity.d.ts","sourceRoot":"","sources":["../../../src/teams/player-team/player-team.entity.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+EAA+E,CAAC;AACvH,OAAO,EAAE,QAAQ,EAAE,MAAM,mDAAmD,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+DAA+D,CAAC;AACjG,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,qBAOa,UAAU;IAKrB,EAAE,EAAE,MAAM,CAAC;IAIX,QAAQ,EAAE,MAAM,CAAC;IAGjB,MAAM,EAAE,MAAM,CAAC;IAQf,IAAI,EAAE,cAAc,CAAC;IAQrB,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAShC,SAAS,EAAE,QAAQ,EAAE,CAAC;IAQtB,OAAO,EAAE,OAAO,CAAC;IAUjB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAQhC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IAQrC,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAGvB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAKhB,MAAM,EAAE,MAAM,CAAC;IAIf,IAAI,EAAE,IAAI,CAAC;IAGX,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IAItC,cAAc,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAI/C,mBAAmB,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACrD"}
|
|
@@ -21,15 +21,18 @@ import {
|
|
|
21
21
|
Unique,
|
|
22
22
|
UpdateDateColumn
|
|
23
23
|
} from "typeorm";
|
|
24
|
-
import { TeamPlayerMergeHistory } from "../../history-logs/
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { TournamentPlayer } from "../../tournaments/
|
|
24
|
+
import { TeamPlayerMergeHistory } from "../../history-logs/team-player-merge-history/team-player-merge-history.entity.js";
|
|
25
|
+
import { Position } from "../../players/player-position/enums/position.enum.js";
|
|
26
|
+
import { Player } from "../../players/players/player.entity.js";
|
|
27
|
+
import { TournamentPlayer } from "../../tournaments/tournament-players/tournament-player.entity.js";
|
|
28
|
+
import { Team } from "../teams/team.entity.js";
|
|
29
|
+
import { TeamMemberType } from "./enums/team-member-type.enum.js";
|
|
30
|
+
import { TechnicalStaffRole } from "./enums/technical-staff-role.enum.js";
|
|
28
31
|
let PlayerTeam = class {
|
|
29
32
|
};
|
|
30
33
|
__decorateClass([
|
|
31
34
|
PrimaryGeneratedColumn({
|
|
32
|
-
comment: "Identificador \xFAnico do v\xEDnculo
|
|
35
|
+
comment: "Identificador \xFAnico do v\xEDnculo membro\u2013time."
|
|
33
36
|
})
|
|
34
37
|
], PlayerTeam.prototype, "id", 2);
|
|
35
38
|
__decorateClass([
|
|
@@ -38,6 +41,31 @@ __decorateClass([
|
|
|
38
41
|
__decorateClass([
|
|
39
42
|
Column({ name: "team_id", type: "int", comment: "FK teams.id" })
|
|
40
43
|
], PlayerTeam.prototype, "teamId", 2);
|
|
44
|
+
__decorateClass([
|
|
45
|
+
Column({
|
|
46
|
+
type: "enum",
|
|
47
|
+
enum: TeamMemberType,
|
|
48
|
+
default: TeamMemberType.PLAYER,
|
|
49
|
+
comment: "Tipo do membro vinculado ao time."
|
|
50
|
+
})
|
|
51
|
+
], PlayerTeam.prototype, "type", 2);
|
|
52
|
+
__decorateClass([
|
|
53
|
+
Column({
|
|
54
|
+
type: "enum",
|
|
55
|
+
enum: TechnicalStaffRole,
|
|
56
|
+
nullable: true,
|
|
57
|
+
comment: "Fun\xE7\xE3o do membro na comiss\xE3o t\xE9cnica quando aplic\xE1vel."
|
|
58
|
+
})
|
|
59
|
+
], PlayerTeam.prototype, "role", 2);
|
|
60
|
+
__decorateClass([
|
|
61
|
+
Column({
|
|
62
|
+
type: "enum",
|
|
63
|
+
enum: Object.values(Position),
|
|
64
|
+
array: true,
|
|
65
|
+
default: "{}",
|
|
66
|
+
comment: "Posi\xE7\xF5es exercidas pelo membro neste time."
|
|
67
|
+
})
|
|
68
|
+
], PlayerTeam.prototype, "positions", 2);
|
|
41
69
|
__decorateClass([
|
|
42
70
|
Column({
|
|
43
71
|
name: "is_admin",
|
|
@@ -67,7 +95,7 @@ __decorateClass([
|
|
|
67
95
|
name: "deleted_at",
|
|
68
96
|
type: "timestamptz",
|
|
69
97
|
nullable: true,
|
|
70
|
-
comment: "Soft delete do v\xEDnculo."
|
|
98
|
+
comment: "Soft delete do v\xEDnculo membro-time."
|
|
71
99
|
})
|
|
72
100
|
], PlayerTeam.prototype, "deletedAt", 2);
|
|
73
101
|
__decorateClass([
|
|
@@ -7,7 +7,6 @@ import { TournamentTeam } from '../../tournaments/tournament-teams/tournament-te
|
|
|
7
7
|
import { PlayerTeam } from '../player-team/player-team.entity';
|
|
8
8
|
import { TeamAccessCode } from '../team-access-codes/team-access-code.entity';
|
|
9
9
|
import { TeamJoinRequest } from '../team-join-requests/team-join-request.entity';
|
|
10
|
-
import { TeamMember } from '../team-member/team-member.entity';
|
|
11
10
|
import { TeamModality } from '../team-modality/team-modality.entity';
|
|
12
11
|
import { TeamTrophy } from '../team-trophy/team-trophy.entity';
|
|
13
12
|
export declare class Team {
|
|
@@ -26,7 +25,6 @@ export declare class Team {
|
|
|
26
25
|
updatedAt: Date;
|
|
27
26
|
tournamentTeams: TournamentTeam[];
|
|
28
27
|
playerMemberships: PlayerTeam[];
|
|
29
|
-
members: TeamMember[];
|
|
30
28
|
accessCodes: TeamAccessCode[];
|
|
31
29
|
teamModalities: TeamModality[];
|
|
32
30
|
joinRequests: TeamJoinRequest[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team.entity.d.ts","sourceRoot":"","sources":["../../../src/teams/teams/team.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAYtE,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+EAA+E,CAAC;AACvH,OAAO,EAAE,6BAA6B,EAAE,MAAM,2FAA2F,CAAC;AAC1I,OAAO,EAAE,4BAA4B,EAAE,MAAM,2FAA2F,CAAC;AACzI,OAAO,EAAE,cAAc,EAAE,MAAM,2DAA2D,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CA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AAE,cAAc,EAAE,CAAC;IAGlC,iBAAiB,EAAE,UAAU,EAAE,CAAC;IAGhC,WAAW,EAAE,cAAc,EAAE,CAAC;IAG9B,cAAc,EAAE,YAAY,EAAE,CAAC;IAG/B,YAAY,EAAE,eAAe,EAAE,CAAC;IAGhC,yBAAyB,EAAE,4BAA4B,EAAE,CAAC;IAG1D,QAAQ,EAAE,UAAU,EAAE,CAAC;IAGvB,8BAA8B,EAAE,6BAA6B,EAAE,CAAC;IAGhE,YAAY,EAAE,sBAAsB,EAAE,CAAC;CACxC"}
|
|
@@ -27,7 +27,6 @@ import { TournamentTeam } from "../../tournaments/tournament-teams/tournament-te
|
|
|
27
27
|
import { PlayerTeam } from "../player-team/player-team.entity.js";
|
|
28
28
|
import { TeamAccessCode } from "../team-access-codes/team-access-code.entity.js";
|
|
29
29
|
import { TeamJoinRequest } from "../team-join-requests/team-join-request.entity.js";
|
|
30
|
-
import { TeamMember } from "../team-member/team-member.entity.js";
|
|
31
30
|
import { TeamModality } from "../team-modality/team-modality.entity.js";
|
|
32
31
|
import { TeamTrophy } from "../team-trophy/team-trophy.entity.js";
|
|
33
32
|
let Team = class {
|
|
@@ -95,9 +94,6 @@ __decorateClass([
|
|
|
95
94
|
__decorateClass([
|
|
96
95
|
OneToMany(() => PlayerTeam, (pt) => pt.team)
|
|
97
96
|
], Team.prototype, "playerMemberships", 2);
|
|
98
|
-
__decorateClass([
|
|
99
|
-
OneToMany(() => TeamMember, (member) => member.team)
|
|
100
|
-
], Team.prototype, "members", 2);
|
|
101
97
|
__decorateClass([
|
|
102
98
|
OneToMany(() => TeamAccessCode, (accessCode) => accessCode.team)
|
|
103
99
|
], Team.prototype, "accessCodes", 2);
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"team-member-role.enum.d.ts","sourceRoot":"","sources":["../../../../src/teams/team-member/enums/team-member-role.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,eAAe,oBAAoB;IACnC,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var TeamMemberRole = /* @__PURE__ */ ((TeamMemberRole2) => {
|
|
2
|
-
TeamMemberRole2["ASSISTANT_COACH"] = "assistant_coach";
|
|
3
|
-
TeamMemberRole2["PHYSIO"] = "physio";
|
|
4
|
-
TeamMemberRole2["MANAGER"] = "manager";
|
|
5
|
-
TeamMemberRole2["STAFF"] = "staff";
|
|
6
|
-
return TeamMemberRole2;
|
|
7
|
-
})(TeamMemberRole || {});
|
|
8
|
-
export {
|
|
9
|
-
TeamMemberRole
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/teams/team-member/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { User } from '../../app-auth';
|
|
2
|
-
import { TeamMemberPersonalData } from '../team-member-personal-data';
|
|
3
|
-
import { Team } from '../teams/team.entity';
|
|
4
|
-
import { TeamMemberRole } from './enums/team-member-role.enum';
|
|
5
|
-
export declare class TeamMember {
|
|
6
|
-
id: number;
|
|
7
|
-
userId: string | null;
|
|
8
|
-
teamId: number;
|
|
9
|
-
role: TeamMemberRole;
|
|
10
|
-
isAdmin: boolean;
|
|
11
|
-
deletedAt: Date | null;
|
|
12
|
-
createdAt: Date;
|
|
13
|
-
updatedAt: Date;
|
|
14
|
-
user: User | null;
|
|
15
|
-
team: Team;
|
|
16
|
-
personalData: TeamMemberPersonalData | null;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=team-member.entity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"team-member.entity.d.ts","sourceRoot":"","sources":["../../../src/teams/team-member/team-member.entity.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,qBAOa,UAAU;IAIrB,EAAE,EAAE,MAAM,CAAC;IAGX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtB,MAAM,EAAE,MAAM,CAAC;IAOf,IAAI,EAAE,cAAc,CAAC;IAQrB,OAAO,EAAE,OAAO,CAAC;IAQjB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAGvB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAIhB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAIlB,IAAI,EAAE,IAAI,CAAC;IAGX,YAAY,EAAE,sBAAsB,GAAG,IAAI,CAAC;CAC7C"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
-
if (decorator = decorators[i])
|
|
7
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
-
if (kind && result) __defProp(target, key, result);
|
|
9
|
-
return result;
|
|
10
|
-
};
|
|
11
|
-
import {
|
|
12
|
-
Column,
|
|
13
|
-
CreateDateColumn,
|
|
14
|
-
DeleteDateColumn,
|
|
15
|
-
Entity,
|
|
16
|
-
Index,
|
|
17
|
-
JoinColumn,
|
|
18
|
-
ManyToOne,
|
|
19
|
-
OneToOne,
|
|
20
|
-
PrimaryGeneratedColumn,
|
|
21
|
-
Unique,
|
|
22
|
-
UpdateDateColumn
|
|
23
|
-
} from "typeorm";
|
|
24
|
-
import { User } from "../../app-auth/index.js";
|
|
25
|
-
import { TeamMemberPersonalData } from "../team-member-personal-data/index.js";
|
|
26
|
-
import { Team } from "../teams/team.entity.js";
|
|
27
|
-
import { TeamMemberRole } from "./enums/team-member-role.enum.js";
|
|
28
|
-
let TeamMember = class {
|
|
29
|
-
};
|
|
30
|
-
__decorateClass([
|
|
31
|
-
PrimaryGeneratedColumn({
|
|
32
|
-
comment: "Identificador \xFAnico do v\xEDnculo membro\u2013time."
|
|
33
|
-
})
|
|
34
|
-
], TeamMember.prototype, "id", 2);
|
|
35
|
-
__decorateClass([
|
|
36
|
-
Column({ name: "user_id", type: "uuid", nullable: true, comment: "FK users.id" })
|
|
37
|
-
], TeamMember.prototype, "userId", 2);
|
|
38
|
-
__decorateClass([
|
|
39
|
-
Column({ name: "team_id", type: "int", comment: "FK teams.id" })
|
|
40
|
-
], TeamMember.prototype, "teamId", 2);
|
|
41
|
-
__decorateClass([
|
|
42
|
-
Column({
|
|
43
|
-
type: "enum",
|
|
44
|
-
enum: TeamMemberRole,
|
|
45
|
-
comment: "Fun\xE7\xE3o do membro na comiss\xE3o t\xE9cnica do time."
|
|
46
|
-
})
|
|
47
|
-
], TeamMember.prototype, "role", 2);
|
|
48
|
-
__decorateClass([
|
|
49
|
-
Column({
|
|
50
|
-
name: "is_admin",
|
|
51
|
-
type: "boolean",
|
|
52
|
-
default: false,
|
|
53
|
-
comment: "Admin do time."
|
|
54
|
-
})
|
|
55
|
-
], TeamMember.prototype, "isAdmin", 2);
|
|
56
|
-
__decorateClass([
|
|
57
|
-
DeleteDateColumn({
|
|
58
|
-
name: "deleted_at",
|
|
59
|
-
type: "timestamptz",
|
|
60
|
-
nullable: true,
|
|
61
|
-
comment: "Soft delete do v\xEDnculo."
|
|
62
|
-
})
|
|
63
|
-
], TeamMember.prototype, "deletedAt", 2);
|
|
64
|
-
__decorateClass([
|
|
65
|
-
CreateDateColumn({ name: "created_at", type: "timestamptz" })
|
|
66
|
-
], TeamMember.prototype, "createdAt", 2);
|
|
67
|
-
__decorateClass([
|
|
68
|
-
UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
|
|
69
|
-
], TeamMember.prototype, "updatedAt", 2);
|
|
70
|
-
__decorateClass([
|
|
71
|
-
ManyToOne(() => User, (user) => user.teamMemberships, { onDelete: "CASCADE", nullable: true }),
|
|
72
|
-
JoinColumn({ name: "user_id" })
|
|
73
|
-
], TeamMember.prototype, "user", 2);
|
|
74
|
-
__decorateClass([
|
|
75
|
-
ManyToOne(() => Team, (team) => team.members, { onDelete: "CASCADE" }),
|
|
76
|
-
JoinColumn({ name: "team_id" })
|
|
77
|
-
], TeamMember.prototype, "team", 2);
|
|
78
|
-
__decorateClass([
|
|
79
|
-
OneToOne(() => TeamMemberPersonalData, (personalData) => personalData.teamMember)
|
|
80
|
-
], TeamMember.prototype, "personalData", 2);
|
|
81
|
-
TeamMember = __decorateClass([
|
|
82
|
-
Entity("team_members"),
|
|
83
|
-
Unique(["userId", "teamId"]),
|
|
84
|
-
Index("IDX_team_members_user_id", ["userId"]),
|
|
85
|
-
Index("IDX_team_members_team_id", ["teamId"]),
|
|
86
|
-
Index("IDX_team_members_role", ["role"]),
|
|
87
|
-
Index("IDX_team_members_deleted_at", ["deletedAt"]),
|
|
88
|
-
Index("IDX_team_members_user_deleted", ["userId", "deletedAt"])
|
|
89
|
-
], TeamMember);
|
|
90
|
-
export {
|
|
91
|
-
TeamMember
|
|
92
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/teams/team-member-personal-data/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { User } from '../../app-auth';
|
|
2
|
-
import { TeamMember } from '../team-member';
|
|
3
|
-
export declare class TeamMemberPersonalData {
|
|
4
|
-
id: number;
|
|
5
|
-
teamMemberId: number;
|
|
6
|
-
name: string;
|
|
7
|
-
birthDate: string | null;
|
|
8
|
-
cpfEncrypted: string | null;
|
|
9
|
-
cpfHash: string | null;
|
|
10
|
-
collectedAt: Date | null;
|
|
11
|
-
migratedAt: Date | null;
|
|
12
|
-
migratedToUserId: string | null;
|
|
13
|
-
deletedAt: Date | null;
|
|
14
|
-
createdAt: Date;
|
|
15
|
-
updatedAt: Date;
|
|
16
|
-
teamMember: TeamMember;
|
|
17
|
-
migratedToUser: User | null;
|
|
18
|
-
prepareData(): void;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=team-member-personal-data.entity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"team-member-personal-data.entity.d.ts","sourceRoot":"","sources":["../../../src/teams/team-member-personal-data/team-member-personal-data.entity.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,qBAuBa,sBAAsB;IAIjC,EAAE,EAAE,MAAM,CAAC;IAOX,YAAY,EAAE,MAAM,CAAC;IAOrB,IAAI,EAAE,MAAM,CAAC;IAQb,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAQzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAS5B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAQvB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAQzB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IAQxB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAQhC,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAOvB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAIhB,UAAU,EAAE,UAAU,CAAC;IAIvB,cAAc,EAAE,IAAI,GAAG,IAAI,CAAC;IAI5B,WAAW,IAAI,IAAI;CAYpB"}
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
-
if (decorator = decorators[i])
|
|
7
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
-
if (kind && result) __defProp(target, key, result);
|
|
9
|
-
return result;
|
|
10
|
-
};
|
|
11
|
-
import {
|
|
12
|
-
BeforeInsert,
|
|
13
|
-
BeforeUpdate,
|
|
14
|
-
Check,
|
|
15
|
-
Column,
|
|
16
|
-
CreateDateColumn,
|
|
17
|
-
DeleteDateColumn,
|
|
18
|
-
Entity,
|
|
19
|
-
Index,
|
|
20
|
-
JoinColumn,
|
|
21
|
-
ManyToOne,
|
|
22
|
-
OneToOne,
|
|
23
|
-
PrimaryGeneratedColumn,
|
|
24
|
-
UpdateDateColumn
|
|
25
|
-
} from "typeorm";
|
|
26
|
-
import { User } from "../../app-auth/index.js";
|
|
27
|
-
import { TeamMember } from "../team-member/index.js";
|
|
28
|
-
let TeamMemberPersonalData = class {
|
|
29
|
-
prepareData() {
|
|
30
|
-
this.name = this.name.trim();
|
|
31
|
-
if (this.cpfEncrypted) {
|
|
32
|
-
this.cpfEncrypted = this.cpfEncrypted.trim();
|
|
33
|
-
}
|
|
34
|
-
if (this.cpfHash) {
|
|
35
|
-
const normalizedHash = this.cpfHash.trim().toLowerCase();
|
|
36
|
-
this.cpfHash = /^[a-f0-9]{64}$/.test(normalizedHash) ? normalizedHash : null;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
__decorateClass([
|
|
41
|
-
PrimaryGeneratedColumn({
|
|
42
|
-
comment: "Identificador \xFAnico dos dados pessoais do membro do time."
|
|
43
|
-
})
|
|
44
|
-
], TeamMemberPersonalData.prototype, "id", 2);
|
|
45
|
-
__decorateClass([
|
|
46
|
-
Column({
|
|
47
|
-
name: "team_member_id",
|
|
48
|
-
type: "int",
|
|
49
|
-
comment: "FK team_members.id."
|
|
50
|
-
})
|
|
51
|
-
], TeamMemberPersonalData.prototype, "teamMemberId", 2);
|
|
52
|
-
__decorateClass([
|
|
53
|
-
Column({
|
|
54
|
-
type: "varchar",
|
|
55
|
-
length: 255,
|
|
56
|
-
comment: "Nome do membro do time."
|
|
57
|
-
})
|
|
58
|
-
], TeamMemberPersonalData.prototype, "name", 2);
|
|
59
|
-
__decorateClass([
|
|
60
|
-
Column({
|
|
61
|
-
name: "birth_date",
|
|
62
|
-
type: "date",
|
|
63
|
-
nullable: true,
|
|
64
|
-
comment: "Data de nascimento do membro do time (YYYY-MM-DD)."
|
|
65
|
-
})
|
|
66
|
-
], TeamMemberPersonalData.prototype, "birthDate", 2);
|
|
67
|
-
__decorateClass([
|
|
68
|
-
Column({
|
|
69
|
-
name: "cpf_encrypted",
|
|
70
|
-
type: "text",
|
|
71
|
-
nullable: true,
|
|
72
|
-
comment: "CPF criptografado (ex.: AES-256-GCM)."
|
|
73
|
-
})
|
|
74
|
-
], TeamMemberPersonalData.prototype, "cpfEncrypted", 2);
|
|
75
|
-
__decorateClass([
|
|
76
|
-
Column({
|
|
77
|
-
name: "cpf_hash",
|
|
78
|
-
type: "char",
|
|
79
|
-
length: 64,
|
|
80
|
-
nullable: true,
|
|
81
|
-
comment: "Hash SHA-256 do CPF normalizado com pepper para busca/compara\xE7\xE3o."
|
|
82
|
-
})
|
|
83
|
-
], TeamMemberPersonalData.prototype, "cpfHash", 2);
|
|
84
|
-
__decorateClass([
|
|
85
|
-
Column({
|
|
86
|
-
name: "collected_at",
|
|
87
|
-
type: "timestamptz",
|
|
88
|
-
nullable: true,
|
|
89
|
-
comment: "Data/hora em que os dados pessoais foram coletados."
|
|
90
|
-
})
|
|
91
|
-
], TeamMemberPersonalData.prototype, "collectedAt", 2);
|
|
92
|
-
__decorateClass([
|
|
93
|
-
Column({
|
|
94
|
-
name: "migrated_at",
|
|
95
|
-
type: "timestamptz",
|
|
96
|
-
nullable: true,
|
|
97
|
-
comment: "Data/hora em que os dados foram migrados para users."
|
|
98
|
-
})
|
|
99
|
-
], TeamMemberPersonalData.prototype, "migratedAt", 2);
|
|
100
|
-
__decorateClass([
|
|
101
|
-
Column({
|
|
102
|
-
name: "migrated_to_user_id",
|
|
103
|
-
type: "uuid",
|
|
104
|
-
nullable: true,
|
|
105
|
-
comment: "FK users.id que recebeu os dados apos migracao."
|
|
106
|
-
})
|
|
107
|
-
], TeamMemberPersonalData.prototype, "migratedToUserId", 2);
|
|
108
|
-
__decorateClass([
|
|
109
|
-
DeleteDateColumn({
|
|
110
|
-
name: "deleted_at",
|
|
111
|
-
type: "timestamptz",
|
|
112
|
-
nullable: true,
|
|
113
|
-
comment: "Soft delete para retencao/auditoria."
|
|
114
|
-
})
|
|
115
|
-
], TeamMemberPersonalData.prototype, "deletedAt", 2);
|
|
116
|
-
__decorateClass([
|
|
117
|
-
CreateDateColumn({
|
|
118
|
-
name: "created_at",
|
|
119
|
-
type: "timestamptz",
|
|
120
|
-
comment: "Data/hora de criacao do registro."
|
|
121
|
-
})
|
|
122
|
-
], TeamMemberPersonalData.prototype, "createdAt", 2);
|
|
123
|
-
__decorateClass([
|
|
124
|
-
UpdateDateColumn({
|
|
125
|
-
name: "updated_at",
|
|
126
|
-
type: "timestamptz",
|
|
127
|
-
comment: "Data/hora da ultima atualizacao do registro."
|
|
128
|
-
})
|
|
129
|
-
], TeamMemberPersonalData.prototype, "updatedAt", 2);
|
|
130
|
-
__decorateClass([
|
|
131
|
-
OneToOne(() => TeamMember, (teamMember) => teamMember.personalData, { onDelete: "CASCADE" }),
|
|
132
|
-
JoinColumn({ name: "team_member_id" })
|
|
133
|
-
], TeamMemberPersonalData.prototype, "teamMember", 2);
|
|
134
|
-
__decorateClass([
|
|
135
|
-
ManyToOne(() => User, { onDelete: "SET NULL" }),
|
|
136
|
-
JoinColumn({ name: "migrated_to_user_id" })
|
|
137
|
-
], TeamMemberPersonalData.prototype, "migratedToUser", 2);
|
|
138
|
-
__decorateClass([
|
|
139
|
-
BeforeInsert(),
|
|
140
|
-
BeforeUpdate()
|
|
141
|
-
], TeamMemberPersonalData.prototype, "prepareData", 1);
|
|
142
|
-
TeamMemberPersonalData = __decorateClass([
|
|
143
|
-
Entity("team_member_personal_data"),
|
|
144
|
-
Check(
|
|
145
|
-
"CHK_team_member_personal_data_cpf_hash_format",
|
|
146
|
-
`"cpf_hash" IS NULL OR "cpf_hash" ~ '^[a-f0-9]{64}$'`
|
|
147
|
-
),
|
|
148
|
-
Check(
|
|
149
|
-
"CHK_team_member_personal_data_migration_user",
|
|
150
|
-
'"migrated_at" IS NULL OR "migrated_to_user_id" IS NOT NULL'
|
|
151
|
-
),
|
|
152
|
-
Check(
|
|
153
|
-
"CHK_team_member_personal_data_birth_date",
|
|
154
|
-
'"birth_date" IS NULL OR "birth_date" <= CURRENT_DATE'
|
|
155
|
-
),
|
|
156
|
-
Index("IDX_team_member_personal_data_team_member_id", ["teamMemberId"]),
|
|
157
|
-
Index("IDX_team_member_personal_data_deleted_at", ["deletedAt"]),
|
|
158
|
-
Index("IDX_team_member_personal_data_migrated_at", ["migratedAt"]),
|
|
159
|
-
Index("IDX_team_member_personal_data_cpf_hash_lookup", ["cpfHash"], {
|
|
160
|
-
where: '"deleted_at" IS NULL AND "migrated_at" IS NULL AND "cpf_hash" IS NOT NULL'
|
|
161
|
-
}),
|
|
162
|
-
Index("UX_team_member_personal_data_member_active", ["teamMemberId"], {
|
|
163
|
-
unique: true,
|
|
164
|
-
where: '"deleted_at" IS NULL'
|
|
165
|
-
})
|
|
166
|
-
], TeamMemberPersonalData);
|
|
167
|
-
export {
|
|
168
|
-
TeamMemberPersonalData
|
|
169
|
-
};
|