@natrave/shared-entities 1.6.9 → 1.6.10
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/database-entities/index.d.ts +2 -2
- package/dist/database-entities/index.d.ts.map +1 -1
- package/dist/database-entities/index.js +2 -0
- package/dist/tournaments/index.d.ts +1 -0
- package/dist/tournaments/index.d.ts.map +1 -1
- package/dist/tournaments/index.js +1 -0
- package/dist/tournaments/tournament-follows/index.d.ts +2 -0
- package/dist/tournaments/tournament-follows/index.d.ts.map +1 -0
- package/dist/tournaments/tournament-follows/index.js +4 -0
- package/dist/tournaments/tournament-follows/tournament-follow.entity.d.ts +12 -0
- package/dist/tournaments/tournament-follows/tournament-follow.entity.d.ts.map +1 -0
- package/dist/tournaments/tournament-follows/tournament-follow.entity.js +79 -0
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import { Notification, NotificationDelivery, NotificationDispatchLog, PushDevice
|
|
|
7
7
|
import { Payment, PaymentProvider, UserPaymentProvider } from '../payments';
|
|
8
8
|
import { Player, PlayerPersonalData, PlayerPosition } from '../players';
|
|
9
9
|
import { PlayerTeam, Team, TeamAccessCode, TeamJoinRequest, TeamModality, TeamTrophy } from '../teams';
|
|
10
|
-
import { Tournament, TournamentAllowedPhone, TournamentBracket, TournamentBracketSlot, TournamentContact, TournamentCoupon, TournamentFacility, TournamentFormatConfig, TournamentGroup, TournamentMatch, TournamentMatchAvailability, TournamentMatchCard, TournamentMatchGoal, TournamentMatchRule, TournamentMatchSchema, TournamentPayment, TournamentPenaltyShootout, TournamentPlayer, TournamentPlayerRule, TournamentPrizeRule, TournamentPublicationChargeRule, TournamentRegistrationRequest, TournamentRegistrationRequirement, TournamentTeam, TournamentTeamContactAttempt } from '../tournaments';
|
|
10
|
+
import { Tournament, TournamentAllowedPhone, TournamentBracket, TournamentBracketSlot, TournamentContact, TournamentCoupon, TournamentFacility, TournamentFollow, 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 TournamentMatchGoal | typeof TournamentTeam | typeof TournamentMatch | typeof TournamentPlayer | typeof TournamentPenaltyShootout | typeof TournamentAllowedPhone | typeof Tournament | typeof PhoneNumber | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof FacilityImage | typeof Facility | typeof FacilityOwner | typeof Field | typeof FieldImage | typeof TournamentFacility | typeof TournamentFormatConfig | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof OrganizationUser | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentPublicationChargeRule | typeof TournamentRegistrationRequest | typeof TournamentRegistrationRequirement | typeof TournamentTeamContactAttempt | typeof Address | typeof OrganizationUserBillingInfo | typeof Organization | typeof TournamentGroup | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TeamTrophy | typeof TournamentMatchCard | typeof TeamAccessCode | typeof TeamJoinRequest | typeof TeamModality | typeof PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | typeof UserVerification | typeof UserDomainEvent | typeof UserEventView)[];
|
|
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 TournamentMatchGoal | typeof TournamentTeam | typeof TournamentMatch | typeof TournamentPlayer | typeof TournamentPenaltyShootout | typeof TournamentAllowedPhone | typeof Tournament | typeof PhoneNumber | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof FacilityImage | typeof Facility | typeof FacilityOwner | typeof Field | typeof FieldImage | typeof TournamentFacility | typeof TournamentFollow | typeof TournamentFormatConfig | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof OrganizationUser | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentPublicationChargeRule | typeof TournamentRegistrationRequest | typeof TournamentRegistrationRequirement | typeof TournamentTeamContactAttempt | typeof Address | typeof OrganizationUserBillingInfo | typeof Organization | typeof TournamentGroup | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TeamTrophy | typeof TournamentMatchCard | 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,YAAY,EACZ,UAAU,EACX,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EAEjC,cAAc,EACd,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,
|
|
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,MAA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|
|
36
37
|
TournamentFormatConfig,
|
|
37
38
|
TournamentGroup,
|
|
38
39
|
TournamentMatch,
|
|
@@ -74,6 +75,7 @@ const DATABASE_ENTITIES = [
|
|
|
74
75
|
TournamentBracket,
|
|
75
76
|
TournamentCoupon,
|
|
76
77
|
TournamentFacility,
|
|
78
|
+
TournamentFollow,
|
|
77
79
|
TournamentFormatConfig,
|
|
78
80
|
TournamentGroup,
|
|
79
81
|
TournamentMatch,
|
|
@@ -4,6 +4,7 @@ export * from './tournament-brackets';
|
|
|
4
4
|
export * from './tournament-contacts';
|
|
5
5
|
export * from './tournament-coupons';
|
|
6
6
|
export * from './tournament-facilities';
|
|
7
|
+
export * from './tournament-follows';
|
|
7
8
|
export * from './tournament-format-configs';
|
|
8
9
|
export * from './tournament-groups';
|
|
9
10
|
export * from './tournament-match-cards';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tournaments/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tournaments/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
|
|
@@ -4,6 +4,7 @@ export * from "./tournament-brackets/index.js";
|
|
|
4
4
|
export * from "./tournament-contacts/index.js";
|
|
5
5
|
export * from "./tournament-coupons/index.js";
|
|
6
6
|
export * from "./tournament-facilities/index.js";
|
|
7
|
+
export * from "./tournament-follows/index.js";
|
|
7
8
|
export * from "./tournament-format-configs/index.js";
|
|
8
9
|
export * from "./tournament-groups/index.js";
|
|
9
10
|
export * from "./tournament-match-cards/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-follows/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { User } from '../../app-auth';
|
|
2
|
+
import { Tournament } from '../tournaments';
|
|
3
|
+
export declare class TournamentFollow {
|
|
4
|
+
id: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
tournamentId: number;
|
|
7
|
+
unfollowedAt: Date | null;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
user: User;
|
|
10
|
+
tournament: Tournament;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=tournament-follow.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tournament-follow.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-follows/tournament-follow.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAM5C,qBAQa,gBAAgB;IAI3B,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,EAAE,MAAM,CAAC;IAOf,YAAY,EAAE,MAAM,CAAC;IAQrB,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAO1B,SAAS,EAAE,IAAI,CAAC;IAMhB,IAAI,EAAE,IAAI,CAAC;IAIX,UAAU,EAAE,UAAU,CAAC;CACxB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import {
|
|
12
|
+
Column,
|
|
13
|
+
CreateDateColumn,
|
|
14
|
+
Entity,
|
|
15
|
+
Index,
|
|
16
|
+
JoinColumn,
|
|
17
|
+
ManyToOne,
|
|
18
|
+
PrimaryGeneratedColumn,
|
|
19
|
+
Unique
|
|
20
|
+
} from "typeorm";
|
|
21
|
+
import { User } from "../../app-auth/index.js";
|
|
22
|
+
import { Tournament } from "../tournaments/index.js";
|
|
23
|
+
let TournamentFollow = class {
|
|
24
|
+
};
|
|
25
|
+
__decorateClass([
|
|
26
|
+
PrimaryGeneratedColumn("uuid", {
|
|
27
|
+
comment: "Identificador \xFAnico do follow."
|
|
28
|
+
})
|
|
29
|
+
], TournamentFollow.prototype, "id", 2);
|
|
30
|
+
__decorateClass([
|
|
31
|
+
Column({
|
|
32
|
+
name: "user_id",
|
|
33
|
+
type: "uuid",
|
|
34
|
+
comment: "FK users.id. Usu\xE1rio que segue o torneio."
|
|
35
|
+
})
|
|
36
|
+
], TournamentFollow.prototype, "userId", 2);
|
|
37
|
+
__decorateClass([
|
|
38
|
+
Column({
|
|
39
|
+
name: "tournament_id",
|
|
40
|
+
type: "int",
|
|
41
|
+
comment: "FK tournaments.id. Torneio sendo seguido."
|
|
42
|
+
})
|
|
43
|
+
], TournamentFollow.prototype, "tournamentId", 2);
|
|
44
|
+
__decorateClass([
|
|
45
|
+
Column({
|
|
46
|
+
name: "unfollowed_at",
|
|
47
|
+
type: "timestamptz",
|
|
48
|
+
nullable: true,
|
|
49
|
+
comment: "Data/hora em que o usu\xE1rio deixou de seguir o torneio."
|
|
50
|
+
})
|
|
51
|
+
], TournamentFollow.prototype, "unfollowedAt", 2);
|
|
52
|
+
__decorateClass([
|
|
53
|
+
CreateDateColumn({
|
|
54
|
+
name: "created_at",
|
|
55
|
+
type: "timestamptz",
|
|
56
|
+
comment: "Data/hora de cria\xE7\xE3o do registro."
|
|
57
|
+
})
|
|
58
|
+
], TournamentFollow.prototype, "createdAt", 2);
|
|
59
|
+
__decorateClass([
|
|
60
|
+
ManyToOne(() => User, { onDelete: "CASCADE" }),
|
|
61
|
+
JoinColumn({ name: "user_id" })
|
|
62
|
+
], TournamentFollow.prototype, "user", 2);
|
|
63
|
+
__decorateClass([
|
|
64
|
+
ManyToOne(() => Tournament, { onDelete: "CASCADE" }),
|
|
65
|
+
JoinColumn({ name: "tournament_id" })
|
|
66
|
+
], TournamentFollow.prototype, "tournament", 2);
|
|
67
|
+
TournamentFollow = __decorateClass([
|
|
68
|
+
Entity("tournament_follows"),
|
|
69
|
+
Unique("UQ_tournament_follows_user_tournament", ["userId", "tournamentId"]),
|
|
70
|
+
Index("IDX_tournament_follows_user_active", ["userId"], {
|
|
71
|
+
where: '"unfollowed_at" IS NULL'
|
|
72
|
+
}),
|
|
73
|
+
Index("IDX_tournament_follows_tournament_active", ["tournamentId"], {
|
|
74
|
+
where: '"unfollowed_at" IS NULL'
|
|
75
|
+
})
|
|
76
|
+
], TournamentFollow);
|
|
77
|
+
export {
|
|
78
|
+
TournamentFollow
|
|
79
|
+
};
|