@asumano/worklip-typeorm-db 1.1.54 → 1.1.55

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.
@@ -2,7 +2,7 @@ import { Vehicle } from "./Vehicle";
2
2
  import { Client } from "./Client";
3
3
  import { Associate } from "./Associate";
4
4
  import { Workshop } from "./Workshop";
5
- import { BillingInvoice, BillingUsageSnapshot, CompanyBrand, CompanySubscription, Country, EmailLog, MediaFile, PaymentMethod, ServiceOrderApproval, UsageAlert, WhatsappLog } from "..";
5
+ import { BillingInvoice, BillingUsageSnapshot, CompanyBrand, CompanySubscription, CompanyVehicleType, Country, EmailLog, MediaFile, PaymentMethod, ServiceOrderApproval, UsageAlert, WhatsappLog } from "..";
6
6
  export declare class Company {
7
7
  id: number;
8
8
  country: Country;
@@ -15,6 +15,7 @@ export declare class Company {
15
15
  associates: Associate[];
16
16
  workshops: Workshop[];
17
17
  companyBrands: CompanyBrand[];
18
+ companyVehicleTypes: CompanyVehicleType[];
18
19
  payment_methods: PaymentMethod[];
19
20
  billing_usage_snapshots: BillingUsageSnapshot[];
20
21
  media_files: MediaFile[];
@@ -85,6 +85,10 @@ __decorate([
85
85
  (0, typeorm_1.OneToMany)(() => __1.CompanyBrand, (companyBrand) => companyBrand.company),
86
86
  __metadata("design:type", Array)
87
87
  ], Company.prototype, "companyBrands", void 0);
88
+ __decorate([
89
+ (0, typeorm_1.OneToMany)(() => __1.CompanyVehicleType, (companyVehicleType) => companyVehicleType.company),
90
+ __metadata("design:type", Array)
91
+ ], Company.prototype, "companyVehicleTypes", void 0);
88
92
  __decorate([
89
93
  (0, typeorm_1.OneToMany)(() => __1.PaymentMethod, (paymentMethod) => paymentMethod.company),
90
94
  __metadata("design:type", Array)
@@ -0,0 +1,7 @@
1
+ import { Company } from "./Company";
2
+ import { VehicleType } from "./VehicleType";
3
+ export declare class CompanyVehicleType {
4
+ id: number;
5
+ company: Company;
6
+ vehicle_type: VehicleType;
7
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CompanyVehicleType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const Company_1 = require("./Company");
15
+ const VehicleType_1 = require("./VehicleType");
16
+ let CompanyVehicleType = class CompanyVehicleType {
17
+ };
18
+ exports.CompanyVehicleType = CompanyVehicleType;
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)({
21
+ type: "int",
22
+ comment: "ID único de cada registro.",
23
+ }),
24
+ __metadata("design:type", Number)
25
+ ], CompanyVehicleType.prototype, "id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.ManyToOne)(() => Company_1.Company, (company) => company.companyVehicleTypes, {
28
+ onDelete: "CASCADE",
29
+ onUpdate: "NO ACTION",
30
+ }),
31
+ (0, typeorm_1.JoinColumn)({ name: "company" }),
32
+ __metadata("design:type", Company_1.Company)
33
+ ], CompanyVehicleType.prototype, "company", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.ManyToOne)(() => VehicleType_1.VehicleType, (vehicleType) => vehicleType.companyVehicleTypes, {
36
+ onDelete: "RESTRICT",
37
+ onUpdate: "NO ACTION",
38
+ }),
39
+ (0, typeorm_1.JoinColumn)({ name: "vehicle_type" }),
40
+ __metadata("design:type", VehicleType_1.VehicleType)
41
+ ], CompanyVehicleType.prototype, "vehicle_type", void 0);
42
+ exports.CompanyVehicleType = CompanyVehicleType = __decorate([
43
+ (0, typeorm_1.Entity)({
44
+ name: "company_vehicle_type",
45
+ comment: "Relación entre los tipos de vehículos y los concesionarios/talleres, hay unos concesionarios/talleres que solo manejan ciertos tipos de vehículos.",
46
+ }),
47
+ (0, typeorm_1.Index)("UQ_company_vehicle_type", ["company", "vehicle_type"], {
48
+ unique: true,
49
+ })
50
+ ], CompanyVehicleType);
@@ -1,3 +1,4 @@
1
+ import { CompanyVehicleType } from "./CompanyVehicleType";
1
2
  import { GlobalTemplate } from "./GlobalTemplate";
2
3
  import { Template } from "./Template";
3
4
  import { Vehicle } from "./Vehicle";
@@ -9,4 +10,5 @@ export declare class VehicleType {
9
10
  vehicle_types: Vehicle[];
10
11
  vehicle_types_template: Template[];
11
12
  vehicle_types_global_template: GlobalTemplate[];
13
+ companyVehicleTypes: CompanyVehicleType[];
12
14
  }
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.VehicleType = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
+ const CompanyVehicleType_1 = require("./CompanyVehicleType");
14
15
  const GlobalTemplate_1 = require("./GlobalTemplate");
15
16
  const Template_1 = require("./Template");
16
17
  const Vehicle_1 = require("./Vehicle");
@@ -62,6 +63,10 @@ __decorate([
62
63
  (0, typeorm_1.OneToMany)(() => GlobalTemplate_1.GlobalTemplate, (globalTemplate) => globalTemplate.vehicle_type),
63
64
  __metadata("design:type", Array)
64
65
  ], VehicleType.prototype, "vehicle_types_global_template", void 0);
66
+ __decorate([
67
+ (0, typeorm_1.OneToMany)(() => CompanyVehicleType_1.CompanyVehicleType, (companyVehicleType) => companyVehicleType.vehicle_type),
68
+ __metadata("design:type", Array)
69
+ ], VehicleType.prototype, "companyVehicleTypes", void 0);
65
70
  exports.VehicleType = VehicleType = __decorate([
66
71
  (0, typeorm_1.Entity)({
67
72
  comment: "Tabla creada para agregar los tipos de vehículos que va a manejar el concesionario/taller.",
@@ -30,6 +30,7 @@ export { MasterPermission } from "./entities/MasterPermission";
30
30
  export { MasterSection } from "./entities/MasterSection";
31
31
  export { VehicleType } from "./entities/VehicleType";
32
32
  export { CompanyBrand } from "./entities/CompanyBrand";
33
+ export { CompanyVehicleType } from "./entities/CompanyVehicleType";
33
34
  export { CountryHoliday } from "./entities/CountryHoliday";
34
35
  export { SubscriptionPlan } from "./entities/SubscriptionPlan";
35
36
  export { CompanySubscription } from "./entities/CompanySubscription";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Vehicles = exports.Clients = exports.ServicesOrder = exports.Associates = exports.UsageAlert = exports.SubscriptionAddonTemplate = exports.PaymentTransaction = exports.BillingInvoice = exports.EmailLog = exports.WhatsappLog = exports.ServiceOrderApproval = exports.MediaFile = exports.BillingUsageSnapshot = exports.PaymentMethod = exports.SubscriptionAddon = exports.CompanySubscription = exports.SubscriptionPlan = exports.CountryHoliday = exports.CompanyBrand = exports.VehicleType = exports.MasterSection = exports.MasterPermission = exports.MasterRole = exports.MasterPlatform = exports.AssociatePasswordReset = exports.AssociateSection = exports.AssociatePermission = exports.AssociateRole = exports.AssociatePlatform = exports.Reminder = exports.ServiceOrderHistory = exports.ServiceOrder = exports.TemplateSectionItem = exports.TemplateSection = exports.Template = exports.Workshop = exports.GlobalTemplateSectionItem = exports.GlobalTemplateSection = exports.GlobalTemplate = exports.AssociateSession = exports.MasterSession = exports.Associate = exports.Client = exports.Master = exports.Vehicle = exports.Brand = exports.Company = exports.City = exports.Region = exports.Country = void 0;
4
- exports.WorkshopsByAssociate = exports.Workshops = exports.TemplateSectionItems = exports.TemplateSections = exports.Templates = exports.Reminders = void 0;
3
+ exports.Clients = exports.ServicesOrder = exports.Associates = exports.UsageAlert = exports.SubscriptionAddonTemplate = exports.PaymentTransaction = exports.BillingInvoice = exports.EmailLog = exports.WhatsappLog = exports.ServiceOrderApproval = exports.MediaFile = exports.BillingUsageSnapshot = exports.PaymentMethod = exports.SubscriptionAddon = exports.CompanySubscription = exports.SubscriptionPlan = exports.CountryHoliday = exports.CompanyVehicleType = exports.CompanyBrand = exports.VehicleType = exports.MasterSection = exports.MasterPermission = exports.MasterRole = exports.MasterPlatform = exports.AssociatePasswordReset = exports.AssociateSection = exports.AssociatePermission = exports.AssociateRole = exports.AssociatePlatform = exports.Reminder = exports.ServiceOrderHistory = exports.ServiceOrder = exports.TemplateSectionItem = exports.TemplateSection = exports.Template = exports.Workshop = exports.GlobalTemplateSectionItem = exports.GlobalTemplateSection = exports.GlobalTemplate = exports.AssociateSession = exports.MasterSession = exports.Associate = exports.Client = exports.Master = exports.Vehicle = exports.Brand = exports.Company = exports.City = exports.Region = exports.Country = void 0;
4
+ exports.WorkshopsByAssociate = exports.Workshops = exports.TemplateSectionItems = exports.TemplateSections = exports.Templates = exports.Reminders = exports.Vehicles = void 0;
5
5
  var Country_1 = require("./entities/Country");
6
6
  Object.defineProperty(exports, "Country", { enumerable: true, get: function () { return Country_1.Country; } });
7
7
  var Region_1 = require("./entities/Region");
@@ -66,6 +66,8 @@ var VehicleType_1 = require("./entities/VehicleType");
66
66
  Object.defineProperty(exports, "VehicleType", { enumerable: true, get: function () { return VehicleType_1.VehicleType; } });
67
67
  var CompanyBrand_1 = require("./entities/CompanyBrand");
68
68
  Object.defineProperty(exports, "CompanyBrand", { enumerable: true, get: function () { return CompanyBrand_1.CompanyBrand; } });
69
+ var CompanyVehicleType_1 = require("./entities/CompanyVehicleType");
70
+ Object.defineProperty(exports, "CompanyVehicleType", { enumerable: true, get: function () { return CompanyVehicleType_1.CompanyVehicleType; } });
69
71
  var CountryHoliday_1 = require("./entities/CountryHoliday");
70
72
  Object.defineProperty(exports, "CountryHoliday", { enumerable: true, get: function () { return CountryHoliday_1.CountryHoliday; } });
71
73
  var SubscriptionPlan_1 = require("./entities/SubscriptionPlan");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asumano/worklip-typeorm-db",
3
- "version": "1.1.54",
3
+ "version": "1.1.55",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },