echadospalante-core 9.3.2 → 9.3.4

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.
@@ -9,16 +9,16 @@ import { VentureSubscriptionData } from "./venture-subscription.data";
9
9
  import { VentureData } from "./venture.data";
10
10
  export declare class UserDetailData {
11
11
  id: string;
12
- gender: string;
12
+ gender: "M" | "F" | "O";
13
13
  birthDate: Date;
14
14
  municipalityId: number;
15
- user: UserData;
16
- municipality: MunicipalityData;
15
+ user?: UserData;
16
+ municipality?: MunicipalityData;
17
+ comments: PublicationCommentData[];
17
18
  donations: EventDonationData[];
18
19
  notifications: NotificationData[];
19
20
  publicationClaps: PublicationClapData[];
20
- comments: PublicationCommentData[];
21
- ventures: VentureData[];
22
21
  sponsorships: VentureSponsorshipData[];
23
22
  subscriptions: VentureSubscriptionData[];
23
+ ventures: VentureData[];
24
24
  }
@@ -27,13 +27,13 @@ let UserDetailData = class UserDetailData {
27
27
  municipalityId;
28
28
  user;
29
29
  municipality;
30
+ comments;
30
31
  donations;
31
32
  notifications;
32
33
  publicationClaps;
33
- comments;
34
- ventures;
35
34
  sponsorships;
36
35
  subscriptions;
36
+ ventures;
37
37
  };
38
38
  exports.UserDetailData = UserDetailData;
39
39
  __decorate([
@@ -41,7 +41,7 @@ __decorate([
41
41
  __metadata("design:type", String)
42
42
  ], UserDetailData.prototype, "id", void 0);
43
43
  __decorate([
44
- (0, typeorm_1.Column)(),
44
+ (0, typeorm_1.Column)({ type: "enum", enum: ["M", "F", "O"] }),
45
45
  __metadata("design:type", String)
46
46
  ], UserDetailData.prototype, "gender", void 0);
47
47
  __decorate([
@@ -61,6 +61,10 @@ __decorate([
61
61
  (0, typeorm_1.JoinColumn)({ name: "municipalityId" }),
62
62
  __metadata("design:type", municipality_data_1.MunicipalityData)
63
63
  ], UserDetailData.prototype, "municipality", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.OneToMany)(() => publication_comment_data_1.PublicationCommentData, (publicationComment) => publicationComment.User),
66
+ __metadata("design:type", Array)
67
+ ], UserDetailData.prototype, "comments", void 0);
64
68
  __decorate([
65
69
  (0, typeorm_1.OneToMany)(() => event_donation_data_1.EventDonationData, (eventDonation) => eventDonation.donor),
66
70
  __metadata("design:type", Array)
@@ -73,14 +77,6 @@ __decorate([
73
77
  (0, typeorm_1.OneToMany)(() => publication_clap_data_1.PublicationClapData, (publicationClap) => publicationClap.user),
74
78
  __metadata("design:type", Array)
75
79
  ], UserDetailData.prototype, "publicationClaps", void 0);
76
- __decorate([
77
- (0, typeorm_1.OneToMany)(() => publication_comment_data_1.PublicationCommentData, (publicationComment) => publicationComment.User),
78
- __metadata("design:type", Array)
79
- ], UserDetailData.prototype, "comments", void 0);
80
- __decorate([
81
- (0, typeorm_1.OneToMany)(() => venture_data_1.VentureData, (venture) => venture.ownerDetail),
82
- __metadata("design:type", Array)
83
- ], UserDetailData.prototype, "ventures", void 0);
84
80
  __decorate([
85
81
  (0, typeorm_1.OneToMany)(() => venture_sponsorship_data_1.VentureSponsorshipData, (ventureSponsorship) => ventureSponsorship.user),
86
82
  __metadata("design:type", Array)
@@ -89,6 +85,10 @@ __decorate([
89
85
  (0, typeorm_1.OneToMany)(() => venture_subscription_data_1.VentureSubscriptionData, (ventureSubscription) => ventureSubscription.user),
90
86
  __metadata("design:type", Array)
91
87
  ], UserDetailData.prototype, "subscriptions", void 0);
88
+ __decorate([
89
+ (0, typeorm_1.OneToMany)(() => venture_data_1.VentureData, (venture) => venture.ownerDetail),
90
+ __metadata("design:type", Array)
91
+ ], UserDetailData.prototype, "ventures", void 0);
92
92
  exports.UserDetailData = UserDetailData = __decorate([
93
93
  (0, typeorm_1.Entity)()
94
94
  ], UserDetailData);
@@ -13,8 +13,6 @@ export declare class UserData {
13
13
  updatedAt: Date;
14
14
  onboardingCompleted: boolean;
15
15
  verified: boolean;
16
- contactId?: string;
17
- detailId?: string;
18
16
  contact?: UserContactData;
19
17
  detail?: UserDetailData;
20
18
  preferences: VentureCategoryData[];
@@ -26,8 +26,6 @@ let UserData = class UserData {
26
26
  updatedAt;
27
27
  onboardingCompleted;
28
28
  verified;
29
- contactId;
30
- detailId;
31
29
  contact;
32
30
  detail;
33
31
  preferences;
@@ -74,14 +72,6 @@ __decorate([
74
72
  (0, typeorm_1.Column)({ default: false }),
75
73
  __metadata("design:type", Boolean)
76
74
  ], UserData.prototype, "verified", void 0);
77
- __decorate([
78
- (0, typeorm_1.Column)({ nullable: true, unique: true }),
79
- __metadata("design:type", String)
80
- ], UserData.prototype, "contactId", void 0);
81
- __decorate([
82
- (0, typeorm_1.Column)({ nullable: true, unique: true }),
83
- __metadata("design:type", String)
84
- ], UserData.prototype, "detailId", void 0);
85
75
  __decorate([
86
76
  (0, typeorm_1.OneToOne)(() => user_contact_data_1.UserContactData, (contact) => contact.user),
87
77
  (0, typeorm_1.JoinColumn)({ name: "contactId" }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echadospalante-core",
3
- "version": "9.3.2",
3
+ "version": "9.3.4",
4
4
  "description": "This package contains the core of the echadospalante project, it contains the domain entities, helpers, and other utilities that are shared between the different services.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,8 +24,8 @@ export class UserDetailData {
24
24
  @PrimaryGeneratedColumn("uuid")
25
25
  id: string;
26
26
 
27
- @Column()
28
- gender: string;
27
+ @Column({ type: "enum", enum: ["M", "F", "O"] })
28
+ gender: "M" | "F" | "O";
29
29
 
30
30
  @Column()
31
31
  birthDate: Date;
@@ -34,11 +34,17 @@ export class UserDetailData {
34
34
  municipalityId: number;
35
35
 
36
36
  @OneToOne(() => UserData, (user) => user.detail)
37
- user: UserData;
37
+ user?: UserData;
38
38
 
39
39
  @ManyToOne(() => MunicipalityData, (municipality) => municipality.userDetails)
40
40
  @JoinColumn({ name: "municipalityId" })
41
- municipality: MunicipalityData;
41
+ municipality?: MunicipalityData;
42
+
43
+ @OneToMany(
44
+ () => PublicationCommentData,
45
+ (publicationComment) => publicationComment.User
46
+ )
47
+ comments: PublicationCommentData[];
42
48
 
43
49
  @OneToMany(() => EventDonationData, (eventDonation) => eventDonation.donor)
44
50
  donations: EventDonationData[];
@@ -52,15 +58,6 @@ export class UserDetailData {
52
58
  )
53
59
  publicationClaps: PublicationClapData[];
54
60
 
55
- @OneToMany(
56
- () => PublicationCommentData,
57
- (publicationComment) => publicationComment.User
58
- )
59
- comments: PublicationCommentData[];
60
-
61
- @OneToMany(() => VentureData, (venture) => venture.ownerDetail)
62
- ventures: VentureData[];
63
-
64
61
  @OneToMany(
65
62
  () => VentureSponsorshipData,
66
63
  (ventureSponsorship) => ventureSponsorship.user
@@ -72,4 +69,7 @@ export class UserDetailData {
72
69
  (ventureSubscription) => ventureSubscription.user
73
70
  )
74
71
  subscriptions: VentureSubscriptionData[];
72
+
73
+ @OneToMany(() => VentureData, (venture) => venture.ownerDetail)
74
+ ventures: VentureData[];
75
75
  }
@@ -47,12 +47,6 @@ export class UserData {
47
47
  @Column({ default: false })
48
48
  verified: boolean;
49
49
 
50
- @Column({ nullable: true, unique: true })
51
- contactId?: string;
52
-
53
- @Column({ nullable: true, unique: true })
54
- detailId?: string;
55
-
56
50
  @OneToOne(() => UserContactData, (contact) => contact.user)
57
51
  @JoinColumn({ name: "contactId" })
58
52
  contact?: UserContactData;