echadospalante-core 13.0.0 → 13.0.2
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/events/event.d.ts +5 -1
- package/dist/app/modules/infrastructure/database/entities/event-location.data.d.ts +1 -1
- package/dist/app/modules/infrastructure/database/entities/event-location.data.js +5 -1
- package/dist/app/modules/infrastructure/database/entities/venture-event.data.js +2 -1
- package/dist/app/modules/infrastructure/database/entities/venture.data.js +2 -2
- package/package.json +1 -1
- package/src/app/modules/domain/events/event.ts +5 -1
- package/src/app/modules/infrastructure/database/entities/event-location.data.ts +7 -2
- package/src/app/modules/infrastructure/database/entities/venture-event.data.ts +6 -1
- package/src/app/modules/infrastructure/database/entities/venture.data.ts +3 -2
|
@@ -23,7 +23,11 @@ export interface EventCreate {
|
|
|
23
23
|
title: string;
|
|
24
24
|
description: string;
|
|
25
25
|
coverPhoto: string;
|
|
26
|
-
location
|
|
26
|
+
location?: {
|
|
27
|
+
lat?: number;
|
|
28
|
+
lng?: number;
|
|
29
|
+
description?: string;
|
|
30
|
+
};
|
|
27
31
|
categoriesIds: string[];
|
|
28
32
|
startDate: Date;
|
|
29
33
|
contactEmail?: string;
|
|
@@ -24,7 +24,11 @@ __decorate([
|
|
|
24
24
|
__metadata("design:type", String)
|
|
25
25
|
], EventLocationData.prototype, "id", void 0);
|
|
26
26
|
__decorate([
|
|
27
|
-
(0, typeorm_1.Column)("geometry", {
|
|
27
|
+
(0, typeorm_1.Column)("geometry", {
|
|
28
|
+
spatialFeatureType: "Point",
|
|
29
|
+
srid: 4326,
|
|
30
|
+
nullable: true,
|
|
31
|
+
}),
|
|
28
32
|
(0, typeorm_1.Index)({ spatial: true }),
|
|
29
33
|
__metadata("design:type", Object)
|
|
30
34
|
], EventLocationData.prototype, "location", void 0);
|
|
@@ -62,6 +62,7 @@ __decorate([
|
|
|
62
62
|
(0, typeorm_1.JoinColumn)({ name: "locationId" }),
|
|
63
63
|
(0, typeorm_1.OneToOne)(() => event_location_data_1.EventLocationData, (eventLocation) => eventLocation.event, {
|
|
64
64
|
cascade: true,
|
|
65
|
+
eager: true,
|
|
65
66
|
}),
|
|
66
67
|
__metadata("design:type", event_location_data_1.EventLocationData)
|
|
67
68
|
], VentureEventData.prototype, "location", void 0);
|
|
@@ -73,7 +74,7 @@ __decorate([
|
|
|
73
74
|
__metadata("design:type", event_contact_data_1.EventContactData)
|
|
74
75
|
], VentureEventData.prototype, "contact", void 0);
|
|
75
76
|
__decorate([
|
|
76
|
-
(0, typeorm_1.ManyToMany)(() => event_category_data_1.EventCategoryData, (eventCategory) => eventCategory.events),
|
|
77
|
+
(0, typeorm_1.ManyToMany)(() => event_category_data_1.EventCategoryData, (eventCategory) => eventCategory.events, { eager: true }),
|
|
77
78
|
__metadata("design:type", Array)
|
|
78
79
|
], VentureEventData.prototype, "categories", void 0);
|
|
79
80
|
__decorate([
|
|
@@ -77,7 +77,7 @@ __decorate([
|
|
|
77
77
|
__metadata("design:type", venture_detail_data_1.VentureDetailData)
|
|
78
78
|
], VentureData.prototype, "detail", void 0);
|
|
79
79
|
__decorate([
|
|
80
|
-
(0, typeorm_1.OneToOne)(() => venture_location_data_1.VentureLocationData, (ventureLocation) => ventureLocation.Venture, { cascade: true }),
|
|
80
|
+
(0, typeorm_1.OneToOne)(() => venture_location_data_1.VentureLocationData, (ventureLocation) => ventureLocation.Venture, { cascade: true, eager: true }),
|
|
81
81
|
(0, typeorm_1.JoinColumn)({ name: "locationId" }),
|
|
82
82
|
__metadata("design:type", venture_location_data_1.VentureLocationData)
|
|
83
83
|
], VentureData.prototype, "location", void 0);
|
|
@@ -92,7 +92,7 @@ __decorate([
|
|
|
92
92
|
__metadata("design:type", venture_contact_data_1.VentureContactData)
|
|
93
93
|
], VentureData.prototype, "contact", void 0);
|
|
94
94
|
__decorate([
|
|
95
|
-
(0, typeorm_1.ManyToMany)(() => venture_category_data_1.VentureCategoryData, (ventureCategory) => ventureCategory.ventures),
|
|
95
|
+
(0, typeorm_1.ManyToMany)(() => venture_category_data_1.VentureCategoryData, (ventureCategory) => ventureCategory.ventures, { eager: true }),
|
|
96
96
|
(0, typeorm_1.JoinTable)({
|
|
97
97
|
name: "x_venture_venture_category",
|
|
98
98
|
joinColumn: { name: "ventureId", referencedColumnName: "id" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "echadospalante-core",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.2",
|
|
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",
|
|
@@ -25,7 +25,11 @@ export interface EventCreate {
|
|
|
25
25
|
title: string;
|
|
26
26
|
description: string;
|
|
27
27
|
coverPhoto: string;
|
|
28
|
-
location
|
|
28
|
+
location?: {
|
|
29
|
+
lat?: number;
|
|
30
|
+
lng?: number;
|
|
31
|
+
description?: string;
|
|
32
|
+
};
|
|
29
33
|
categoriesIds: string[];
|
|
30
34
|
startDate: Date;
|
|
31
35
|
contactEmail?: string;
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
Point,
|
|
7
7
|
Index,
|
|
8
8
|
} from "typeorm";
|
|
9
|
+
|
|
9
10
|
import { VentureEventData } from "./venture-event.data";
|
|
10
11
|
|
|
11
12
|
@Entity({ name: "event_location" })
|
|
@@ -13,9 +14,13 @@ export class EventLocationData {
|
|
|
13
14
|
@PrimaryGeneratedColumn("uuid")
|
|
14
15
|
id: string;
|
|
15
16
|
|
|
16
|
-
@Column("geometry", {
|
|
17
|
+
@Column("geometry", {
|
|
18
|
+
spatialFeatureType: "Point",
|
|
19
|
+
srid: 4326,
|
|
20
|
+
nullable: true,
|
|
21
|
+
})
|
|
17
22
|
@Index({ spatial: true })
|
|
18
|
-
public location
|
|
23
|
+
public location?: Point;
|
|
19
24
|
|
|
20
25
|
@Column({ nullable: true })
|
|
21
26
|
description?: string;
|
|
@@ -40,6 +40,7 @@ export class VentureEventData {
|
|
|
40
40
|
@JoinColumn({ name: "locationId" })
|
|
41
41
|
@OneToOne(() => EventLocationData, (eventLocation) => eventLocation.event, {
|
|
42
42
|
cascade: true,
|
|
43
|
+
eager: true,
|
|
43
44
|
})
|
|
44
45
|
location: EventLocationData;
|
|
45
46
|
|
|
@@ -49,7 +50,11 @@ export class VentureEventData {
|
|
|
49
50
|
})
|
|
50
51
|
contact: EventContactData;
|
|
51
52
|
|
|
52
|
-
@ManyToMany(
|
|
53
|
+
@ManyToMany(
|
|
54
|
+
() => EventCategoryData,
|
|
55
|
+
(eventCategory) => eventCategory.events,
|
|
56
|
+
{ eager: true }
|
|
57
|
+
)
|
|
53
58
|
categories: EventCategoryData[];
|
|
54
59
|
|
|
55
60
|
@OneToMany(() => EventDonationData, (eventDonation) => eventDonation.event)
|
|
@@ -55,7 +55,7 @@ export class VentureData {
|
|
|
55
55
|
@OneToOne(
|
|
56
56
|
() => VentureLocationData,
|
|
57
57
|
(ventureLocation) => ventureLocation.Venture,
|
|
58
|
-
{ cascade: true }
|
|
58
|
+
{ cascade: true, eager: true }
|
|
59
59
|
)
|
|
60
60
|
@JoinColumn({ name: "locationId" })
|
|
61
61
|
location?: VentureLocationData;
|
|
@@ -74,7 +74,8 @@ export class VentureData {
|
|
|
74
74
|
|
|
75
75
|
@ManyToMany(
|
|
76
76
|
() => VentureCategoryData,
|
|
77
|
-
(ventureCategory) => ventureCategory.ventures
|
|
77
|
+
(ventureCategory) => ventureCategory.ventures,
|
|
78
|
+
{ eager: true }
|
|
78
79
|
)
|
|
79
80
|
@JoinTable({
|
|
80
81
|
name: "x_venture_venture_category",
|