echadospalante-core 11.1.0 → 11.2.1
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/ventures/index.d.ts +1 -1
- package/dist/app/modules/domain/ventures/location.d.ts +2 -2
- package/dist/app/modules/domain/ventures/venture.d.ts +13 -0
- package/dist/app/modules/infrastructure/database/entities/venture-location.data.d.ts +2 -2
- package/dist/app/modules/infrastructure/database/entities/venture-location.data.js +5 -9
- package/package.json +4 -1
- package/src/app/modules/domain/ventures/index.ts +1 -1
- package/src/app/modules/domain/ventures/location.ts +3 -2
- package/src/app/modules/domain/ventures/venture.ts +14 -0
- package/src/app/modules/infrastructure/database/entities/venture-location.data.ts +6 -5
@@ -1,5 +1,5 @@
|
|
1
1
|
export { VentureCategory } from "./category";
|
2
2
|
export { VentureDetail } from "./detail";
|
3
3
|
export { VentureSubscription } from "./subscription";
|
4
|
-
export { Venture, VentureCreate } from "./venture";
|
4
|
+
export { Venture, VentureCreate, VentureUpdate } from "./venture";
|
5
5
|
export { VentureCategoryCreate } from "./category";
|
@@ -34,3 +34,16 @@ export interface VentureCreate {
|
|
34
34
|
description?: string;
|
35
35
|
};
|
36
36
|
}
|
37
|
+
export interface VentureUpdate {
|
38
|
+
description: string;
|
39
|
+
categoriesIds: string[];
|
40
|
+
contact?: {
|
41
|
+
email?: string;
|
42
|
+
phoneNumber?: string;
|
43
|
+
};
|
44
|
+
location?: {
|
45
|
+
lat?: number;
|
46
|
+
lng?: number;
|
47
|
+
description?: string;
|
48
|
+
};
|
49
|
+
}
|
@@ -14,8 +14,7 @@ const typeorm_1 = require("typeorm");
|
|
14
14
|
const venture_data_1 = require("./venture.data");
|
15
15
|
let VentureLocationData = class VentureLocationData {
|
16
16
|
id;
|
17
|
-
|
18
|
-
lng;
|
17
|
+
location;
|
19
18
|
description;
|
20
19
|
createdAt;
|
21
20
|
updatedAt;
|
@@ -27,13 +26,10 @@ __decorate([
|
|
27
26
|
__metadata("design:type", String)
|
28
27
|
], VentureLocationData.prototype, "id", void 0);
|
29
28
|
__decorate([
|
30
|
-
(0, typeorm_1.Column)("
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
(0, typeorm_1.Column)("float", { nullable: true }),
|
35
|
-
__metadata("design:type", Number)
|
36
|
-
], VentureLocationData.prototype, "lng", void 0);
|
29
|
+
(0, typeorm_1.Column)("geometry", { spatialFeatureType: "Point", srid: 4326 }),
|
30
|
+
(0, typeorm_1.Index)({ spatial: true }),
|
31
|
+
__metadata("design:type", Object)
|
32
|
+
], VentureLocationData.prototype, "location", void 0);
|
37
33
|
__decorate([
|
38
34
|
(0, typeorm_1.Column)({ nullable: true }),
|
39
35
|
__metadata("design:type", String)
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "echadospalante-core",
|
3
|
-
"version": "11.1
|
3
|
+
"version": "11.2.1",
|
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",
|
@@ -31,10 +31,13 @@
|
|
31
31
|
],
|
32
32
|
"license": "MIT",
|
33
33
|
"devDependencies": {
|
34
|
+
"@types/geojson": "^7946.0.16",
|
34
35
|
"typescript": "^5.5.4"
|
35
36
|
},
|
36
37
|
"dependencies": {
|
37
38
|
"@nestjs/typeorm": "^11.0.0",
|
39
|
+
"@turf/turf": "^7.2.0",
|
40
|
+
"geojson": "^0.5.0",
|
38
41
|
"pg": "^8.14.1",
|
39
42
|
"reflect-metadata": "^0.2.2",
|
40
43
|
"typeorm": "^0.3.21"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export { VentureCategory } from "./category";
|
2
2
|
export { VentureDetail } from "./detail";
|
3
3
|
export { VentureSubscription } from "./subscription";
|
4
|
-
export { Venture, VentureCreate } from "./venture";
|
4
|
+
export { Venture, VentureCreate, VentureUpdate } from "./venture";
|
5
5
|
export { VentureCategoryCreate } from "./category";
|
@@ -36,3 +36,17 @@ export interface VentureCreate {
|
|
36
36
|
description?: string;
|
37
37
|
};
|
38
38
|
}
|
39
|
+
|
40
|
+
export interface VentureUpdate {
|
41
|
+
description: string;
|
42
|
+
categoriesIds: string[];
|
43
|
+
contact?: {
|
44
|
+
email?: string;
|
45
|
+
phoneNumber?: string;
|
46
|
+
};
|
47
|
+
location?: {
|
48
|
+
lat?: number;
|
49
|
+
lng?: number;
|
50
|
+
description?: string;
|
51
|
+
};
|
52
|
+
}
|
@@ -5,7 +5,10 @@ import {
|
|
5
5
|
CreateDateColumn,
|
6
6
|
UpdateDateColumn,
|
7
7
|
OneToOne,
|
8
|
+
Index,
|
8
9
|
} from "typeorm";
|
10
|
+
import { Point } from "geojson";
|
11
|
+
|
9
12
|
import { VentureData } from "./venture.data";
|
10
13
|
|
11
14
|
@Entity({ name: "venture_location" })
|
@@ -13,11 +16,9 @@ export class VentureLocationData {
|
|
13
16
|
@PrimaryGeneratedColumn("uuid")
|
14
17
|
id: string;
|
15
18
|
|
16
|
-
@Column("
|
17
|
-
|
18
|
-
|
19
|
-
@Column("float", { nullable: true })
|
20
|
-
lng?: number;
|
19
|
+
@Column("geometry", { spatialFeatureType: "Point", srid: 4326 })
|
20
|
+
@Index({ spatial: true })
|
21
|
+
public location: Point;
|
21
22
|
|
22
23
|
@Column({ nullable: true })
|
23
24
|
description?: string;
|