@asumano/worklip-typeorm-db 1.1.26 → 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.
@@ -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: "RESTRICT",
32
+ onUpdate: "NO ACTION",
33
33
  }),
34
34
  (0, typeorm_1.JoinColumn)({ name: "region" }),
35
35
  __metadata("design:type", Region_1.Region)
@@ -1,5 +1,6 @@
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;
@@ -7,4 +8,5 @@ export declare class Region {
7
8
  details: any | null;
8
9
  status: number;
9
10
  cities: City[];
11
+ workshops: Workshop[];
10
12
  }
@@ -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;
@@ -61,6 +62,10 @@ __decorate([
61
62
  (0, typeorm_1.OneToMany)(() => City_1.City, (city) => city.region),
62
63
  __metadata("design:type", Array)
63
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);
64
69
  exports.Region = Region = __decorate([
65
70
  (0, typeorm_1.Entity)({
66
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asumano/worklip-typeorm-db",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "publishConfig": {
5
5
  "access": "restricted"
6
6
  },