echadospalante-core 13.1.0 → 14.0.0

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.
Files changed (71) hide show
  1. package/dist/app/modules/domain/auth/index.d.ts +0 -2
  2. package/dist/app/modules/domain/common/geo.d.ts +2 -2
  3. package/dist/app/modules/domain/contributions/donation.d.ts +2 -2
  4. package/dist/app/modules/domain/contributions/sponsor.d.ts +4 -4
  5. package/dist/app/modules/domain/events/event.d.ts +2 -2
  6. package/dist/app/modules/domain/notifications/notification.d.ts +2 -2
  7. package/dist/app/modules/domain/publications/clap.d.ts +2 -2
  8. package/dist/app/modules/domain/publications/comment.d.ts +2 -2
  9. package/dist/app/modules/domain/publications/index.d.ts +0 -3
  10. package/dist/app/modules/domain/user/index.d.ts +0 -1
  11. package/dist/app/modules/domain/user/user.d.ts +14 -3
  12. package/dist/app/modules/domain/ventures/category.d.ts +1 -1
  13. package/dist/app/modules/domain/ventures/index.d.ts +0 -1
  14. package/dist/app/modules/domain/ventures/subscription.d.ts +4 -4
  15. package/dist/app/modules/domain/ventures/venture.d.ts +10 -4
  16. package/dist/app/modules/infrastructure/database/entities/event-donation.data.d.ts +2 -2
  17. package/dist/app/modules/infrastructure/database/entities/event-donation.data.js +4 -4
  18. package/dist/app/modules/infrastructure/database/entities/index.d.ts +0 -2
  19. package/dist/app/modules/infrastructure/database/entities/index.js +1 -5
  20. package/dist/app/modules/infrastructure/database/entities/municipality.data.d.ts +2 -2
  21. package/dist/app/modules/infrastructure/database/entities/municipality.data.js +4 -4
  22. package/dist/app/modules/infrastructure/database/entities/notification.data.d.ts +2 -3
  23. package/dist/app/modules/infrastructure/database/entities/notification.data.js +7 -12
  24. package/dist/app/modules/infrastructure/database/entities/publication-clap.data.d.ts +2 -2
  25. package/dist/app/modules/infrastructure/database/entities/publication-clap.data.js +4 -4
  26. package/dist/app/modules/infrastructure/database/entities/publication-comment.data.d.ts +2 -2
  27. package/dist/app/modules/infrastructure/database/entities/publication-comment.data.js +4 -4
  28. package/dist/app/modules/infrastructure/database/entities/user.data.d.ts +18 -2
  29. package/dist/app/modules/infrastructure/database/entities/user.data.js +59 -7
  30. package/dist/app/modules/infrastructure/database/entities/venture-event.data.d.ts +2 -2
  31. package/dist/app/modules/infrastructure/database/entities/venture-event.data.js +5 -5
  32. package/dist/app/modules/infrastructure/database/entities/venture-publication.data.d.ts +2 -3
  33. package/dist/app/modules/infrastructure/database/entities/venture-publication.data.js +6 -11
  34. package/dist/app/modules/infrastructure/database/entities/venture-sponsorship.data.d.ts +4 -4
  35. package/dist/app/modules/infrastructure/database/entities/venture-sponsorship.data.js +10 -10
  36. package/dist/app/modules/infrastructure/database/entities/venture-subscription.data.d.ts +4 -4
  37. package/dist/app/modules/infrastructure/database/entities/venture-subscription.data.js +9 -9
  38. package/dist/app/modules/infrastructure/database/entities/venture.data.d.ts +12 -6
  39. package/dist/app/modules/infrastructure/database/entities/venture.data.js +32 -17
  40. package/package.json +1 -1
  41. package/src/app/modules/domain/auth/index.ts +0 -2
  42. package/src/app/modules/domain/common/geo.ts +2 -2
  43. package/src/app/modules/domain/contributions/donation.ts +2 -3
  44. package/src/app/modules/domain/contributions/sponsor.ts +4 -4
  45. package/src/app/modules/domain/events/event.ts +2 -2
  46. package/src/app/modules/domain/notifications/notification.ts +2 -2
  47. package/src/app/modules/domain/publications/clap.ts +2 -3
  48. package/src/app/modules/domain/publications/comment.ts +2 -3
  49. package/src/app/modules/domain/publications/index.ts +0 -3
  50. package/src/app/modules/domain/user/index.ts +0 -1
  51. package/src/app/modules/domain/user/user.ts +14 -3
  52. package/src/app/modules/domain/ventures/category.ts +1 -1
  53. package/src/app/modules/domain/ventures/index.ts +0 -1
  54. package/src/app/modules/domain/ventures/subscription.ts +3 -5
  55. package/src/app/modules/domain/ventures/venture.ts +10 -4
  56. package/src/app/modules/infrastructure/database/entities/event-donation.data.ts +4 -4
  57. package/src/app/modules/infrastructure/database/entities/index.ts +0 -2
  58. package/src/app/modules/infrastructure/database/entities/municipality.data.ts +3 -3
  59. package/src/app/modules/infrastructure/database/entities/notification.data.ts +5 -8
  60. package/src/app/modules/infrastructure/database/entities/publication-clap.data.ts +4 -4
  61. package/src/app/modules/infrastructure/database/entities/publication-comment.data.ts +4 -4
  62. package/src/app/modules/infrastructure/database/entities/user.data.ts +53 -5
  63. package/src/app/modules/infrastructure/database/entities/venture-event.data.ts +3 -3
  64. package/src/app/modules/infrastructure/database/entities/venture-publication.data.ts +4 -10
  65. package/src/app/modules/infrastructure/database/entities/venture-sponsorship.data.ts +8 -11
  66. package/src/app/modules/infrastructure/database/entities/venture-subscription.data.ts +7 -11
  67. package/src/app/modules/infrastructure/database/entities/venture.data.ts +39 -20
  68. package/src/app/modules/domain/user/detail.ts +0 -23
  69. package/src/app/modules/domain/ventures/detail.ts +0 -14
  70. package/src/app/modules/infrastructure/database/entities/user-detail.data.ts +0 -72
  71. package/src/app/modules/infrastructure/database/entities/venture-detail.data.ts +0 -53
@@ -13,16 +13,16 @@ exports.VentureEventData = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const event_location_data_1 = require("./event-location.data");
15
15
  const event_donation_data_1 = require("./event-donation.data");
16
- const venture_detail_data_1 = require("./venture-detail.data");
17
16
  const event_category_data_1 = require("./event-category.data");
18
17
  const event_contact_data_1 = require("./event-contact.data");
18
+ const venture_data_1 = require("./venture.data");
19
19
  let VentureEventData = class VentureEventData {
20
20
  id;
21
21
  title;
22
22
  description;
23
23
  coverPhoto;
24
24
  slug;
25
- ventureDetail;
25
+ venture;
26
26
  location;
27
27
  contact;
28
28
  categories;
@@ -54,10 +54,10 @@ __decorate([
54
54
  __metadata("design:type", String)
55
55
  ], VentureEventData.prototype, "slug", void 0);
56
56
  __decorate([
57
- (0, typeorm_1.ManyToOne)(() => venture_detail_data_1.VentureDetailData, (ventureDetail) => ventureDetail.events),
57
+ (0, typeorm_1.ManyToOne)(() => venture_data_1.VentureData, (venture) => venture.events),
58
58
  (0, typeorm_1.JoinColumn)({ name: "ventureId" }),
59
- __metadata("design:type", venture_detail_data_1.VentureDetailData)
60
- ], VentureEventData.prototype, "ventureDetail", void 0);
59
+ __metadata("design:type", venture_data_1.VentureData)
60
+ ], VentureEventData.prototype, "venture", void 0);
61
61
  __decorate([
62
62
  (0, typeorm_1.JoinColumn)({ name: "locationId" }),
63
63
  (0, typeorm_1.OneToOne)(() => event_location_data_1.EventLocationData, (eventLocation) => eventLocation.event, {
@@ -1,8 +1,8 @@
1
1
  import { PublicationClapData } from "./publication-clap.data";
2
2
  import { PublicationCommentData } from "./publication-comment.data";
3
- import { VentureDetailData } from "./venture-detail.data";
4
3
  import { PublicationContentData } from "./publication-content.data";
5
4
  import { PublicationType } from "../../../domain/publications";
5
+ import { VentureData } from "./venture.data";
6
6
  export declare class VenturePublicationData {
7
7
  id: string;
8
8
  description: string;
@@ -10,8 +10,7 @@ export declare class VenturePublicationData {
10
10
  clapsCount: number;
11
11
  createdAt: Date;
12
12
  updatedAt: Date;
13
- detailId: string;
14
- detail: VentureDetailData;
13
+ venture: VentureData;
15
14
  claps: PublicationClapData[];
16
15
  comments: PublicationCommentData[];
17
16
  contents: PublicationContentData[];
@@ -13,9 +13,9 @@ exports.VenturePublicationData = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const publication_clap_data_1 = require("./publication-clap.data");
15
15
  const publication_comment_data_1 = require("./publication-comment.data");
16
- const venture_detail_data_1 = require("./venture-detail.data");
17
16
  const publication_content_data_1 = require("./publication-content.data");
18
17
  const publications_1 = require("../../../domain/publications");
18
+ const venture_data_1 = require("./venture.data");
19
19
  let VenturePublicationData = class VenturePublicationData {
20
20
  id;
21
21
  description;
@@ -23,8 +23,7 @@ let VenturePublicationData = class VenturePublicationData {
23
23
  clapsCount;
24
24
  createdAt;
25
25
  updatedAt;
26
- detailId;
27
- detail;
26
+ venture;
28
27
  claps;
29
28
  comments;
30
29
  contents;
@@ -55,14 +54,10 @@ __decorate([
55
54
  __metadata("design:type", Date)
56
55
  ], VenturePublicationData.prototype, "updatedAt", void 0);
57
56
  __decorate([
58
- (0, typeorm_1.Column)(),
59
- __metadata("design:type", String)
60
- ], VenturePublicationData.prototype, "detailId", void 0);
61
- __decorate([
62
- (0, typeorm_1.ManyToOne)(() => venture_detail_data_1.VentureDetailData, (ventureDetail) => ventureDetail.publications),
63
- (0, typeorm_1.JoinColumn)({ name: "detailId" }),
64
- __metadata("design:type", venture_detail_data_1.VentureDetailData)
65
- ], VenturePublicationData.prototype, "detail", void 0);
57
+ (0, typeorm_1.ManyToOne)(() => venture_data_1.VentureData, (venture) => venture.publications),
58
+ (0, typeorm_1.JoinColumn)({ name: "ventureId" }),
59
+ __metadata("design:type", venture_data_1.VentureData)
60
+ ], VenturePublicationData.prototype, "venture", void 0);
66
61
  __decorate([
67
62
  (0, typeorm_1.OneToMany)(() => publication_clap_data_1.PublicationClapData, (publicationClap) => publicationClap.publication),
68
63
  __metadata("design:type", Array)
@@ -1,10 +1,10 @@
1
- import { UserDetailData } from "./user-detail.data";
2
- import { VentureDetailData } from "./venture-detail.data";
1
+ import { UserData } from "./user.data";
2
+ import { VentureData } from "./venture.data";
3
3
  export declare class VentureSponsorshipData {
4
4
  id: string;
5
5
  monthlyAmount: number;
6
6
  createdAt: Date;
7
7
  updatedAt: Date;
8
- sponsor?: UserDetailData;
9
- detail?: VentureDetailData;
8
+ sponsor?: UserData;
9
+ venture?: VentureData;
10
10
  }
@@ -11,15 +11,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.VentureSponsorshipData = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
- const user_detail_data_1 = require("./user-detail.data");
15
- const venture_detail_data_1 = require("./venture-detail.data");
14
+ const user_data_1 = require("./user.data");
15
+ const venture_data_1 = require("./venture.data");
16
16
  let VentureSponsorshipData = class VentureSponsorshipData {
17
17
  id;
18
18
  monthlyAmount;
19
19
  createdAt;
20
20
  updatedAt;
21
21
  sponsor;
22
- detail;
22
+ venture;
23
23
  };
24
24
  exports.VentureSponsorshipData = VentureSponsorshipData;
25
25
  __decorate([
@@ -39,15 +39,15 @@ __decorate([
39
39
  __metadata("design:type", Date)
40
40
  ], VentureSponsorshipData.prototype, "updatedAt", void 0);
41
41
  __decorate([
42
- (0, typeorm_1.ManyToOne)(() => user_detail_data_1.UserDetailData, (userDetail) => userDetail.sponsorships),
43
- (0, typeorm_1.JoinColumn)({ name: "sponsorDetailId" }),
44
- __metadata("design:type", user_detail_data_1.UserDetailData)
42
+ (0, typeorm_1.ManyToOne)(() => user_data_1.UserData, (user) => user.sponsorships),
43
+ (0, typeorm_1.JoinColumn)({ name: "sponsorId" }),
44
+ __metadata("design:type", user_data_1.UserData)
45
45
  ], VentureSponsorshipData.prototype, "sponsor", void 0);
46
46
  __decorate([
47
- (0, typeorm_1.ManyToOne)(() => venture_detail_data_1.VentureDetailData, (ventureDetail) => ventureDetail.sponsorships),
48
- (0, typeorm_1.JoinColumn)({ name: "ventureDetailId" }),
49
- __metadata("design:type", venture_detail_data_1.VentureDetailData)
50
- ], VentureSponsorshipData.prototype, "detail", void 0);
47
+ (0, typeorm_1.ManyToOne)(() => venture_data_1.VentureData, (venture) => venture.sponsorships),
48
+ (0, typeorm_1.JoinColumn)({ name: "ventureId" }),
49
+ __metadata("design:type", venture_data_1.VentureData)
50
+ ], VentureSponsorshipData.prototype, "venture", void 0);
51
51
  exports.VentureSponsorshipData = VentureSponsorshipData = __decorate([
52
52
  (0, typeorm_1.Entity)({ name: "venture_sponsorship" })
53
53
  ], VentureSponsorshipData);
@@ -1,8 +1,8 @@
1
- import { UserDetailData } from "./user-detail.data";
2
- import { VentureDetailData } from "./venture-detail.data";
1
+ import { UserData } from "./user.data";
2
+ import { VentureData } from "./venture.data";
3
3
  export declare class VentureSubscriptionData {
4
4
  id: string;
5
5
  createdAt: Date;
6
- subscriber?: UserDetailData;
7
- detail?: VentureDetailData;
6
+ subscriber?: UserData;
7
+ venture?: VentureData;
8
8
  }
@@ -11,13 +11,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.VentureSubscriptionData = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
- const user_detail_data_1 = require("./user-detail.data");
15
- const venture_detail_data_1 = require("./venture-detail.data");
14
+ const user_data_1 = require("./user.data");
15
+ const venture_data_1 = require("./venture.data");
16
16
  let VentureSubscriptionData = class VentureSubscriptionData {
17
17
  id;
18
18
  createdAt;
19
19
  subscriber;
20
- detail;
20
+ venture;
21
21
  };
22
22
  exports.VentureSubscriptionData = VentureSubscriptionData;
23
23
  __decorate([
@@ -29,15 +29,15 @@ __decorate([
29
29
  __metadata("design:type", Date)
30
30
  ], VentureSubscriptionData.prototype, "createdAt", void 0);
31
31
  __decorate([
32
- (0, typeorm_1.ManyToOne)(() => user_detail_data_1.UserDetailData, (userDetail) => userDetail.subscriptions),
33
- (0, typeorm_1.JoinColumn)({ name: "subscriberDetailId" }),
34
- __metadata("design:type", user_detail_data_1.UserDetailData)
32
+ (0, typeorm_1.ManyToOne)(() => user_data_1.UserData, (user) => user.subscriptions),
33
+ (0, typeorm_1.JoinColumn)({ name: "subscriberId" }),
34
+ __metadata("design:type", user_data_1.UserData)
35
35
  ], VentureSubscriptionData.prototype, "subscriber", void 0);
36
36
  __decorate([
37
- (0, typeorm_1.ManyToOne)(() => venture_detail_data_1.VentureDetailData, (ventureDetail) => ventureDetail.subscriptions),
37
+ (0, typeorm_1.ManyToOne)(() => venture_data_1.VentureData, (venture) => venture.subscriptions),
38
38
  (0, typeorm_1.JoinColumn)({ name: "ventureId" }),
39
- __metadata("design:type", venture_detail_data_1.VentureDetailData)
40
- ], VentureSubscriptionData.prototype, "detail", void 0);
39
+ __metadata("design:type", venture_data_1.VentureData)
40
+ ], VentureSubscriptionData.prototype, "venture", void 0);
41
41
  exports.VentureSubscriptionData = VentureSubscriptionData = __decorate([
42
42
  (0, typeorm_1.Entity)({ name: "venture_subscription" })
43
43
  ], VentureSubscriptionData);
@@ -1,8 +1,11 @@
1
- import { VentureDetailData } from "./venture-detail.data";
2
- import { VentureLocationData } from "./venture-location.data";
3
- import { UserDetailData } from "./user-detail.data";
4
- import { VentureContactData } from "./venture-contact.data";
5
1
  import { VentureCategoryData } from "./venture-category.data";
2
+ import { VentureContactData } from "./venture-contact.data";
3
+ import { VentureEventData } from "./venture-event.data";
4
+ import { VentureLocationData } from "./venture-location.data";
5
+ import { VenturePublicationData } from "./venture-publication.data";
6
+ import { VentureSponsorshipData } from "./venture-sponsorship.data";
7
+ import { VentureSubscriptionData } from "./venture-subscription.data";
8
+ import { UserData } from "./user.data";
6
9
  export declare class VentureData {
7
10
  id: string;
8
11
  name: string;
@@ -13,9 +16,12 @@ export declare class VentureData {
13
16
  verified: boolean;
14
17
  createdAt: Date;
15
18
  updatedAt: Date;
16
- detail?: VentureDetailData;
17
19
  location?: VentureLocationData;
18
- ownerDetail?: UserDetailData;
20
+ owner?: UserData;
19
21
  contact?: VentureContactData;
20
22
  categories: VentureCategoryData[];
23
+ events: VentureEventData[];
24
+ publications: VenturePublicationData[];
25
+ sponsorships: VentureSponsorshipData[];
26
+ subscriptions: VentureSubscriptionData[];
21
27
  }
@@ -11,11 +11,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.VentureData = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
- const venture_detail_data_1 = require("./venture-detail.data");
15
- const venture_location_data_1 = require("./venture-location.data");
16
- const user_detail_data_1 = require("./user-detail.data");
17
- const venture_contact_data_1 = require("./venture-contact.data");
18
14
  const venture_category_data_1 = require("./venture-category.data");
15
+ const venture_contact_data_1 = require("./venture-contact.data");
16
+ const venture_event_data_1 = require("./venture-event.data");
17
+ const venture_location_data_1 = require("./venture-location.data");
18
+ const venture_publication_data_1 = require("./venture-publication.data");
19
+ const venture_sponsorship_data_1 = require("./venture-sponsorship.data");
20
+ const venture_subscription_data_1 = require("./venture-subscription.data");
21
+ const user_data_1 = require("./user.data");
19
22
  let VentureData = class VentureData {
20
23
  id;
21
24
  name;
@@ -26,11 +29,14 @@ let VentureData = class VentureData {
26
29
  verified;
27
30
  createdAt;
28
31
  updatedAt;
29
- detail;
30
32
  location;
31
- ownerDetail;
33
+ owner;
32
34
  contact;
33
35
  categories;
36
+ events;
37
+ publications;
38
+ sponsorships;
39
+ subscriptions;
34
40
  };
35
41
  exports.VentureData = VentureData;
36
42
  __decorate([
@@ -69,23 +75,16 @@ __decorate([
69
75
  (0, typeorm_1.UpdateDateColumn)(),
70
76
  __metadata("design:type", Date)
71
77
  ], VentureData.prototype, "updatedAt", void 0);
72
- __decorate([
73
- (0, typeorm_1.OneToOne)(() => venture_detail_data_1.VentureDetailData, (ventureDetail) => ventureDetail.venture, {
74
- cascade: true,
75
- }),
76
- (0, typeorm_1.JoinColumn)({ name: "detailId" }),
77
- __metadata("design:type", venture_detail_data_1.VentureDetailData)
78
- ], VentureData.prototype, "detail", void 0);
79
78
  __decorate([
80
79
  (0, typeorm_1.OneToOne)(() => venture_location_data_1.VentureLocationData, (ventureLocation) => ventureLocation.Venture, { cascade: true, eager: true }),
81
80
  (0, typeorm_1.JoinColumn)({ name: "locationId" }),
82
81
  __metadata("design:type", venture_location_data_1.VentureLocationData)
83
82
  ], VentureData.prototype, "location", void 0);
84
83
  __decorate([
85
- (0, typeorm_1.ManyToOne)(() => user_detail_data_1.UserDetailData, (userDetail) => userDetail.ventures),
86
- (0, typeorm_1.JoinColumn)({ name: "ownerDetailId" }),
87
- __metadata("design:type", user_detail_data_1.UserDetailData)
88
- ], VentureData.prototype, "ownerDetail", void 0);
84
+ (0, typeorm_1.ManyToOne)(() => user_data_1.UserData, (user) => user.ventures),
85
+ (0, typeorm_1.JoinColumn)({ name: "ownerId" }),
86
+ __metadata("design:type", user_data_1.UserData)
87
+ ], VentureData.prototype, "owner", void 0);
89
88
  __decorate([
90
89
  (0, typeorm_1.OneToOne)(() => venture_contact_data_1.VentureContactData, (ventureContact) => ventureContact.Venture, { cascade: true }),
91
90
  (0, typeorm_1.JoinColumn)({ name: "ventureContactId" }),
@@ -100,6 +99,22 @@ __decorate([
100
99
  }),
101
100
  __metadata("design:type", Array)
102
101
  ], VentureData.prototype, "categories", void 0);
102
+ __decorate([
103
+ (0, typeorm_1.OneToMany)(() => venture_event_data_1.VentureEventData, (ventureEvent) => ventureEvent.venture),
104
+ __metadata("design:type", Array)
105
+ ], VentureData.prototype, "events", void 0);
106
+ __decorate([
107
+ (0, typeorm_1.OneToMany)(() => venture_publication_data_1.VenturePublicationData, (venturePublication) => venturePublication.venture),
108
+ __metadata("design:type", Array)
109
+ ], VentureData.prototype, "publications", void 0);
110
+ __decorate([
111
+ (0, typeorm_1.OneToMany)(() => venture_sponsorship_data_1.VentureSponsorshipData, (ventureSponsorship) => ventureSponsorship.venture),
112
+ __metadata("design:type", Array)
113
+ ], VentureData.prototype, "sponsorships", void 0);
114
+ __decorate([
115
+ (0, typeorm_1.OneToMany)(() => venture_subscription_data_1.VentureSubscriptionData, (ventureSubscription) => ventureSubscription.venture),
116
+ __metadata("design:type", Array)
117
+ ], VentureData.prototype, "subscriptions", void 0);
103
118
  exports.VentureData = VentureData = __decorate([
104
119
  (0, typeorm_1.Entity)({ name: "venture" })
105
120
  ], VentureData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echadospalante-core",
3
- "version": "13.1.0",
3
+ "version": "14.0.0",
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",
@@ -1,3 +1 @@
1
- export { User } from "../user/user";
2
- export { Role } from "../user/role";
3
1
  export { AccessTokenPayload } from "./token-payload";
@@ -7,7 +7,7 @@
7
7
  // flag: string;
8
8
  // }
9
9
 
10
- import { UserDetail } from "../user";
10
+ import { User } from "../user";
11
11
 
12
12
  // export interface Currency {
13
13
  // id: number;
@@ -28,7 +28,7 @@ export interface Municipality {
28
28
  id: number;
29
29
  name: string;
30
30
  department: Department;
31
- userDetails: UserDetail[];
31
+ users: User[];
32
32
  createdAt: Date;
33
33
  updatedAt: Date;
34
34
  }
@@ -1,12 +1,11 @@
1
- import { User } from "../auth";
2
1
  import { VentureEvent } from "../events/event";
3
- import { UserDetail } from "../user";
2
+ import { User } from "../user";
4
3
 
5
4
  export interface EventDonation {
6
5
  id: string;
7
6
  amount: number;
8
7
  currency: string;
9
8
  createdAt: Date;
10
- donor: UserDetail;
9
+ donor: User;
11
10
  event: VentureEvent;
12
11
  }
@@ -1,10 +1,10 @@
1
- import { UserDetail } from "../user";
2
- import { VentureDetail } from "../ventures";
1
+ import { User } from "../user";
2
+ import { Venture } from "../ventures";
3
3
 
4
4
  export interface VentureSponsorship {
5
5
  id: string;
6
- sponsor?: UserDetail;
7
- venture?: VentureDetail;
6
+ sponsor?: User;
7
+ venture?: Venture;
8
8
  monthlyAmount: number;
9
9
  createdAt: Date;
10
10
  updatedAt: Date;
@@ -1,5 +1,5 @@
1
1
  import { EventDonation } from "../contributions";
2
- import { Venture, VentureDetail } from "../ventures";
2
+ import { Venture } from "../ventures";
3
3
  import { EventCategory } from "./event-category";
4
4
  import { EventContact } from "./event-contact";
5
5
  import { EventLocation } from "./event-location";
@@ -10,7 +10,7 @@ export interface VentureEvent {
10
10
  slug: string;
11
11
  description: string;
12
12
  coverPhoto: string;
13
- ventureDetail?: VentureDetail;
13
+ venture?: Venture;
14
14
  location: EventLocation;
15
15
  contact: EventContact;
16
16
  categories: EventCategory[];
@@ -1,9 +1,9 @@
1
- import { UserDetail } from "../user";
1
+ import { User } from "../user";
2
2
 
3
3
  export interface Notification {
4
4
  id: string;
5
5
  title: string;
6
- user: UserDetail;
6
+ user: User;
7
7
  type: NotificationType;
8
8
  status: NotificationStatus;
9
9
  description: string;
@@ -1,10 +1,9 @@
1
- import { User } from "../auth";
2
- import { UserDetail } from "../user";
1
+ import { User } from "../user";
3
2
  import { VenturePublication } from "./publication";
4
3
 
5
4
  export interface PublicationClap {
6
5
  id: string;
7
- user: UserDetail;
6
+ user: User;
8
7
  publication: VenturePublication;
9
8
  createdAt: Date;
10
9
  }
@@ -1,10 +1,9 @@
1
- import { User } from "../auth";
2
- import { UserDetail } from "../user";
1
+ import { User } from "../user";
3
2
  import { VenturePublication } from "./publication";
4
3
 
5
4
  export interface PublicationComment {
6
5
  id: string;
7
- author: UserDetail;
6
+ author: User;
8
7
  content: string;
9
8
  publication: VenturePublication;
10
9
  createdAt: Date;
@@ -1,8 +1,5 @@
1
- export { EventCategory } from "../events/event-category";
2
1
  export { PublicationClap } from "./clap";
3
2
  export { PublicationComment } from "./comment";
4
- export { VentureEvent } from "../events/event";
5
- export { EventLocation } from "../events/event-location";
6
3
  export {
7
4
  PublicationContent,
8
5
  PublicationType,
@@ -1,4 +1,3 @@
1
1
  export { UserContact } from "./contact";
2
2
  export { Role, AppRole } from "./role";
3
3
  export { User, UserCreate } from "./user";
4
- export { UserDetail } from "./detail";
@@ -1,6 +1,8 @@
1
- import { VentureCategory } from "../ventures";
1
+ import { Municipality } from "../common";
2
+ import { EventDonation, VentureSponsorship } from "../contributions";
3
+ import { PublicationClap, PublicationComment } from "../publications";
4
+ import { Venture, VentureCategory, VentureSubscription } from "../ventures";
2
5
  import { UserContact } from "./contact";
3
- import { UserDetail } from "./detail";
4
6
  import { Role } from "./role";
5
7
 
6
8
  export interface User {
@@ -11,11 +13,20 @@ export interface User {
11
13
  lastName: string;
12
14
  active: boolean;
13
15
  contact?: UserContact;
14
- detail?: UserDetail;
15
16
  verified: boolean;
16
17
  onboardingCompleted: boolean;
17
18
  roles: Role[];
18
19
  preferences: VentureCategory[];
20
+ gender: "M" | "F" | "O";
21
+ birthDate: Date;
22
+ municipality?: Municipality;
23
+ comments: PublicationComment[];
24
+ donations: EventDonation[];
25
+ notifications: Notification[];
26
+ publicationClaps: PublicationClap[];
27
+ sponsorships: VentureSponsorship[];
28
+ subscriptions: VentureSubscription[];
29
+ ventures: Venture[];
19
30
  createdAt: Date;
20
31
  updatedAt: Date;
21
32
  }
@@ -1,4 +1,4 @@
1
- import { User } from "../auth";
1
+ import { User } from "../user";
2
2
  import { Venture } from "./venture";
3
3
 
4
4
  export interface VentureCategory {
@@ -1,5 +1,4 @@
1
1
  export { VentureCategory } from "./category";
2
- export { VentureDetail } from "./detail";
3
2
  export { VentureSubscription } from "./subscription";
4
3
  export { Venture, VentureCreate, VentureUpdate } from "./venture";
5
4
  export { VentureCategoryCreate } from "./category";
@@ -1,11 +1,9 @@
1
- import { User } from "../auth";
2
- import { UserDetail } from "../user";
3
- import { VentureDetail } from "./detail";
1
+ import { User } from "../user";
4
2
  import { Venture } from "./venture";
5
3
 
6
4
  export interface VentureSubscription {
7
5
  id: string;
8
- subscriber?: UserDetail;
9
- venture?: VentureDetail;
6
+ subscriber?: User;
7
+ venture?: Venture;
10
8
  createdAt: Date;
11
9
  }
@@ -1,8 +1,11 @@
1
- import { UserDetail } from "../user";
1
+ import { VentureSponsorship } from "../contributions";
2
+ import { VentureEvent } from "../events";
3
+ import { VenturePublication } from "../publications";
4
+ import { User } from "../user";
2
5
  import { VentureCategory } from "./category";
3
6
  import { VentureContact } from "./contact";
4
- import { VentureDetail } from "./detail";
5
7
  import { VentureLocation } from "./location";
8
+ import { VentureSubscription } from "./subscription";
6
9
 
7
10
  export interface Venture {
8
11
  id: string;
@@ -12,11 +15,14 @@ export interface Venture {
12
15
  description: string;
13
16
  active: boolean;
14
17
  verified: boolean;
15
- detail?: VentureDetail;
16
- ownerDetail?: UserDetail;
18
+ owner?: User;
17
19
  categories: VentureCategory[];
18
20
  contact?: VentureContact;
19
21
  location?: VentureLocation;
22
+ events: VentureEvent[];
23
+ sponsorships: VentureSponsorship[];
24
+ subscriptions: VentureSubscription[];
25
+ publications: VenturePublication[];
20
26
  createdAt: Date;
21
27
  updatedAt: Date;
22
28
  }
@@ -7,8 +7,8 @@ import {
7
7
  ManyToOne,
8
8
  JoinColumn,
9
9
  } from "typeorm";
10
- import { UserDetailData } from "./user-detail.data";
11
10
  import { VentureEventData } from "./venture-event.data";
11
+ import { UserData } from "./user.data";
12
12
 
13
13
  @Entity({ name: "event_donation" })
14
14
  export class EventDonationData {
@@ -24,9 +24,9 @@ export class EventDonationData {
24
24
  @CreateDateColumn()
25
25
  createdAt: Date;
26
26
 
27
- @ManyToOne(() => UserDetailData, (userDetail) => userDetail.donations)
28
- @JoinColumn({ name: "donorDetailId" })
29
- donor: UserDetailData;
27
+ @ManyToOne(() => UserData, (user) => user.donations)
28
+ @JoinColumn({ name: "donorId" })
29
+ donor: UserData;
30
30
 
31
31
  @ManyToOne(() => VentureEventData, (ventureEvent) => ventureEvent.donations)
32
32
  @JoinColumn({ name: "eventId" })
@@ -10,11 +10,9 @@ export { PublicationCommentData } from "./publication-comment.data";
10
10
  export { PublicationContentData } from "./publication-content.data";
11
11
  export { RoleData } from "./role.data";
12
12
  export { UserContactData } from "./user-contact.data";
13
- export { UserDetailData } from "./user-detail.data";
14
13
  export { UserData } from "./user.data";
15
14
  export { VentureCategoryData } from "./venture-category.data";
16
15
  export { VentureContactData } from "./venture-contact.data";
17
- export { VentureDetailData } from "./venture-detail.data";
18
16
  export { VentureEventData } from "./venture-event.data";
19
17
  export { VentureLocationData } from "./venture-location.data";
20
18
  export { VenturePublicationData } from "./venture-publication.data";
@@ -10,7 +10,7 @@ import {
10
10
  } from "typeorm";
11
11
 
12
12
  import { DepartmentData } from "./department.data";
13
- import { UserDetailData } from "./user-detail.data";
13
+ import { UserData } from "./user.data";
14
14
 
15
15
  @Entity({ name: "municipality" })
16
16
  export class MunicipalityData {
@@ -30,6 +30,6 @@ export class MunicipalityData {
30
30
  @JoinColumn({ name: "departmentId" })
31
31
  department: DepartmentData;
32
32
 
33
- @OneToMany(() => UserDetailData, (ud) => ud.municipality)
34
- userDetails: UserDetailData[];
33
+ @OneToMany(() => UserData, (user) => user.municipality)
34
+ users: UserData[];
35
35
  }
@@ -10,7 +10,7 @@ import {
10
10
 
11
11
  import { NotificationType } from "../../../domain/notifications";
12
12
  import { NotificationStatus } from "../../../domain/notifications/notification";
13
- import { UserDetailData } from "./user-detail.data";
13
+ import { UserData } from "./user.data";
14
14
 
15
15
  @Entity({ name: "notification" })
16
16
  export class NotificationData {
@@ -29,16 +29,13 @@ export class NotificationData {
29
29
  @Column()
30
30
  description: string;
31
31
 
32
+ @ManyToOne(() => UserData, (user) => user.notifications)
33
+ @JoinColumn({ name: "userId" })
34
+ user: UserData;
35
+
32
36
  @CreateDateColumn()
33
37
  createdAt: Date;
34
38
 
35
39
  @UpdateDateColumn()
36
40
  updatedAt: Date;
37
-
38
- @Column()
39
- userDetailId: string;
40
-
41
- @ManyToOne(() => UserDetailData, (userDetail) => userDetail.notifications)
42
- @JoinColumn({ name: "userDetailId" })
43
- user: UserDetailData;
44
41
  }