@asumano/worklip-typeorm-db 1.1.7 → 1.1.9

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.
@@ -4,7 +4,7 @@ import { AssociateSession } from "./AssociateSession";
4
4
  import { Workshop } from "./Workshop";
5
5
  import { ServiceOrderHistory } from "./ServiceOrderHistory";
6
6
  import { Reminder } from "./Reminder";
7
- import { AssociatePermission, AssociateRole } from "../entities.views.routes";
7
+ import { AssociatePermission } from "../entities.views.routes";
8
8
  export declare class Associate {
9
9
  id: number;
10
10
  code: string;
@@ -27,6 +27,5 @@ export declare class Associate {
27
27
  workshops_associated: Workshop[];
28
28
  service_order_history: ServiceOrderHistory[];
29
29
  reminders: Reminder[];
30
- roles: AssociateRole[];
31
30
  permissions: AssociatePermission[];
32
31
  }
@@ -192,21 +192,6 @@ __decorate([
192
192
  (0, typeorm_1.OneToMany)(() => Reminder_1.Reminder, (reminder) => reminder.associate),
193
193
  __metadata("design:type", Array)
194
194
  ], Associate.prototype, "reminders", void 0);
195
- __decorate([
196
- (0, typeorm_1.ManyToMany)(() => entities_views_routes_1.AssociateRole, (role) => role.associates),
197
- (0, typeorm_1.JoinTable)({
198
- name: "associate_assigned_role",
199
- joinColumn: {
200
- name: "associate",
201
- referencedColumnName: "id",
202
- },
203
- inverseJoinColumn: {
204
- name: "role",
205
- referencedColumnName: "id",
206
- },
207
- }),
208
- __metadata("design:type", Array)
209
- ], Associate.prototype, "roles", void 0);
210
195
  __decorate([
211
196
  (0, typeorm_1.ManyToMany)(() => entities_views_routes_1.AssociatePermission, (permission) => permission.associates),
212
197
  (0, typeorm_1.JoinTable)({
@@ -1,9 +1,8 @@
1
- import { Associate, AssociatePermission, AssociatePlatform } from "../entities.views.routes";
1
+ import { AssociatePermission, AssociatePlatform } from "../entities.views.routes";
2
2
  export declare class AssociateRole {
3
3
  id: number;
4
4
  platform: AssociatePlatform;
5
5
  name: string;
6
6
  status: number;
7
7
  permissions: AssociatePermission[];
8
- associates: Associate[];
9
8
  }
@@ -58,21 +58,6 @@ __decorate([
58
58
  }),
59
59
  __metadata("design:type", Array)
60
60
  ], AssociateRole.prototype, "permissions", void 0);
61
- __decorate([
62
- (0, typeorm_1.ManyToMany)(() => entities_views_routes_1.Associate, (associate) => associate.roles),
63
- (0, typeorm_1.JoinTable)({
64
- name: "associate_assigned_role",
65
- joinColumn: {
66
- name: "role",
67
- referencedColumnName: "id",
68
- },
69
- inverseJoinColumn: {
70
- name: "associate",
71
- referencedColumnName: "id",
72
- },
73
- }),
74
- __metadata("design:type", Array)
75
- ], AssociateRole.prototype, "associates", void 0);
76
61
  exports.AssociateRole = AssociateRole = __decorate([
77
62
  (0, typeorm_1.Entity)({
78
63
  comment: "Roles que van a tener los concesionarios/talleres.",
@@ -2,8 +2,10 @@ import { Vehicle } from "./Vehicle";
2
2
  import { Client } from "./Client";
3
3
  import { Associate } from "./Associate";
4
4
  import { Workshop } from "./Workshop";
5
+ import { Country } from "..";
5
6
  export declare class Company {
6
7
  id: number;
8
+ country: Country;
7
9
  code: string;
8
10
  name: string;
9
11
  details: any | null;
@@ -15,6 +15,7 @@ const Vehicle_1 = require("./Vehicle");
15
15
  const Client_1 = require("./Client");
16
16
  const Associate_1 = require("./Associate");
17
17
  const Workshop_1 = require("./Workshop");
18
+ const __1 = require("..");
18
19
  let Company = class Company {
19
20
  };
20
21
  exports.Company = Company;
@@ -25,6 +26,14 @@ __decorate([
25
26
  }),
26
27
  __metadata("design:type", Number)
27
28
  ], Company.prototype, "id", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.ManyToOne)(() => __1.Country, (country) => country.companies, {
31
+ onDelete: "RESTRICT",
32
+ onUpdate: "NO ACTION",
33
+ }),
34
+ (0, typeorm_1.JoinColumn)({ name: "country" }),
35
+ __metadata("design:type", __1.Country)
36
+ ], Company.prototype, "country", void 0);
28
37
  __decorate([
29
38
  (0, typeorm_1.Column)({
30
39
  length: 10,
@@ -1,4 +1,5 @@
1
1
  import { Region } from "./Region";
2
+ import { Company } from "..";
2
3
  export declare class Country {
3
4
  id: number;
4
5
  code: string;
@@ -9,4 +10,5 @@ export declare class Country {
9
10
  details: any | null;
10
11
  status: number;
11
12
  regions: Region[];
13
+ companies: Company[];
12
14
  }
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Country = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const Region_1 = require("./Region");
15
+ const __1 = require("..");
15
16
  let Country = class Country {
16
17
  };
17
18
  exports.Country = Country;
@@ -76,6 +77,10 @@ __decorate([
76
77
  (0, typeorm_1.OneToMany)(() => Region_1.Region, (region) => region.country),
77
78
  __metadata("design:type", Array)
78
79
  ], Country.prototype, "regions", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.OneToMany)(() => __1.Company, (company) => company.country),
82
+ __metadata("design:type", Array)
83
+ ], Country.prototype, "companies", void 0);
79
84
  exports.Country = Country = __decorate([
80
85
  (0, typeorm_1.Entity)({ comment: "Países donde está disponible la plataforma." })
81
86
  ], Country);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asumano/worklip-typeorm-db",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "publishConfig": {
5
5
  "access": "restricted"
6
6
  },