@asumano/worklip-typeorm-db 1.1.25 → 1.1.27
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/entities/City.js
CHANGED
|
@@ -29,7 +29,7 @@ __decorate([
|
|
|
29
29
|
__decorate([
|
|
30
30
|
(0, typeorm_1.ManyToOne)(() => Region_1.Region, (region) => region.cities, {
|
|
31
31
|
onDelete: "RESTRICT",
|
|
32
|
-
onUpdate: "
|
|
32
|
+
onUpdate: "NO ACTION",
|
|
33
33
|
}),
|
|
34
34
|
(0, typeorm_1.JoinColumn)({ name: "region" }),
|
|
35
35
|
__metadata("design:type", Region_1.Region)
|
package/dist/entities/Country.js
CHANGED
|
@@ -61,7 +61,7 @@ __decorate([
|
|
|
61
61
|
type: "json",
|
|
62
62
|
nullable: true,
|
|
63
63
|
default: null,
|
|
64
|
-
comment: "
|
|
64
|
+
comment: "Campo de tipo JSON para guardar la información que se necesite.",
|
|
65
65
|
}),
|
|
66
66
|
__metadata("design:type", Object)
|
|
67
67
|
], Country.prototype, "details", void 0);
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Country } from "./Country";
|
|
2
2
|
import { City } from "./City";
|
|
3
|
+
import { Workshop } from "./Workshop";
|
|
3
4
|
export declare class Region {
|
|
4
5
|
id: number;
|
|
5
6
|
country: Country;
|
|
6
7
|
name: string;
|
|
8
|
+
details: any | null;
|
|
7
9
|
status: number;
|
|
8
10
|
cities: City[];
|
|
11
|
+
workshops: Workshop[];
|
|
9
12
|
}
|
package/dist/entities/Region.js
CHANGED
|
@@ -13,6 +13,7 @@ exports.Region = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const Country_1 = require("./Country");
|
|
15
15
|
const City_1 = require("./City");
|
|
16
|
+
const Workshop_1 = require("./Workshop");
|
|
16
17
|
let Region = class Region {
|
|
17
18
|
};
|
|
18
19
|
exports.Region = Region;
|
|
@@ -39,6 +40,15 @@ __decorate([
|
|
|
39
40
|
}),
|
|
40
41
|
__metadata("design:type", String)
|
|
41
42
|
], Region.prototype, "name", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({
|
|
45
|
+
type: "json",
|
|
46
|
+
nullable: true,
|
|
47
|
+
default: null,
|
|
48
|
+
comment: "Campo de tipo JSON para guardar la información que se necesite.",
|
|
49
|
+
}),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], Region.prototype, "details", void 0);
|
|
42
52
|
__decorate([
|
|
43
53
|
(0, typeorm_1.Column)({
|
|
44
54
|
default: 1,
|
|
@@ -52,6 +62,10 @@ __decorate([
|
|
|
52
62
|
(0, typeorm_1.OneToMany)(() => City_1.City, (city) => city.region),
|
|
53
63
|
__metadata("design:type", Array)
|
|
54
64
|
], Region.prototype, "cities", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.OneToMany)(() => Workshop_1.Workshop, (workshop) => workshop.region),
|
|
67
|
+
__metadata("design:type", Array)
|
|
68
|
+
], Region.prototype, "workshops", void 0);
|
|
55
69
|
exports.Region = Region = __decorate([
|
|
56
70
|
(0, typeorm_1.Entity)({
|
|
57
71
|
comment: "Regiones/departamentos donde estará visible la plataforma.",
|
|
@@ -4,11 +4,13 @@ import { Company } from "./Company";
|
|
|
4
4
|
import { Reminder } from "./Reminder";
|
|
5
5
|
import { ServiceOrder } from "./ServiceOrder";
|
|
6
6
|
import { Template } from "./Template";
|
|
7
|
+
import { Region } from "./Region";
|
|
7
8
|
export declare class Workshop {
|
|
8
9
|
id: number;
|
|
9
10
|
code: string;
|
|
10
11
|
company: Company;
|
|
11
12
|
name: string;
|
|
13
|
+
region: Region;
|
|
12
14
|
city: City;
|
|
13
15
|
address: string;
|
|
14
16
|
latitude: number;
|
|
@@ -17,6 +17,7 @@ const Company_1 = require("./Company");
|
|
|
17
17
|
const Reminder_1 = require("./Reminder");
|
|
18
18
|
const ServiceOrder_1 = require("./ServiceOrder");
|
|
19
19
|
const Template_1 = require("./Template");
|
|
20
|
+
const Region_1 = require("./Region");
|
|
20
21
|
let Workshop = class Workshop {
|
|
21
22
|
};
|
|
22
23
|
exports.Workshop = Workshop;
|
|
@@ -52,6 +53,14 @@ __decorate([
|
|
|
52
53
|
}),
|
|
53
54
|
__metadata("design:type", String)
|
|
54
55
|
], Workshop.prototype, "name", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.ManyToOne)(() => Region_1.Region, (region) => region.workshops, {
|
|
58
|
+
onDelete: "RESTRICT",
|
|
59
|
+
onUpdate: "NO ACTION",
|
|
60
|
+
}),
|
|
61
|
+
(0, typeorm_1.JoinColumn)({ name: "region" }),
|
|
62
|
+
__metadata("design:type", Region_1.Region)
|
|
63
|
+
], Workshop.prototype, "region", void 0);
|
|
55
64
|
__decorate([
|
|
56
65
|
(0, typeorm_1.ManyToOne)(() => City_1.City, (city) => city.workshops, {
|
|
57
66
|
onDelete: "RESTRICT",
|