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.
- package/dist/app/modules/domain/auth/index.d.ts +0 -2
- package/dist/app/modules/domain/common/geo.d.ts +2 -2
- package/dist/app/modules/domain/contributions/donation.d.ts +2 -2
- package/dist/app/modules/domain/contributions/sponsor.d.ts +4 -4
- package/dist/app/modules/domain/events/event.d.ts +2 -2
- package/dist/app/modules/domain/notifications/notification.d.ts +2 -2
- package/dist/app/modules/domain/publications/clap.d.ts +2 -2
- package/dist/app/modules/domain/publications/comment.d.ts +2 -2
- package/dist/app/modules/domain/publications/index.d.ts +0 -3
- package/dist/app/modules/domain/user/index.d.ts +0 -1
- package/dist/app/modules/domain/user/user.d.ts +14 -3
- package/dist/app/modules/domain/ventures/category.d.ts +1 -1
- package/dist/app/modules/domain/ventures/index.d.ts +0 -1
- package/dist/app/modules/domain/ventures/subscription.d.ts +4 -4
- package/dist/app/modules/domain/ventures/venture.d.ts +10 -4
- package/dist/app/modules/infrastructure/database/entities/event-donation.data.d.ts +2 -2
- package/dist/app/modules/infrastructure/database/entities/event-donation.data.js +4 -4
- package/dist/app/modules/infrastructure/database/entities/index.d.ts +0 -2
- package/dist/app/modules/infrastructure/database/entities/index.js +1 -5
- package/dist/app/modules/infrastructure/database/entities/municipality.data.d.ts +2 -2
- package/dist/app/modules/infrastructure/database/entities/municipality.data.js +4 -4
- package/dist/app/modules/infrastructure/database/entities/notification.data.d.ts +2 -3
- package/dist/app/modules/infrastructure/database/entities/notification.data.js +7 -12
- package/dist/app/modules/infrastructure/database/entities/publication-clap.data.d.ts +2 -2
- package/dist/app/modules/infrastructure/database/entities/publication-clap.data.js +4 -4
- package/dist/app/modules/infrastructure/database/entities/publication-comment.data.d.ts +2 -2
- package/dist/app/modules/infrastructure/database/entities/publication-comment.data.js +4 -4
- package/dist/app/modules/infrastructure/database/entities/user.data.d.ts +18 -2
- package/dist/app/modules/infrastructure/database/entities/user.data.js +59 -7
- package/dist/app/modules/infrastructure/database/entities/venture-event.data.d.ts +2 -2
- package/dist/app/modules/infrastructure/database/entities/venture-event.data.js +5 -5
- package/dist/app/modules/infrastructure/database/entities/venture-publication.data.d.ts +2 -3
- package/dist/app/modules/infrastructure/database/entities/venture-publication.data.js +6 -11
- package/dist/app/modules/infrastructure/database/entities/venture-sponsorship.data.d.ts +4 -4
- package/dist/app/modules/infrastructure/database/entities/venture-sponsorship.data.js +10 -10
- package/dist/app/modules/infrastructure/database/entities/venture-subscription.data.d.ts +4 -4
- package/dist/app/modules/infrastructure/database/entities/venture-subscription.data.js +9 -9
- package/dist/app/modules/infrastructure/database/entities/venture.data.d.ts +12 -6
- package/dist/app/modules/infrastructure/database/entities/venture.data.js +32 -17
- package/package.json +1 -1
- package/src/app/modules/domain/auth/index.ts +0 -2
- package/src/app/modules/domain/common/geo.ts +2 -2
- package/src/app/modules/domain/contributions/donation.ts +2 -3
- package/src/app/modules/domain/contributions/sponsor.ts +4 -4
- package/src/app/modules/domain/events/event.ts +2 -2
- package/src/app/modules/domain/notifications/notification.ts +2 -2
- package/src/app/modules/domain/publications/clap.ts +2 -3
- package/src/app/modules/domain/publications/comment.ts +2 -3
- package/src/app/modules/domain/publications/index.ts +0 -3
- package/src/app/modules/domain/user/index.ts +0 -1
- package/src/app/modules/domain/user/user.ts +14 -3
- package/src/app/modules/domain/ventures/category.ts +1 -1
- package/src/app/modules/domain/ventures/index.ts +0 -1
- package/src/app/modules/domain/ventures/subscription.ts +3 -5
- package/src/app/modules/domain/ventures/venture.ts +10 -4
- package/src/app/modules/infrastructure/database/entities/event-donation.data.ts +4 -4
- package/src/app/modules/infrastructure/database/entities/index.ts +0 -2
- package/src/app/modules/infrastructure/database/entities/municipality.data.ts +3 -3
- package/src/app/modules/infrastructure/database/entities/notification.data.ts +5 -8
- package/src/app/modules/infrastructure/database/entities/publication-clap.data.ts +4 -4
- package/src/app/modules/infrastructure/database/entities/publication-comment.data.ts +4 -4
- package/src/app/modules/infrastructure/database/entities/user.data.ts +53 -5
- package/src/app/modules/infrastructure/database/entities/venture-event.data.ts +3 -3
- package/src/app/modules/infrastructure/database/entities/venture-publication.data.ts +4 -10
- package/src/app/modules/infrastructure/database/entities/venture-sponsorship.data.ts +8 -11
- package/src/app/modules/infrastructure/database/entities/venture-subscription.data.ts +7 -11
- package/src/app/modules/infrastructure/database/entities/venture.data.ts +39 -20
- package/src/app/modules/domain/user/detail.ts +0 -23
- package/src/app/modules/domain/ventures/detail.ts +0 -14
- package/src/app/modules/infrastructure/database/entities/user-detail.data.ts +0 -72
- package/src/app/modules/infrastructure/database/entities/venture-detail.data.ts +0 -53
@@ -8,8 +8,8 @@ import {
|
|
8
8
|
JoinColumn,
|
9
9
|
} from "typeorm";
|
10
10
|
|
11
|
-
import { UserDetailData } from "./user-detail.data";
|
12
11
|
import { VenturePublicationData } from "./venture-publication.data";
|
12
|
+
import { UserData } from "./user.data";
|
13
13
|
|
14
14
|
@Entity({ name: "publication_clap" })
|
15
15
|
export class PublicationClapData {
|
@@ -23,9 +23,9 @@ export class PublicationClapData {
|
|
23
23
|
@JoinColumn({ name: "publicationId" })
|
24
24
|
publication: VenturePublicationData;
|
25
25
|
|
26
|
-
@ManyToOne(() =>
|
27
|
-
@JoinColumn({ name: "
|
28
|
-
user:
|
26
|
+
@ManyToOne(() => UserData, (user) => user.publicationClaps)
|
27
|
+
@JoinColumn({ name: "userId" })
|
28
|
+
user: UserData;
|
29
29
|
|
30
30
|
@CreateDateColumn()
|
31
31
|
createdAt: Date;
|
@@ -8,17 +8,17 @@ import {
|
|
8
8
|
UpdateDateColumn,
|
9
9
|
} from "typeorm";
|
10
10
|
|
11
|
-
import { UserDetailData } from "./user-detail.data";
|
12
11
|
import { VenturePublicationData } from "./venture-publication.data";
|
12
|
+
import { UserData } from "./user.data";
|
13
13
|
|
14
14
|
@Entity({ name: "publication_comment" })
|
15
15
|
export class PublicationCommentData {
|
16
16
|
@PrimaryGeneratedColumn("uuid")
|
17
17
|
id: string;
|
18
18
|
|
19
|
-
@ManyToOne(() =>
|
20
|
-
@JoinColumn({ name: "
|
21
|
-
author:
|
19
|
+
@ManyToOne(() => UserData, (user) => user.comments)
|
20
|
+
@JoinColumn({ name: "authorId" })
|
21
|
+
author: UserData;
|
22
22
|
|
23
23
|
@Column()
|
24
24
|
content: string;
|
@@ -5,15 +5,24 @@ import {
|
|
5
5
|
JoinColumn,
|
6
6
|
JoinTable,
|
7
7
|
ManyToMany,
|
8
|
+
ManyToOne,
|
9
|
+
OneToMany,
|
8
10
|
OneToOne,
|
9
11
|
PrimaryGeneratedColumn,
|
10
12
|
UpdateDateColumn,
|
11
13
|
} from "typeorm";
|
12
14
|
|
15
|
+
import { EventDonationData } from "./event-donation.data";
|
16
|
+
import { MunicipalityData } from "./municipality.data";
|
17
|
+
import { NotificationData } from "./notification.data";
|
18
|
+
import { PublicationClapData } from "./publication-clap.data";
|
19
|
+
import { PublicationCommentData } from "./publication-comment.data";
|
13
20
|
import { RoleData } from "./role.data";
|
14
21
|
import { UserContactData } from "./user-contact.data";
|
15
|
-
import { UserDetailData } from "./user-detail.data";
|
16
22
|
import { VentureCategoryData } from "./venture-category.data";
|
23
|
+
import { VentureSponsorshipData } from "./venture-sponsorship.data";
|
24
|
+
import { VentureSubscriptionData } from "./venture-subscription.data";
|
25
|
+
import { VentureData } from "./venture.data";
|
17
26
|
|
18
27
|
@Entity({ name: "user" })
|
19
28
|
export class UserData {
|
@@ -51,10 +60,6 @@ export class UserData {
|
|
51
60
|
@JoinColumn({ name: "contactId" })
|
52
61
|
contact?: UserContactData;
|
53
62
|
|
54
|
-
@OneToOne(() => UserDetailData, (detail) => detail.user)
|
55
|
-
@JoinColumn({ name: "detailId" })
|
56
|
-
detail?: UserDetailData;
|
57
|
-
|
58
63
|
@ManyToMany(() => VentureCategoryData, (vc) => vc.users)
|
59
64
|
@JoinTable({ name: "x_user_preference" })
|
60
65
|
preferences: VentureCategoryData[];
|
@@ -62,4 +67,47 @@ export class UserData {
|
|
62
67
|
@ManyToMany(() => RoleData, (role) => role.users, { eager: true })
|
63
68
|
@JoinTable({ name: "x_user_role" })
|
64
69
|
roles: RoleData[];
|
70
|
+
|
71
|
+
@Column({ type: "enum", enum: ["M", "F", "O"] })
|
72
|
+
gender: "M" | "F" | "O";
|
73
|
+
|
74
|
+
@Column()
|
75
|
+
birthDate: Date;
|
76
|
+
|
77
|
+
@ManyToOne(() => MunicipalityData, (municipality) => municipality.users)
|
78
|
+
@JoinColumn({ name: "municipalityId" })
|
79
|
+
municipality?: MunicipalityData;
|
80
|
+
|
81
|
+
@OneToMany(
|
82
|
+
() => PublicationCommentData,
|
83
|
+
(publicationComment) => publicationComment.author
|
84
|
+
)
|
85
|
+
comments: PublicationCommentData[];
|
86
|
+
|
87
|
+
@OneToMany(() => EventDonationData, (eventDonation) => eventDonation.donor)
|
88
|
+
donations: EventDonationData[];
|
89
|
+
|
90
|
+
@OneToMany(() => NotificationData, (notification) => notification.user)
|
91
|
+
notifications: NotificationData[];
|
92
|
+
|
93
|
+
@OneToMany(
|
94
|
+
() => PublicationClapData,
|
95
|
+
(publicationClap) => publicationClap.user
|
96
|
+
)
|
97
|
+
publicationClaps: PublicationClapData[];
|
98
|
+
|
99
|
+
@OneToMany(
|
100
|
+
() => VentureSponsorshipData,
|
101
|
+
(ventureSponsorship) => ventureSponsorship.sponsor
|
102
|
+
)
|
103
|
+
sponsorships: VentureSponsorshipData[];
|
104
|
+
|
105
|
+
@OneToMany(
|
106
|
+
() => VentureSubscriptionData,
|
107
|
+
(ventureSubscription) => ventureSubscription.subscriber
|
108
|
+
)
|
109
|
+
subscriptions: VentureSubscriptionData[];
|
110
|
+
|
111
|
+
@OneToMany(() => VentureData, (venture) => venture.owner)
|
112
|
+
ventures: VentureData[];
|
65
113
|
}
|
@@ -12,9 +12,9 @@ import {
|
|
12
12
|
} from "typeorm";
|
13
13
|
import { EventLocationData } from "./event-location.data";
|
14
14
|
import { EventDonationData } from "./event-donation.data";
|
15
|
-
import { VentureDetailData } from "./venture-detail.data";
|
16
15
|
import { EventCategoryData } from "./event-category.data";
|
17
16
|
import { EventContactData } from "./event-contact.data";
|
17
|
+
import { VentureData } from "./venture.data";
|
18
18
|
|
19
19
|
@Entity({ name: "venture_event" })
|
20
20
|
export class VentureEventData {
|
@@ -33,9 +33,9 @@ export class VentureEventData {
|
|
33
33
|
@Column({ type: "varchar", unique: true })
|
34
34
|
slug: string;
|
35
35
|
|
36
|
-
@ManyToOne(() =>
|
36
|
+
@ManyToOne(() => VentureData, (venture) => venture.events)
|
37
37
|
@JoinColumn({ name: "ventureId" })
|
38
|
-
|
38
|
+
venture?: VentureData;
|
39
39
|
|
40
40
|
@JoinColumn({ name: "locationId" })
|
41
41
|
@OneToOne(() => EventLocationData, (eventLocation) => eventLocation.event, {
|
@@ -11,9 +11,9 @@ import {
|
|
11
11
|
} from "typeorm";
|
12
12
|
import { PublicationClapData } from "./publication-clap.data";
|
13
13
|
import { PublicationCommentData } from "./publication-comment.data";
|
14
|
-
import { VentureDetailData } from "./venture-detail.data";
|
15
14
|
import { PublicationContentData } from "./publication-content.data";
|
16
15
|
import { PublicationType } from "../../../domain/publications";
|
16
|
+
import { VentureData } from "./venture.data";
|
17
17
|
|
18
18
|
@Entity({ name: "venture_publication" })
|
19
19
|
export class VenturePublicationData {
|
@@ -35,15 +35,9 @@ export class VenturePublicationData {
|
|
35
35
|
@UpdateDateColumn()
|
36
36
|
updatedAt: Date;
|
37
37
|
|
38
|
-
@
|
39
|
-
|
40
|
-
|
41
|
-
@ManyToOne(
|
42
|
-
() => VentureDetailData,
|
43
|
-
(ventureDetail) => ventureDetail.publications
|
44
|
-
)
|
45
|
-
@JoinColumn({ name: "detailId" })
|
46
|
-
detail: VentureDetailData;
|
38
|
+
@ManyToOne(() => VentureData, (venture) => venture.publications)
|
39
|
+
@JoinColumn({ name: "ventureId" })
|
40
|
+
venture: VentureData;
|
47
41
|
|
48
42
|
@OneToMany(
|
49
43
|
() => PublicationClapData,
|
@@ -7,8 +7,8 @@ import {
|
|
7
7
|
ManyToOne,
|
8
8
|
JoinColumn,
|
9
9
|
} from "typeorm";
|
10
|
-
import {
|
11
|
-
import {
|
10
|
+
import { UserData } from "./user.data";
|
11
|
+
import { VentureData } from "./venture.data";
|
12
12
|
|
13
13
|
@Entity({ name: "venture_sponsorship" })
|
14
14
|
export class VentureSponsorshipData {
|
@@ -24,14 +24,11 @@ export class VentureSponsorshipData {
|
|
24
24
|
@UpdateDateColumn()
|
25
25
|
updatedAt: Date;
|
26
26
|
|
27
|
-
@ManyToOne(() =>
|
28
|
-
@JoinColumn({ name: "
|
29
|
-
sponsor?:
|
27
|
+
@ManyToOne(() => UserData, (user) => user.sponsorships)
|
28
|
+
@JoinColumn({ name: "sponsorId" })
|
29
|
+
sponsor?: UserData;
|
30
30
|
|
31
|
-
@ManyToOne(
|
32
|
-
|
33
|
-
|
34
|
-
)
|
35
|
-
@JoinColumn({ name: "ventureDetailId" })
|
36
|
-
detail?: VentureDetailData;
|
31
|
+
@ManyToOne(() => VentureData, (venture) => venture.sponsorships)
|
32
|
+
@JoinColumn({ name: "ventureId" })
|
33
|
+
venture?: VentureData;
|
37
34
|
}
|
@@ -6,9 +6,8 @@ import {
|
|
6
6
|
ManyToOne,
|
7
7
|
PrimaryGeneratedColumn,
|
8
8
|
} from "typeorm";
|
9
|
-
|
10
|
-
import {
|
11
|
-
import { VentureDetailData } from "./venture-detail.data";
|
9
|
+
import { UserData } from "./user.data";
|
10
|
+
import { VentureData } from "./venture.data";
|
12
11
|
|
13
12
|
@Entity({ name: "venture_subscription" })
|
14
13
|
export class VentureSubscriptionData {
|
@@ -18,14 +17,11 @@ export class VentureSubscriptionData {
|
|
18
17
|
@CreateDateColumn()
|
19
18
|
createdAt: Date;
|
20
19
|
|
21
|
-
@ManyToOne(() =>
|
22
|
-
@JoinColumn({ name: "
|
23
|
-
subscriber?:
|
20
|
+
@ManyToOne(() => UserData, (user) => user.subscriptions)
|
21
|
+
@JoinColumn({ name: "subscriberId" })
|
22
|
+
subscriber?: UserData;
|
24
23
|
|
25
|
-
@ManyToOne(
|
26
|
-
() => VentureDetailData,
|
27
|
-
(ventureDetail) => ventureDetail.subscriptions
|
28
|
-
)
|
24
|
+
@ManyToOne(() => VentureData, (venture) => venture.subscriptions)
|
29
25
|
@JoinColumn({ name: "ventureId" })
|
30
|
-
|
26
|
+
venture?: VentureData;
|
31
27
|
}
|
@@ -1,21 +1,25 @@
|
|
1
1
|
import {
|
2
|
-
Entity,
|
3
|
-
PrimaryGeneratedColumn,
|
4
2
|
Column,
|
5
3
|
CreateDateColumn,
|
6
|
-
|
7
|
-
OneToOne,
|
8
|
-
ManyToOne,
|
9
|
-
ManyToMany,
|
10
|
-
JoinTable,
|
4
|
+
Entity,
|
11
5
|
JoinColumn,
|
6
|
+
JoinTable,
|
7
|
+
ManyToMany,
|
8
|
+
ManyToOne,
|
9
|
+
OneToMany,
|
10
|
+
OneToOne,
|
11
|
+
PrimaryGeneratedColumn,
|
12
|
+
UpdateDateColumn,
|
12
13
|
} from "typeorm";
|
13
14
|
|
14
|
-
import { VentureDetailData } from "./venture-detail.data";
|
15
|
-
import { VentureLocationData } from "./venture-location.data";
|
16
|
-
import { UserDetailData } from "./user-detail.data";
|
17
|
-
import { VentureContactData } from "./venture-contact.data";
|
18
15
|
import { VentureCategoryData } from "./venture-category.data";
|
16
|
+
import { VentureContactData } from "./venture-contact.data";
|
17
|
+
import { VentureEventData } from "./venture-event.data";
|
18
|
+
import { VentureLocationData } from "./venture-location.data";
|
19
|
+
import { VenturePublicationData } from "./venture-publication.data";
|
20
|
+
import { VentureSponsorshipData } from "./venture-sponsorship.data";
|
21
|
+
import { VentureSubscriptionData } from "./venture-subscription.data";
|
22
|
+
import { UserData } from "./user.data";
|
19
23
|
|
20
24
|
@Entity({ name: "venture" })
|
21
25
|
export class VentureData {
|
@@ -46,12 +50,6 @@ export class VentureData {
|
|
46
50
|
@UpdateDateColumn()
|
47
51
|
updatedAt: Date;
|
48
52
|
|
49
|
-
@OneToOne(() => VentureDetailData, (ventureDetail) => ventureDetail.venture, {
|
50
|
-
cascade: true,
|
51
|
-
})
|
52
|
-
@JoinColumn({ name: "detailId" })
|
53
|
-
detail?: VentureDetailData;
|
54
|
-
|
55
53
|
@OneToOne(
|
56
54
|
() => VentureLocationData,
|
57
55
|
(ventureLocation) => ventureLocation.Venture,
|
@@ -60,9 +58,9 @@ export class VentureData {
|
|
60
58
|
@JoinColumn({ name: "locationId" })
|
61
59
|
location?: VentureLocationData;
|
62
60
|
|
63
|
-
@ManyToOne(() =>
|
64
|
-
@JoinColumn({ name: "
|
65
|
-
|
61
|
+
@ManyToOne(() => UserData, (user) => user.ventures)
|
62
|
+
@JoinColumn({ name: "ownerId" })
|
63
|
+
owner?: UserData;
|
66
64
|
|
67
65
|
@OneToOne(
|
68
66
|
() => VentureContactData,
|
@@ -83,4 +81,25 @@ export class VentureData {
|
|
83
81
|
inverseJoinColumn: { name: "categoryId", referencedColumnName: "id" },
|
84
82
|
})
|
85
83
|
categories: VentureCategoryData[];
|
84
|
+
|
85
|
+
@OneToMany(() => VentureEventData, (ventureEvent) => ventureEvent.venture)
|
86
|
+
events: VentureEventData[];
|
87
|
+
|
88
|
+
@OneToMany(
|
89
|
+
() => VenturePublicationData,
|
90
|
+
(venturePublication) => venturePublication.venture
|
91
|
+
)
|
92
|
+
publications: VenturePublicationData[];
|
93
|
+
|
94
|
+
@OneToMany(
|
95
|
+
() => VentureSponsorshipData,
|
96
|
+
(ventureSponsorship) => ventureSponsorship.venture
|
97
|
+
)
|
98
|
+
sponsorships: VentureSponsorshipData[];
|
99
|
+
|
100
|
+
@OneToMany(
|
101
|
+
() => VentureSubscriptionData,
|
102
|
+
(ventureSubscription) => ventureSubscription.venture
|
103
|
+
)
|
104
|
+
subscriptions: VentureSubscriptionData[];
|
86
105
|
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import { EventDonation, VentureSponsorship } from "../contributions";
|
2
|
-
import { PublicationClap, PublicationComment } from "../publications";
|
3
|
-
// import { NewsClap } from "../news";
|
4
|
-
import { Municipality } from "../common/geo";
|
5
|
-
import { Venture, VentureCategory, VentureSubscription } from "../ventures";
|
6
|
-
import { User } from "./user";
|
7
|
-
import { Notification } from "../notifications";
|
8
|
-
|
9
|
-
export interface UserDetail {
|
10
|
-
id: string;
|
11
|
-
gender: "M" | "F" | "O";
|
12
|
-
birthDate: Date;
|
13
|
-
user?: User;
|
14
|
-
municipality?: Municipality;
|
15
|
-
comments: PublicationComment[];
|
16
|
-
donations: EventDonation[];
|
17
|
-
notifications: Notification[];
|
18
|
-
publicationClaps: PublicationClap[];
|
19
|
-
sponsorships: VentureSponsorship[];
|
20
|
-
// newsClaps: NewsClap[];
|
21
|
-
subscriptions: VentureSubscription[];
|
22
|
-
ventures: Venture[];
|
23
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { VentureSponsorship } from "../contributions/sponsor";
|
2
|
-
import { VentureEvent } from "../events/event";
|
3
|
-
import { VenturePublication } from "../publications/publication";
|
4
|
-
import { VentureSubscription } from "./subscription";
|
5
|
-
import { Venture } from "./venture";
|
6
|
-
|
7
|
-
export interface VentureDetail {
|
8
|
-
id: string;
|
9
|
-
venture?: Venture;
|
10
|
-
events: VentureEvent[];
|
11
|
-
sponsorships: VentureSponsorship[];
|
12
|
-
subscriptions: VentureSubscription[];
|
13
|
-
publications: VenturePublication[];
|
14
|
-
}
|
@@ -1,72 +0,0 @@
|
|
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({ name: "user_detail" })
|
23
|
-
export class UserDetailData {
|
24
|
-
@PrimaryGeneratedColumn("uuid")
|
25
|
-
id: string;
|
26
|
-
|
27
|
-
@Column({ type: "enum", enum: ["M", "F", "O"] })
|
28
|
-
gender: "M" | "F" | "O";
|
29
|
-
|
30
|
-
@Column()
|
31
|
-
birthDate: Date;
|
32
|
-
|
33
|
-
@OneToOne(() => UserData, (user) => user.detail)
|
34
|
-
user?: UserData;
|
35
|
-
|
36
|
-
@ManyToOne(() => MunicipalityData, (municipality) => municipality.userDetails)
|
37
|
-
@JoinColumn({ name: "municipalityId" })
|
38
|
-
municipality?: MunicipalityData;
|
39
|
-
|
40
|
-
@OneToMany(
|
41
|
-
() => PublicationCommentData,
|
42
|
-
(publicationComment) => publicationComment.author
|
43
|
-
)
|
44
|
-
comments: PublicationCommentData[];
|
45
|
-
|
46
|
-
@OneToMany(() => EventDonationData, (eventDonation) => eventDonation.donor)
|
47
|
-
donations: EventDonationData[];
|
48
|
-
|
49
|
-
@OneToMany(() => NotificationData, (notification) => notification.user)
|
50
|
-
notifications: NotificationData[];
|
51
|
-
|
52
|
-
@OneToMany(
|
53
|
-
() => PublicationClapData,
|
54
|
-
(publicationClap) => publicationClap.user
|
55
|
-
)
|
56
|
-
publicationClaps: PublicationClapData[];
|
57
|
-
|
58
|
-
@OneToMany(
|
59
|
-
() => VentureSponsorshipData,
|
60
|
-
(ventureSponsorship) => ventureSponsorship.sponsor
|
61
|
-
)
|
62
|
-
sponsorships: VentureSponsorshipData[];
|
63
|
-
|
64
|
-
@OneToMany(
|
65
|
-
() => VentureSubscriptionData,
|
66
|
-
(ventureSubscription) => ventureSubscription.subscriber
|
67
|
-
)
|
68
|
-
subscriptions: VentureSubscriptionData[];
|
69
|
-
|
70
|
-
@OneToMany(() => VentureData, (venture) => venture.ownerDetail)
|
71
|
-
ventures: VentureData[];
|
72
|
-
}
|
@@ -1,53 +0,0 @@
|
|
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({ name: "venture_detail" })
|
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
|
-
}
|