@natrave/shared-entities 1.4.81 → 1.4.83
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 -1
- package/dist/database-entities/index.d.ts.map +1 -1
- package/dist/database-entities/index.js +4 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/user-events/index.d.ts +3 -0
- package/dist/user-events/index.d.ts.map +1 -0
- package/dist/user-events/index.js +2 -0
- package/dist/user-events/user-domain-events/index.d.ts +2 -0
- package/dist/user-events/user-domain-events/index.d.ts.map +1 -0
- package/dist/user-events/user-domain-events/index.js +4 -0
- package/dist/user-events/user-domain-events/user-domain-event.entity.d.ts +14 -0
- package/dist/user-events/user-domain-events/user-domain-event.entity.d.ts.map +1 -0
- package/dist/user-events/user-domain-events/user-domain-event.entity.js +65 -0
- package/dist/user-events/user-event-views/index.d.ts +2 -0
- package/dist/user-events/user-event-views/index.d.ts.map +1 -0
- package/dist/user-events/user-event-views/index.js +4 -0
- package/dist/user-events/user-event-views/user-event-view.entity.d.ts +22 -0
- package/dist/user-events/user-event-views/user-event-view.entity.d.ts.map +1 -0
- package/dist/user-events/user-event-views/user-event-view.entity.js +99 -0
- package/package.json +2 -1
|
@@ -8,5 +8,6 @@ import { Payment, PaymentProvider, UserPaymentProvider } from '../payments';
|
|
|
8
8
|
import { Player, PlayerPosition } from '../players';
|
|
9
9
|
import { PlayerTeam, Team, 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, TournamentRegistrationRequest, TournamentTeam, TournamentTeamContactAttempt } from '../tournaments';
|
|
11
|
-
|
|
11
|
+
import { UserDomainEvent, UserEventView } from '../user-events';
|
|
12
|
+
export declare const DATABASE_ENTITIES: (typeof OrganizationUser | typeof Organization | typeof PhoneNumber | typeof TournamentAllowedPhone | typeof Tournament | typeof PasswordReset | typeof NotificationToken | typeof User | typeof UserAuthProvider | typeof RefreshToken | typeof Player | typeof TournamentRegistrationRequest | typeof UserVerification | typeof PlayerPosition | typeof PlayerTeam | typeof TeamJoinRequest | typeof TeamPlayerMergeHistory | typeof Team | typeof TournamentPlayer | typeof TournamentTeam | typeof TeamModality | typeof TournamentTeamContactAttempt | typeof TeamTrophy | typeof FacilityImage | typeof Facility | typeof FieldImage | typeof Field | typeof Address | typeof TournamentFacility | typeof FacilityOwner | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentFormatConfig | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentGroup | typeof TournamentMatch | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TournamentMatchGoal | typeof TournamentMatchCard | typeof TournamentPenaltyShootout | typeof UserDomainEvent | typeof UserEventView)[];
|
|
12
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,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9E,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,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACvF,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,6BAA6B,EAE7B,cAAc,EACd,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;
|
|
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,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9E,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,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACvF,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,6BAA6B,EAE7B,cAAc,EACd,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,mzCAuD7B,CAAC"}
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
TournamentTeam,
|
|
34
34
|
TournamentTeamContactAttempt
|
|
35
35
|
} from "../tournaments/index.js";
|
|
36
|
+
import { UserDomainEvent, UserEventView } from "../user-events/index.js";
|
|
36
37
|
const DATABASE_ENTITIES = [
|
|
37
38
|
Address,
|
|
38
39
|
Coupon,
|
|
@@ -85,7 +86,9 @@ const DATABASE_ENTITIES = [
|
|
|
85
86
|
PhoneNumber,
|
|
86
87
|
TournamentAllowedPhone,
|
|
87
88
|
TeamTrophy,
|
|
88
|
-
TournamentBracketSlot
|
|
89
|
+
TournamentBracketSlot,
|
|
90
|
+
UserDomainEvent,
|
|
91
|
+
UserEventView
|
|
89
92
|
];
|
|
90
93
|
export {
|
|
91
94
|
DATABASE_ENTITIES
|
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;AAEhC,cAAc,WAAW,CAAC;AAE1B,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,cAAc,cAAc,CAAC;AAE7B,cAAc,gBAAgB,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;AAE1B,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,cAAc,cAAc,CAAC;AAE7B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./teams/index.js";
|
|
|
10
10
|
import { DATABASE_ENTITIES } from "./database-entities/index.js";
|
|
11
11
|
export * from "./backoffice/index.js";
|
|
12
12
|
export * from "./history-logs/index.js";
|
|
13
|
+
export * from "./user-events/index.js";
|
|
13
14
|
export {
|
|
14
15
|
DATABASE_ENTITIES
|
|
15
16
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/user-events/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/user-events/user-domain-events/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DomainEntityType, UserDomainEventType } from '@natrave/user-domain-events';
|
|
2
|
+
import { User } from '../../app-auth';
|
|
3
|
+
export declare class UserDomainEvent {
|
|
4
|
+
id: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
type: UserDomainEventType;
|
|
7
|
+
entityType: DomainEntityType;
|
|
8
|
+
entityId: string;
|
|
9
|
+
occurredAt: Date;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
user: User;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=user-domain-event.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-domain-event.entity.d.ts","sourceRoot":"","sources":["../../../src/user-events/user-domain-events/user-domain-event.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAYpF,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,qBAIa,eAAe;IAE1B,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,EAAE,MAAM,CAAC;IAGf,IAAI,EAAE,mBAAmB,CAAC;IAG1B,UAAU,EAAE,gBAAgB,CAAC;IAG7B,QAAQ,EAAE,MAAM,CAAC;IAGjB,UAAU,EAAE,IAAI,CAAC;IAGjB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAIhB,IAAI,EAAE,IAAI,CAAC;CACZ"}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 { DomainEntityType, UserDomainEventType } from "@natrave/user-domain-events";
|
|
12
|
+
import {
|
|
13
|
+
Column,
|
|
14
|
+
CreateDateColumn,
|
|
15
|
+
Entity,
|
|
16
|
+
Index,
|
|
17
|
+
JoinColumn,
|
|
18
|
+
ManyToOne,
|
|
19
|
+
PrimaryGeneratedColumn,
|
|
20
|
+
UpdateDateColumn
|
|
21
|
+
} from "typeorm";
|
|
22
|
+
import { User } from "../../app-auth/index.js";
|
|
23
|
+
let UserDomainEvent = class {
|
|
24
|
+
};
|
|
25
|
+
__decorateClass([
|
|
26
|
+
PrimaryGeneratedColumn({ type: "bigint" })
|
|
27
|
+
], UserDomainEvent.prototype, "id", 2);
|
|
28
|
+
__decorateClass([
|
|
29
|
+
Column({
|
|
30
|
+
name: "user_id",
|
|
31
|
+
type: "uuid",
|
|
32
|
+
comment: "Identificador do usu\xE1rio associado ao evento."
|
|
33
|
+
})
|
|
34
|
+
], UserDomainEvent.prototype, "userId", 2);
|
|
35
|
+
__decorateClass([
|
|
36
|
+
Column({ name: "type", type: "enum", enum: UserDomainEventType })
|
|
37
|
+
], UserDomainEvent.prototype, "type", 2);
|
|
38
|
+
__decorateClass([
|
|
39
|
+
Column({ name: "entity_type", type: "enum", enum: DomainEntityType })
|
|
40
|
+
], UserDomainEvent.prototype, "entityType", 2);
|
|
41
|
+
__decorateClass([
|
|
42
|
+
Column({ name: "entity_id", type: "bigint" })
|
|
43
|
+
], UserDomainEvent.prototype, "entityId", 2);
|
|
44
|
+
__decorateClass([
|
|
45
|
+
Column({ name: "occurred_at", type: "timestamptz", default: () => "now()" })
|
|
46
|
+
], UserDomainEvent.prototype, "occurredAt", 2);
|
|
47
|
+
__decorateClass([
|
|
48
|
+
CreateDateColumn({ name: "created_at", type: "timestamptz", default: () => "now()" })
|
|
49
|
+
], UserDomainEvent.prototype, "createdAt", 2);
|
|
50
|
+
__decorateClass([
|
|
51
|
+
UpdateDateColumn({ name: "updated_at", type: "timestamptz", default: () => "now()" })
|
|
52
|
+
], UserDomainEvent.prototype, "updatedAt", 2);
|
|
53
|
+
__decorateClass([
|
|
54
|
+
ManyToOne(() => User),
|
|
55
|
+
JoinColumn({ name: "user_id" })
|
|
56
|
+
], UserDomainEvent.prototype, "user", 2);
|
|
57
|
+
UserDomainEvent = __decorateClass([
|
|
58
|
+
Entity({ name: "user_domain_events" }),
|
|
59
|
+
Index(["userId"]),
|
|
60
|
+
Index(["type"]),
|
|
61
|
+
Index(["userId", "type", "entityType", "entityId", "occurredAt"])
|
|
62
|
+
], UserDomainEvent);
|
|
63
|
+
export {
|
|
64
|
+
UserDomainEvent
|
|
65
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/user-events/user-event-views/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UserEventDisplayType, UserEventViewStatus } from '@natrave/user-domain-events';
|
|
2
|
+
import { User } from '../../app-auth';
|
|
3
|
+
import { UserDomainEvent } from '../user-domain-events';
|
|
4
|
+
export declare class UserEventView {
|
|
5
|
+
id: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
userDomainEventId: string;
|
|
8
|
+
viewKey: string;
|
|
9
|
+
displayType: UserEventDisplayType;
|
|
10
|
+
status: UserEventViewStatus;
|
|
11
|
+
priority: number;
|
|
12
|
+
dedupeKey: string;
|
|
13
|
+
availableFrom: Date | null;
|
|
14
|
+
expiresAt: Date | null;
|
|
15
|
+
shownAt: Date | null;
|
|
16
|
+
dismissedAt: Date | null;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
updatedAt: Date;
|
|
19
|
+
user: User;
|
|
20
|
+
userDomainEvent: UserDomainEvent;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=user-event-view.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-event-view.entity.d.ts","sourceRoot":"","sources":["../../../src/user-events/user-event-views/user-event-view.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAYxF,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,qBAMa,aAAa;IAExB,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,EAAE,MAAM,CAAC;IAOf,iBAAiB,EAAE,MAAM,CAAC;IAG1B,OAAO,EAAE,MAAM,CAAC;IAGhB,WAAW,EAAE,oBAAoB,CAAC;IAQlC,MAAM,EAAE,mBAAmB,CAAC;IAG5B,QAAQ,EAAE,MAAM,CAAC;IAIjB,SAAS,EAAE,MAAM,CAAC;IAGlB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;IAG3B,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAGvB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IAGrB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAGzB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAIhB,IAAI,EAAE,IAAI,CAAC;IAIX,eAAe,EAAE,eAAe,CAAC;CAClC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
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 { UserEventDisplayType, UserEventViewStatus } from "@natrave/user-domain-events";
|
|
12
|
+
import {
|
|
13
|
+
Column,
|
|
14
|
+
CreateDateColumn,
|
|
15
|
+
Entity,
|
|
16
|
+
Index,
|
|
17
|
+
JoinColumn,
|
|
18
|
+
ManyToOne,
|
|
19
|
+
PrimaryGeneratedColumn,
|
|
20
|
+
UpdateDateColumn
|
|
21
|
+
} from "typeorm";
|
|
22
|
+
import { User } from "../../app-auth/index.js";
|
|
23
|
+
import { UserDomainEvent } from "../user-domain-events/index.js";
|
|
24
|
+
let UserEventView = class {
|
|
25
|
+
};
|
|
26
|
+
__decorateClass([
|
|
27
|
+
PrimaryGeneratedColumn({ type: "bigint" })
|
|
28
|
+
], UserEventView.prototype, "id", 2);
|
|
29
|
+
__decorateClass([
|
|
30
|
+
Column({
|
|
31
|
+
name: "user_id",
|
|
32
|
+
type: "uuid",
|
|
33
|
+
comment: "Identificador do usu\xE1rio associado a visualiza\xE7\xE3o."
|
|
34
|
+
})
|
|
35
|
+
], UserEventView.prototype, "userId", 2);
|
|
36
|
+
__decorateClass([
|
|
37
|
+
Column({
|
|
38
|
+
name: "user_domain_event_id",
|
|
39
|
+
type: "bigint",
|
|
40
|
+
comment: "Identificador do evento associado \xE0 visualiza\xE7\xE3o."
|
|
41
|
+
})
|
|
42
|
+
], UserEventView.prototype, "userDomainEventId", 2);
|
|
43
|
+
__decorateClass([
|
|
44
|
+
Column({ name: "view_key", type: "varchar", length: 100 })
|
|
45
|
+
], UserEventView.prototype, "viewKey", 2);
|
|
46
|
+
__decorateClass([
|
|
47
|
+
Column({ name: "display_type", type: "enum", enum: UserEventDisplayType })
|
|
48
|
+
], UserEventView.prototype, "displayType", 2);
|
|
49
|
+
__decorateClass([
|
|
50
|
+
Column({
|
|
51
|
+
name: "status",
|
|
52
|
+
type: "enum",
|
|
53
|
+
enum: UserEventViewStatus,
|
|
54
|
+
default: UserEventViewStatus.PENDING
|
|
55
|
+
})
|
|
56
|
+
], UserEventView.prototype, "status", 2);
|
|
57
|
+
__decorateClass([
|
|
58
|
+
Column({ name: "priority", type: "int", default: 0 })
|
|
59
|
+
], UserEventView.prototype, "priority", 2);
|
|
60
|
+
__decorateClass([
|
|
61
|
+
Column({ name: "dedupe_key", type: "varchar", length: 200 })
|
|
62
|
+
], UserEventView.prototype, "dedupeKey", 2);
|
|
63
|
+
__decorateClass([
|
|
64
|
+
Column({ name: "available_from", type: "timestamptz", nullable: true })
|
|
65
|
+
], UserEventView.prototype, "availableFrom", 2);
|
|
66
|
+
__decorateClass([
|
|
67
|
+
Column({ name: "expires_at", type: "timestamptz", nullable: true })
|
|
68
|
+
], UserEventView.prototype, "expiresAt", 2);
|
|
69
|
+
__decorateClass([
|
|
70
|
+
Column({ name: "shown_at", type: "timestamptz", nullable: true })
|
|
71
|
+
], UserEventView.prototype, "shownAt", 2);
|
|
72
|
+
__decorateClass([
|
|
73
|
+
Column({ name: "dismissed_at", type: "timestamptz", nullable: true })
|
|
74
|
+
], UserEventView.prototype, "dismissedAt", 2);
|
|
75
|
+
__decorateClass([
|
|
76
|
+
CreateDateColumn({ name: "created_at", type: "timestamptz", default: () => "now()" })
|
|
77
|
+
], UserEventView.prototype, "createdAt", 2);
|
|
78
|
+
__decorateClass([
|
|
79
|
+
UpdateDateColumn({ name: "updated_at", type: "timestamptz", default: () => "now()" })
|
|
80
|
+
], UserEventView.prototype, "updatedAt", 2);
|
|
81
|
+
__decorateClass([
|
|
82
|
+
ManyToOne(() => User),
|
|
83
|
+
JoinColumn({ name: "user_id" })
|
|
84
|
+
], UserEventView.prototype, "user", 2);
|
|
85
|
+
__decorateClass([
|
|
86
|
+
ManyToOne(() => UserDomainEvent, { onDelete: "CASCADE" }),
|
|
87
|
+
JoinColumn({ name: "user_domain_event_id" })
|
|
88
|
+
], UserEventView.prototype, "userDomainEvent", 2);
|
|
89
|
+
UserEventView = __decorateClass([
|
|
90
|
+
Entity({ name: "user_event_views" }),
|
|
91
|
+
Index(["dedupeKey"], { unique: true }),
|
|
92
|
+
Index(["userId", "status"]),
|
|
93
|
+
Index(["userDomainEventId"]),
|
|
94
|
+
Index(["userId", "status", "priority", "createdAt"]),
|
|
95
|
+
Index(["userId", "status", "availableFrom", "expiresAt"])
|
|
96
|
+
], UserEventView);
|
|
97
|
+
export {
|
|
98
|
+
UserEventView
|
|
99
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@natrave/shared-entities",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.83",
|
|
4
4
|
"description": "Entidades compartilhadass da NaTrave",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"@natrave/facility-service-types": "^0.0.9",
|
|
48
48
|
"@natrave/notification-service-types": "^1.1.71",
|
|
49
49
|
"@natrave/tournaments-service-types": "^1.3.11",
|
|
50
|
+
"@natrave/user-domain-events": "^0.1.1",
|
|
50
51
|
"reflect-metadata": "^0.2.2",
|
|
51
52
|
"typeorm": "^0.3.25"
|
|
52
53
|
},
|