echadospalante-core 8.8.1 → 9.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 (186) hide show
  1. package/dist/app/modules/{donations → domain/donations}/sponsor.d.ts +2 -2
  2. package/dist/app/modules/infrastructure/database/entities/department.data.d.ts +8 -0
  3. package/dist/app/modules/infrastructure/database/entities/department.data.js +45 -0
  4. package/dist/app/modules/infrastructure/database/entities/event-category.data.d.ts +10 -0
  5. package/dist/app/modules/infrastructure/database/entities/event-category.data.js +60 -0
  6. package/dist/app/modules/infrastructure/database/entities/event-donation.data.d.ts +12 -0
  7. package/dist/app/modules/infrastructure/database/entities/event-donation.data.js +63 -0
  8. package/dist/app/modules/infrastructure/database/entities/event-location.data.d.ts +8 -0
  9. package/dist/app/modules/infrastructure/database/entities/event-location.data.js +45 -0
  10. package/dist/app/modules/infrastructure/database/entities/index.d.ts +22 -0
  11. package/dist/app/modules/infrastructure/database/entities/index.js +47 -0
  12. package/dist/app/modules/infrastructure/database/entities/municipality.data.d.ts +11 -0
  13. package/dist/app/modules/infrastructure/database/entities/municipality.data.js +57 -0
  14. package/dist/app/modules/infrastructure/database/entities/notification.data.d.ts +14 -0
  15. package/dist/app/modules/infrastructure/database/entities/notification.data.js +68 -0
  16. package/dist/app/modules/infrastructure/database/entities/publication-clap.data.d.ts +10 -0
  17. package/dist/app/modules/infrastructure/database/entities/publication-clap.data.js +53 -0
  18. package/dist/app/modules/infrastructure/database/entities/publication-comment.data.d.ts +12 -0
  19. package/dist/app/modules/infrastructure/database/entities/publication-comment.data.js +63 -0
  20. package/dist/app/modules/infrastructure/database/entities/publication-content.data.d.ts +11 -0
  21. package/dist/app/modules/infrastructure/database/entities/publication-content.data.js +57 -0
  22. package/dist/app/modules/infrastructure/database/entities/role.data.d.ts +10 -0
  23. package/dist/app/modules/infrastructure/database/entities/role.data.js +51 -0
  24. package/dist/app/modules/infrastructure/database/entities/user-contact.data.d.ts +13 -0
  25. package/dist/app/modules/infrastructure/database/entities/user-contact.data.js +70 -0
  26. package/dist/app/modules/infrastructure/database/entities/user-detail.data.d.ts +24 -0
  27. package/dist/app/modules/infrastructure/database/entities/user-detail.data.js +94 -0
  28. package/dist/app/modules/infrastructure/database/entities/user.data.d.ts +22 -0
  29. package/dist/app/modules/infrastructure/database/entities/user.data.js +107 -0
  30. package/dist/app/modules/infrastructure/database/entities/venture-category.data.d.ts +12 -0
  31. package/dist/app/modules/infrastructure/database/entities/venture-category.data.js +61 -0
  32. package/dist/app/modules/infrastructure/database/entities/venture-contact.data.d.ts +9 -0
  33. package/dist/app/modules/infrastructure/database/entities/venture-contact.data.js +50 -0
  34. package/dist/app/modules/infrastructure/database/entities/venture-detail.data.d.ts +15 -0
  35. package/dist/app/modules/infrastructure/database/entities/venture-detail.data.js +64 -0
  36. package/dist/app/modules/infrastructure/database/entities/venture-event.data.d.ts +20 -0
  37. package/dist/app/modules/infrastructure/database/entities/venture-event.data.js +95 -0
  38. package/dist/app/modules/infrastructure/database/entities/venture-location.data.d.ts +11 -0
  39. package/dist/app/modules/infrastructure/database/entities/venture-location.data.js +60 -0
  40. package/dist/app/modules/infrastructure/database/entities/venture-publication.data.d.ts +18 -0
  41. package/dist/app/modules/infrastructure/database/entities/venture-publication.data.js +80 -0
  42. package/dist/app/modules/infrastructure/database/entities/venture-sponsorship.data.d.ts +12 -0
  43. package/dist/app/modules/infrastructure/database/entities/venture-sponsorship.data.js +63 -0
  44. package/dist/app/modules/infrastructure/database/entities/venture-subscription.data.d.ts +10 -0
  45. package/dist/app/modules/infrastructure/database/entities/venture-subscription.data.js +53 -0
  46. package/dist/app/modules/infrastructure/database/entities/venture-suscription.data.d.ts +10 -0
  47. package/dist/app/modules/infrastructure/database/entities/venture-suscription.data.js +53 -0
  48. package/dist/app/modules/infrastructure/database/entities/venture.data.d.ts +25 -0
  49. package/dist/app/modules/infrastructure/database/entities/venture.data.js +123 -0
  50. package/dist/app/modules/utilities/object-utilities.js +2 -0
  51. package/dist/index.d.ts +11 -9
  52. package/dist/index.js +11 -10
  53. package/package.json +7 -1
  54. package/src/app/modules/{donations → domain/donations}/sponsor.ts +2 -2
  55. package/src/app/modules/infrastructure/database/entities/department.data.ts +28 -0
  56. package/src/app/modules/infrastructure/database/entities/event-category.data.ts +43 -0
  57. package/src/app/modules/infrastructure/database/entities/event-donation.data.ts +40 -0
  58. package/src/app/modules/infrastructure/database/entities/event-location.data.ts +20 -0
  59. package/src/app/modules/infrastructure/database/entities/index.ts +22 -0
  60. package/src/app/modules/infrastructure/database/entities/municipality.data.ts +38 -0
  61. package/src/app/modules/infrastructure/database/entities/notification.data.ts +44 -0
  62. package/src/app/modules/infrastructure/database/entities/publication-clap.data.ts +37 -0
  63. package/src/app/modules/infrastructure/database/entities/publication-comment.data.ts +44 -0
  64. package/src/app/modules/infrastructure/database/entities/publication-content.data.ts +40 -0
  65. package/src/app/modules/infrastructure/database/entities/role.data.ts +32 -0
  66. package/src/app/modules/infrastructure/database/entities/user-contact.data.ts +43 -0
  67. package/src/app/modules/infrastructure/database/entities/user-detail.data.ts +75 -0
  68. package/src/app/modules/infrastructure/database/entities/user.data.ts +71 -0
  69. package/src/app/modules/infrastructure/database/entities/venture-category.data.ts +38 -0
  70. package/src/app/modules/infrastructure/database/entities/venture-contact.data.ts +30 -0
  71. package/src/app/modules/infrastructure/database/entities/venture-detail.data.ts +53 -0
  72. package/src/app/modules/infrastructure/database/entities/venture-event.data.ts +66 -0
  73. package/src/app/modules/infrastructure/database/entities/venture-location.data.ts +36 -0
  74. package/src/app/modules/infrastructure/database/entities/venture-publication.data.ts +65 -0
  75. package/src/app/modules/infrastructure/database/entities/venture-sponsorship.data.ts +43 -0
  76. package/src/app/modules/infrastructure/database/entities/venture-subscription.data.ts +37 -0
  77. package/src/app/modules/infrastructure/database/entities/venture.data.ts +92 -0
  78. package/src/index.ts +12 -10
  79. package/tsconfig.json +23 -106
  80. package/tsconfig.tsbuildinfo +1 -0
  81. package/dist/app/modules/shared/geo.js +0 -10
  82. /package/dist/app/modules/{auth → domain/auth}/index.d.ts +0 -0
  83. /package/dist/app/modules/{auth → domain/auth}/index.js +0 -0
  84. /package/dist/app/modules/{auth → domain/auth}/token-payload.d.ts +0 -0
  85. /package/dist/app/modules/{auth → domain/auth}/token-payload.js +0 -0
  86. /package/dist/app/modules/{donations → domain/donations}/donation.d.ts +0 -0
  87. /package/dist/app/modules/{donations → domain/donations}/donation.js +0 -0
  88. /package/dist/app/modules/{donations → domain/donations}/index.d.ts +0 -0
  89. /package/dist/app/modules/{donations → domain/donations}/index.js +0 -0
  90. /package/dist/app/modules/{donations → domain/donations}/sponsor.js +0 -0
  91. /package/dist/app/modules/{feeds → domain/feeds}/category.d.ts +0 -0
  92. /package/dist/app/modules/{feeds → domain/feeds}/category.js +0 -0
  93. /package/dist/app/modules/{feeds → domain/feeds}/clap.d.ts +0 -0
  94. /package/dist/app/modules/{feeds → domain/feeds}/clap.js +0 -0
  95. /package/dist/app/modules/{feeds → domain/feeds}/comment.d.ts +0 -0
  96. /package/dist/app/modules/{feeds → domain/feeds}/comment.js +0 -0
  97. /package/dist/app/modules/{feeds → domain/feeds}/event.d.ts +0 -0
  98. /package/dist/app/modules/{feeds → domain/feeds}/event.js +0 -0
  99. /package/dist/app/modules/{feeds → domain/feeds}/index.d.ts +0 -0
  100. /package/dist/app/modules/{feeds → domain/feeds}/index.js +0 -0
  101. /package/dist/app/modules/{feeds → domain/feeds}/location.d.ts +0 -0
  102. /package/dist/app/modules/{feeds → domain/feeds}/location.js +0 -0
  103. /package/dist/app/modules/{feeds → domain/feeds}/publication.d.ts +0 -0
  104. /package/dist/app/modules/{feeds → domain/feeds}/publication.js +0 -0
  105. /package/dist/app/modules/{news → domain/news}/category.d.ts +0 -0
  106. /package/dist/app/modules/{news → domain/news}/category.js +0 -0
  107. /package/dist/app/modules/{news → domain/news}/clap.d.ts +0 -0
  108. /package/dist/app/modules/{news → domain/news}/clap.js +0 -0
  109. /package/dist/app/modules/{news → domain/news}/index.d.ts +0 -0
  110. /package/dist/app/modules/{news → domain/news}/index.js +0 -0
  111. /package/dist/app/modules/{news → domain/news}/news.d.ts +0 -0
  112. /package/dist/app/modules/{news → domain/news}/news.js +0 -0
  113. /package/dist/app/modules/{notifications → domain/notifications}/index.d.ts +0 -0
  114. /package/dist/app/modules/{notifications → domain/notifications}/index.js +0 -0
  115. /package/dist/app/modules/{notifications → domain/notifications}/notification.d.ts +0 -0
  116. /package/dist/app/modules/{notifications → domain/notifications}/notification.js +0 -0
  117. /package/dist/app/modules/{shared → domain/shared}/content-type.d.ts +0 -0
  118. /package/dist/app/modules/{shared → domain/shared}/content-type.js +0 -0
  119. /package/dist/app/modules/{shared → domain/shared}/geo.d.ts +0 -0
  120. /package/dist/app/modules/{shared/pagination.js → domain/shared/geo.js} +0 -0
  121. /package/dist/app/modules/{shared → domain/shared}/index.d.ts +0 -0
  122. /package/dist/app/modules/{shared → domain/shared}/index.js +0 -0
  123. /package/dist/app/modules/{shared → domain/shared}/pagination.d.ts +0 -0
  124. /package/dist/app/modules/{user/contact.js → domain/shared/pagination.js} +0 -0
  125. /package/dist/app/modules/{user → domain/user}/contact.d.ts +0 -0
  126. /package/dist/app/modules/{ventures → domain/user}/contact.js +0 -0
  127. /package/dist/app/modules/{user → domain/user}/detail.d.ts +0 -0
  128. /package/dist/app/modules/{user → domain/user}/detail.js +0 -0
  129. /package/dist/app/modules/{user → domain/user}/index.d.ts +0 -0
  130. /package/dist/app/modules/{user → domain/user}/index.js +0 -0
  131. /package/dist/app/modules/{user → domain/user}/role.d.ts +0 -0
  132. /package/dist/app/modules/{user → domain/user}/role.js +0 -0
  133. /package/dist/app/modules/{user → domain/user}/user.d.ts +0 -0
  134. /package/dist/app/modules/{user → domain/user}/user.js +0 -0
  135. /package/dist/app/modules/{ventures → domain/ventures}/category.d.ts +0 -0
  136. /package/dist/app/modules/{ventures → domain/ventures}/category.js +0 -0
  137. /package/dist/app/modules/{ventures → domain/ventures}/contact.d.ts +0 -0
  138. /package/dist/app/modules/{utility/index.js → domain/ventures/contact.js} +0 -0
  139. /package/dist/app/modules/{ventures → domain/ventures}/detail.d.ts +0 -0
  140. /package/dist/app/modules/{ventures → domain/ventures}/detail.js +0 -0
  141. /package/dist/app/modules/{ventures → domain/ventures}/index.d.ts +0 -0
  142. /package/dist/app/modules/{ventures → domain/ventures}/index.js +0 -0
  143. /package/dist/app/modules/{ventures → domain/ventures}/location.d.ts +0 -0
  144. /package/dist/app/modules/{ventures → domain/ventures}/location.js +0 -0
  145. /package/dist/app/modules/{ventures → domain/ventures}/subscription.d.ts +0 -0
  146. /package/dist/app/modules/{ventures → domain/ventures}/subscription.js +0 -0
  147. /package/dist/app/modules/{ventures → domain/ventures}/venture.d.ts +0 -0
  148. /package/dist/app/modules/{ventures → domain/ventures}/venture.js +0 -0
  149. /package/dist/app/modules/{utility → utilities}/index.d.ts +0 -0
  150. /package/dist/app/modules/{utility/object-utilities.js → utilities/index.js} +0 -0
  151. /package/dist/app/modules/{utility → utilities}/object-utilities.d.ts +0 -0
  152. /package/src/app/modules/{auth → domain/auth}/index.ts +0 -0
  153. /package/src/app/modules/{auth → domain/auth}/token-payload.ts +0 -0
  154. /package/src/app/modules/{donations → domain/donations}/donation.ts +0 -0
  155. /package/src/app/modules/{donations → domain/donations}/index.ts +0 -0
  156. /package/src/app/modules/{feeds → domain/feeds}/category.ts +0 -0
  157. /package/src/app/modules/{feeds → domain/feeds}/clap.ts +0 -0
  158. /package/src/app/modules/{feeds → domain/feeds}/comment.ts +0 -0
  159. /package/src/app/modules/{feeds → domain/feeds}/event.ts +0 -0
  160. /package/src/app/modules/{feeds → domain/feeds}/index.ts +0 -0
  161. /package/src/app/modules/{feeds → domain/feeds}/location.ts +0 -0
  162. /package/src/app/modules/{feeds → domain/feeds}/publication.ts +0 -0
  163. /package/src/app/modules/{news → domain/news}/category.ts +0 -0
  164. /package/src/app/modules/{news → domain/news}/clap.ts +0 -0
  165. /package/src/app/modules/{news → domain/news}/index.ts +0 -0
  166. /package/src/app/modules/{news → domain/news}/news.ts +0 -0
  167. /package/src/app/modules/{notifications → domain/notifications}/index.ts +0 -0
  168. /package/src/app/modules/{notifications → domain/notifications}/notification.ts +0 -0
  169. /package/src/app/modules/{shared → domain/shared}/content-type.ts +0 -0
  170. /package/src/app/modules/{shared → domain/shared}/geo.ts +0 -0
  171. /package/src/app/modules/{shared → domain/shared}/index.ts +0 -0
  172. /package/src/app/modules/{shared → domain/shared}/pagination.ts +0 -0
  173. /package/src/app/modules/{user → domain/user}/contact.ts +0 -0
  174. /package/src/app/modules/{user → domain/user}/detail.ts +0 -0
  175. /package/src/app/modules/{user → domain/user}/index.ts +0 -0
  176. /package/src/app/modules/{user → domain/user}/role.ts +0 -0
  177. /package/src/app/modules/{user → domain/user}/user.ts +0 -0
  178. /package/src/app/modules/{ventures → domain/ventures}/category.ts +0 -0
  179. /package/src/app/modules/{ventures → domain/ventures}/contact.ts +0 -0
  180. /package/src/app/modules/{ventures → domain/ventures}/detail.ts +0 -0
  181. /package/src/app/modules/{ventures → domain/ventures}/index.ts +0 -0
  182. /package/src/app/modules/{ventures → domain/ventures}/location.ts +0 -0
  183. /package/src/app/modules/{ventures → domain/ventures}/subscription.ts +0 -0
  184. /package/src/app/modules/{ventures → domain/ventures}/venture.ts +0 -0
  185. /package/src/app/modules/{utility → utilities}/index.ts +0 -0
  186. /package/src/app/modules/{utility → utilities}/object-utilities.ts +0 -0
@@ -0,0 +1,75 @@
1
+ // user-detail.entity.ts
2
+
3
+ import {
4
+ Column,
5
+ Entity,
6
+ JoinColumn,
7
+ ManyToOne,
8
+ OneToMany,
9
+ OneToOne,
10
+ PrimaryGeneratedColumn,
11
+ } from "typeorm";
12
+ import { EventDonationData } from "./event-donation.data";
13
+ import { MunicipalityData } from "./municipality.data";
14
+ import { NotificationData } from "./notification.data";
15
+ import { PublicationClapData } from "./publication-clap.data";
16
+ import { PublicationCommentData } from "./publication-comment.data";
17
+ import { UserData } from "./user.data";
18
+ import { VentureSponsorshipData } from "./venture-sponsorship.data";
19
+ import { VentureSubscriptionData } from "./venture-subscription.data";
20
+ import { VentureData } from "./venture.data";
21
+
22
+ @Entity()
23
+ export class UserDetailData {
24
+ @PrimaryGeneratedColumn("uuid")
25
+ id: string;
26
+
27
+ @Column()
28
+ gender: string;
29
+
30
+ @Column()
31
+ birthDate: Date;
32
+
33
+ @Column()
34
+ municipalityId: number;
35
+
36
+ @OneToOne(() => UserData, (user) => user.detail)
37
+ user: UserData;
38
+
39
+ @ManyToOne(() => MunicipalityData, (municipality) => municipality.userDetails)
40
+ @JoinColumn({ name: "municipalityId" })
41
+ municipality: MunicipalityData;
42
+
43
+ @OneToMany(() => EventDonationData, (eventDonation) => eventDonation.donor)
44
+ donations: EventDonationData[];
45
+
46
+ @OneToMany(() => NotificationData, (notification) => notification.user)
47
+ notifications: NotificationData[];
48
+
49
+ @OneToMany(
50
+ () => PublicationClapData,
51
+ (publicationClap) => publicationClap.user
52
+ )
53
+ claps: PublicationClapData[];
54
+
55
+ @OneToMany(
56
+ () => PublicationCommentData,
57
+ (publicationComment) => publicationComment.User
58
+ )
59
+ comments: PublicationCommentData[];
60
+
61
+ @OneToMany(() => VentureData, (venture) => venture.ownerDetail)
62
+ ventures: VentureData[];
63
+
64
+ @OneToMany(
65
+ () => VentureSponsorshipData,
66
+ (ventureSponsorship) => ventureSponsorship.user
67
+ )
68
+ sponsorships: VentureSponsorshipData[];
69
+
70
+ @OneToMany(
71
+ () => VentureSubscriptionData,
72
+ (ventureSubscription) => ventureSubscription.user
73
+ )
74
+ subscriptions: VentureSubscriptionData[];
75
+ }
@@ -0,0 +1,71 @@
1
+ import {
2
+ Column,
3
+ CreateDateColumn,
4
+ Entity,
5
+ JoinColumn,
6
+ JoinTable,
7
+ ManyToMany,
8
+ OneToOne,
9
+ PrimaryGeneratedColumn,
10
+ UpdateDateColumn,
11
+ } from "typeorm";
12
+
13
+ import { RoleData } from "./role.data";
14
+ import { UserContactData } from "./user-contact.data";
15
+ import { UserDetailData } from "./user-detail.data";
16
+ import { VentureCategoryData } from "./venture-category.data";
17
+
18
+ @Entity()
19
+ export class UserData {
20
+ @PrimaryGeneratedColumn("uuid")
21
+ id: string;
22
+
23
+ @Column()
24
+ picture: string;
25
+
26
+ @Column({ unique: true })
27
+ email: string;
28
+
29
+ @Column()
30
+ firstName: string;
31
+
32
+ @Column()
33
+ lastName: string;
34
+
35
+ @Column({ default: true })
36
+ active: boolean;
37
+
38
+ @CreateDateColumn()
39
+ createdAt: Date;
40
+
41
+ @UpdateDateColumn()
42
+ updatedAt: Date;
43
+
44
+ @Column({ default: false })
45
+ onboardingCompleted: boolean;
46
+
47
+ @Column({ default: false })
48
+ verified: boolean;
49
+
50
+ @Column({ nullable: true, unique: true })
51
+ contactId?: string;
52
+
53
+ @Column({ nullable: true, unique: true })
54
+ detailId?: string;
55
+
56
+ @OneToOne(() => UserContactData, (contact) => contact.user)
57
+ @JoinColumn({ name: "contactId" })
58
+ contact?: UserContactData;
59
+
60
+ @OneToOne(() => UserDetailData, (detail) => detail.user)
61
+ @JoinColumn({ name: "detailId" })
62
+ detail?: UserDetailData;
63
+
64
+ @ManyToMany(() => VentureCategoryData, (vc) => vc.users)
65
+ @JoinTable({ name: "XUserPreferences" })
66
+ preferences: VentureCategoryData[];
67
+
68
+ @ManyToMany(() => RoleData, (role) => role.users)
69
+ @JoinTable({ name: "XUserRoles" })
70
+ roles: RoleData[];
71
+ }
@@ -0,0 +1,38 @@
1
+ // venture-category.entity.ts
2
+ import {
3
+ Entity,
4
+ PrimaryGeneratedColumn,
5
+ Column,
6
+ CreateDateColumn,
7
+ UpdateDateColumn,
8
+ ManyToMany,
9
+ } from "typeorm";
10
+ import { UserData } from "./user.data";
11
+ import { VentureData } from "./venture.data";
12
+
13
+ @Entity()
14
+ export class VentureCategoryData {
15
+ @PrimaryGeneratedColumn("uuid")
16
+ id: string;
17
+
18
+ @Column()
19
+ name: string;
20
+
21
+ @Column({ unique: true })
22
+ slug: string;
23
+
24
+ @Column()
25
+ description: string;
26
+
27
+ @CreateDateColumn()
28
+ createdAt: Date;
29
+
30
+ @UpdateDateColumn()
31
+ updatedAt: Date;
32
+
33
+ @ManyToMany(() => UserData, (user) => user.preferences)
34
+ users: UserData[];
35
+
36
+ @ManyToMany(() => VentureData, (venture) => venture.categories)
37
+ ventures: VentureData[];
38
+ }
@@ -0,0 +1,30 @@
1
+ import {
2
+ Entity,
3
+ PrimaryGeneratedColumn,
4
+ Column,
5
+ CreateDateColumn,
6
+ UpdateDateColumn,
7
+ OneToOne,
8
+ } from "typeorm";
9
+ import { VentureData } from "./venture.data";
10
+
11
+ @Entity()
12
+ export class VentureContactData {
13
+ @PrimaryGeneratedColumn("uuid")
14
+ id: string;
15
+
16
+ @Column()
17
+ email: string;
18
+
19
+ @Column()
20
+ phoneNumber: string;
21
+
22
+ @CreateDateColumn()
23
+ createdAt: Date;
24
+
25
+ @UpdateDateColumn()
26
+ updatedAt: Date;
27
+
28
+ @OneToOne(() => VentureData, (venture) => venture.contact)
29
+ Venture: VentureData;
30
+ }
@@ -0,0 +1,53 @@
1
+ import {
2
+ CreateDateColumn,
3
+ Entity,
4
+ OneToMany,
5
+ OneToOne,
6
+ PrimaryGeneratedColumn,
7
+ UpdateDateColumn,
8
+ } from "typeorm";
9
+
10
+ import { VentureEventData } from "./venture-event.data";
11
+ import { VenturePublicationData } from "./venture-publication.data";
12
+ import { VentureSponsorshipData } from "./venture-sponsorship.data";
13
+ import { VentureSubscriptionData } from "./venture-subscription.data";
14
+ import { VentureData } from "./venture.data";
15
+
16
+ @Entity()
17
+ export class VentureDetailData {
18
+ @PrimaryGeneratedColumn("uuid")
19
+ id: string;
20
+
21
+ @CreateDateColumn()
22
+ createdAt: Date;
23
+
24
+ @UpdateDateColumn()
25
+ updatedAt: Date;
26
+
27
+ @OneToOne(() => VentureData, (venture) => venture.detail)
28
+ venture: VentureData;
29
+
30
+ @OneToMany(
31
+ () => VentureEventData,
32
+ (ventureEvent) => ventureEvent.ventureDetail
33
+ )
34
+ events: VentureEventData[];
35
+
36
+ @OneToMany(
37
+ () => VenturePublicationData,
38
+ (venturePublication) => venturePublication.detail
39
+ )
40
+ publications: VenturePublicationData[];
41
+
42
+ @OneToMany(
43
+ () => VentureSponsorshipData,
44
+ (ventureSponsorship) => ventureSponsorship.detail
45
+ )
46
+ sponsorships: VentureSponsorshipData[];
47
+
48
+ @OneToMany(
49
+ () => VentureSubscriptionData,
50
+ (ventureSubscription) => ventureSubscription.detail
51
+ )
52
+ subscriptions: VentureSubscriptionData[];
53
+ }
@@ -0,0 +1,66 @@
1
+ import {
2
+ Entity,
3
+ PrimaryGeneratedColumn,
4
+ Column,
5
+ CreateDateColumn,
6
+ UpdateDateColumn,
7
+ ManyToOne,
8
+ OneToMany,
9
+ OneToOne,
10
+ ManyToMany,
11
+ JoinColumn,
12
+ } from "typeorm";
13
+ import { EventLocationData } from "./event-location.data";
14
+ import { EventDonationData } from "./event-donation.data";
15
+ import { VentureDetailData } from "./venture-detail.data";
16
+ import { EventCategoryData } from "./event-category.data";
17
+
18
+ @Entity()
19
+ export class VentureEventData {
20
+ @PrimaryGeneratedColumn("uuid")
21
+ id: string;
22
+
23
+ @Column()
24
+ title: string;
25
+
26
+ @Column()
27
+ description: string;
28
+
29
+ @Column()
30
+ coverPhoto: string;
31
+
32
+ @Column()
33
+ ventureId: string;
34
+
35
+ @Column()
36
+ startDate: Date;
37
+
38
+ @Column()
39
+ endDate: Date;
40
+
41
+ @CreateDateColumn()
42
+ createdAt: Date;
43
+
44
+ @UpdateDateColumn()
45
+ updatedAt: Date;
46
+
47
+ @Column({ unique: true })
48
+ locationId: string;
49
+
50
+ @ManyToOne(() => VentureDetailData, (ventureDetail) => ventureDetail.events)
51
+ @JoinColumn({ name: "ventureId" })
52
+ ventureDetail: VentureDetailData;
53
+
54
+ @OneToOne(() => EventLocationData, (eventLocation) => eventLocation.event)
55
+ @JoinColumn({ name: "locationId" })
56
+ location: EventLocationData;
57
+
58
+ @OneToMany(() => EventDonationData, (eventDonation) => eventDonation.event)
59
+ donations: EventDonationData[];
60
+
61
+ @ManyToMany(
62
+ () => EventCategoryData,
63
+ (eventCategory) => eventCategory.ventureEvent
64
+ )
65
+ EventCategory: EventCategoryData[];
66
+ }
@@ -0,0 +1,36 @@
1
+ import {
2
+ Entity,
3
+ PrimaryGeneratedColumn,
4
+ Column,
5
+ CreateDateColumn,
6
+ UpdateDateColumn,
7
+ OneToOne,
8
+ } from "typeorm";
9
+ import { VentureData } from "./venture.data";
10
+
11
+ @Entity()
12
+ export class VentureLocationData {
13
+ @PrimaryGeneratedColumn("uuid")
14
+ id: string;
15
+
16
+ @Column({ nullable: true })
17
+ ventureId: string;
18
+
19
+ @Column("float", { nullable: true })
20
+ lat: number;
21
+
22
+ @Column("float", { nullable: true })
23
+ lng: number;
24
+
25
+ @Column({ nullable: true })
26
+ description: string;
27
+
28
+ @CreateDateColumn()
29
+ createdAt: Date;
30
+
31
+ @UpdateDateColumn()
32
+ updatedAt: Date;
33
+
34
+ @OneToOne(() => VentureData, (venture) => venture.location)
35
+ Venture: VentureData;
36
+ }
@@ -0,0 +1,65 @@
1
+ // venture-publication.entity.ts
2
+ import {
3
+ Column,
4
+ CreateDateColumn,
5
+ Entity,
6
+ JoinColumn,
7
+ ManyToOne,
8
+ OneToMany,
9
+ PrimaryGeneratedColumn,
10
+ UpdateDateColumn,
11
+ } from "typeorm";
12
+ import { PublicationClapData } from "./publication-clap.data";
13
+ import { PublicationCommentData } from "./publication-comment.data";
14
+ import { VentureDetailData } from "./venture-detail.data";
15
+ import { PublicationContentData } from "./publication-content.data";
16
+ import { PublicationType } from "../../../domain/feeds";
17
+
18
+ @Entity()
19
+ export class VenturePublicationData {
20
+ @PrimaryGeneratedColumn("uuid")
21
+ id: string;
22
+
23
+ @Column()
24
+ description: string;
25
+
26
+ @Column({ type: "enum", enum: PublicationType })
27
+ type: PublicationType;
28
+
29
+ @Column()
30
+ clapsCount: number;
31
+
32
+ @CreateDateColumn()
33
+ createdAt: Date;
34
+
35
+ @UpdateDateColumn()
36
+ updatedAt: Date;
37
+
38
+ @Column()
39
+ detailId: string;
40
+
41
+ @ManyToOne(
42
+ () => VentureDetailData,
43
+ (ventureDetail) => ventureDetail.publications
44
+ )
45
+ @JoinColumn({ name: "detailId" })
46
+ detail: VentureDetailData;
47
+
48
+ @OneToMany(
49
+ () => PublicationClapData,
50
+ (publicationClap) => publicationClap.venturePublication
51
+ )
52
+ claps: PublicationClapData[];
53
+
54
+ @OneToMany(
55
+ () => PublicationCommentData,
56
+ (publicationComment) => publicationComment.venturePublication
57
+ )
58
+ comments: PublicationCommentData[];
59
+
60
+ @OneToMany(
61
+ () => PublicationContentData,
62
+ (publicationContent) => publicationContent.venturePublication
63
+ )
64
+ contents: PublicationContentData[];
65
+ }
@@ -0,0 +1,43 @@
1
+ import {
2
+ Entity,
3
+ PrimaryGeneratedColumn,
4
+ Column,
5
+ CreateDateColumn,
6
+ UpdateDateColumn,
7
+ ManyToOne,
8
+ JoinColumn,
9
+ } from "typeorm";
10
+ import { UserDetailData } from "./user-detail.data";
11
+ import { VentureDetailData } from "./venture-detail.data";
12
+
13
+ @Entity()
14
+ export class VentureSponsorshipData {
15
+ @PrimaryGeneratedColumn("uuid")
16
+ id: string;
17
+
18
+ @Column()
19
+ ventureDetailId: string;
20
+
21
+ @Column("float")
22
+ monthlyAmount: number;
23
+
24
+ @CreateDateColumn()
25
+ createdAt: Date;
26
+
27
+ @UpdateDateColumn()
28
+ updatedAt: Date;
29
+
30
+ @Column()
31
+ sponsorDetailId: string;
32
+
33
+ @ManyToOne(() => UserDetailData, (userDetail) => userDetail.sponsorships)
34
+ @JoinColumn({ name: "sponsorDetailId" })
35
+ user: UserDetailData;
36
+
37
+ @ManyToOne(
38
+ () => VentureDetailData,
39
+ (ventureDetail) => ventureDetail.sponsorships
40
+ )
41
+ @JoinColumn({ name: "ventureDetailId" })
42
+ detail: VentureDetailData;
43
+ }
@@ -0,0 +1,37 @@
1
+ import {
2
+ Column,
3
+ CreateDateColumn,
4
+ Entity,
5
+ JoinColumn,
6
+ ManyToOne,
7
+ PrimaryGeneratedColumn,
8
+ } from "typeorm";
9
+
10
+ import { UserDetailData } from "./user-detail.data";
11
+ import { VentureDetailData } from "./venture-detail.data";
12
+
13
+ @Entity()
14
+ export class VentureSubscriptionData {
15
+ @PrimaryGeneratedColumn("uuid")
16
+ id: string;
17
+
18
+ @Column()
19
+ ventureId: string;
20
+
21
+ @CreateDateColumn()
22
+ createdAt: Date;
23
+
24
+ @Column()
25
+ subscriberDetailId: string;
26
+
27
+ @ManyToOne(() => UserDetailData, (userDetail) => userDetail.subscriptions)
28
+ @JoinColumn({ name: "subscriberDetailId" })
29
+ user: UserDetailData;
30
+
31
+ @ManyToOne(
32
+ () => VentureDetailData,
33
+ (ventureDetail) => ventureDetail.subscriptions
34
+ )
35
+ @JoinColumn({ name: "ventureId" })
36
+ detail: VentureDetailData;
37
+ }
@@ -0,0 +1,92 @@
1
+ import {
2
+ Entity,
3
+ PrimaryGeneratedColumn,
4
+ Column,
5
+ CreateDateColumn,
6
+ UpdateDateColumn,
7
+ OneToOne,
8
+ ManyToOne,
9
+ ManyToMany,
10
+ JoinTable,
11
+ JoinColumn,
12
+ } from "typeorm";
13
+ import { VentureDetailData } from "./venture-detail.data";
14
+ import { VentureLocationData } from "./venture-location.data";
15
+ import { UserDetailData } from "./user-detail.data";
16
+ import { VentureContactData } from "./venture-contact.data";
17
+ import { VentureCategoryData } from "./venture-category.data";
18
+
19
+ @Entity()
20
+ export class VentureData {
21
+ @PrimaryGeneratedColumn("uuid")
22
+ id: string;
23
+
24
+ @Column()
25
+ name: string;
26
+
27
+ @Column({ unique: true })
28
+ slug: string;
29
+
30
+ @Column()
31
+ coverPhoto: string;
32
+
33
+ @Column()
34
+ description: string;
35
+
36
+ @Column({ default: true })
37
+ active: boolean;
38
+
39
+ @Column({ default: false })
40
+ verified: boolean;
41
+
42
+ @Column({ unique: true })
43
+ detailId: string;
44
+
45
+ @CreateDateColumn()
46
+ createdAt: Date;
47
+
48
+ @UpdateDateColumn()
49
+ updatedAt: Date;
50
+
51
+ @Column({ unique: true })
52
+ locationId: string;
53
+
54
+ @Column()
55
+ ownerDetailId: string;
56
+
57
+ @Column({ unique: true })
58
+ ventureContactId: string;
59
+
60
+ @OneToOne(() => VentureDetailData, (ventureDetail) => ventureDetail.venture)
61
+ @JoinColumn({ name: "detailId" })
62
+ detail: VentureDetailData;
63
+
64
+ @OneToOne(
65
+ () => VentureLocationData,
66
+ (ventureLocation) => ventureLocation.Venture
67
+ )
68
+ @JoinColumn({ name: "locationId" })
69
+ location: VentureLocationData;
70
+
71
+ @ManyToOne(() => UserDetailData, (userDetail) => userDetail.ventures)
72
+ @JoinColumn({ name: "ownerDetailId" })
73
+ ownerDetail: UserDetailData;
74
+
75
+ @OneToOne(
76
+ () => VentureContactData,
77
+ (ventureContact) => ventureContact.Venture
78
+ )
79
+ @JoinColumn({ name: "ventureContactId" })
80
+ contact: VentureContactData;
81
+
82
+ @ManyToMany(
83
+ () => VentureCategoryData,
84
+ (ventureCategory) => ventureCategory.ventures
85
+ )
86
+ @JoinTable({
87
+ name: "x_venture_vencure_category",
88
+ joinColumn: { name: "ventureId", referencedColumnName: "id" },
89
+ inverseJoinColumn: { name: "categoryId", referencedColumnName: "id" },
90
+ })
91
+ categories: VentureCategoryData[];
92
+ }
package/src/index.ts CHANGED
@@ -1,10 +1,12 @@
1
- export * from "./app/modules/auth";
2
- export * from "./app/modules/donations";
3
- export * from "./app/modules/feeds";
4
- export * from "./app/modules/shared";
5
- export * from "./app/modules/news";
6
- export * from "./app/modules/news";
7
- export * from "./app/modules/ventures";
8
- export * from "./app/modules/user";
9
- export * from "./app/modules/utility";
10
- // Prueba
1
+ import "reflect-metadata";
2
+
3
+ export * from "./app/modules/domain/auth";
4
+ export * from "./app/modules/domain/donations";
5
+ export * from "./app/modules/domain/feeds";
6
+ export * from "./app/modules/domain/news";
7
+ export * from "./app/modules/domain/notifications";
8
+ export * from "./app/modules/domain/shared";
9
+ export * from "./app/modules/domain/user";
10
+ export * from "./app/modules/domain/ventures";
11
+ export * from "./app/modules/infrastructure/database/entities";
12
+ export * from "./app/modules/utilities";