@asumano/worklip-typeorm-db 1.1.69 → 1.1.70
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/Brand.d.ts +2 -0
- package/dist/entities/Brand.js +10 -0
- package/dist/entities/BrandVehicleType.d.ts +7 -0
- package/dist/entities/BrandVehicleType.js +48 -0
- package/dist/entities/Vehicle.d.ts +2 -2
- package/dist/entities/Vehicle.js +12 -4
- package/dist/entities/VehicleType.d.ts +2 -0
- package/dist/entities/VehicleType.js +5 -0
- package/dist/entities.index.d.ts +1 -0
- package/dist/entities.index.js +4 -2
- package/dist/views/ServicesOrder.d.ts +2 -2
- package/dist/views/ServicesOrder.js +2 -2
- package/dist/views/Vehicles.d.ts +2 -2
- package/dist/views/Vehicles.js +2 -2
- package/package.json +1 -1
package/dist/entities/Brand.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Vehicle } from "./Vehicle";
|
|
2
|
+
import { BrandVehicleType } from "./BrandVehicleType";
|
|
2
3
|
import { CompanyBrand } from "./CompanyBrand";
|
|
3
4
|
export declare class Brand {
|
|
4
5
|
id: number;
|
|
@@ -6,4 +7,5 @@ export declare class Brand {
|
|
|
6
7
|
details: any | null;
|
|
7
8
|
vehicles: Vehicle[];
|
|
8
9
|
companyBrands: CompanyBrand[];
|
|
10
|
+
brandVehicleTypes: BrandVehicleType[];
|
|
9
11
|
}
|
package/dist/entities/Brand.js
CHANGED
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.Brand = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const Vehicle_1 = require("./Vehicle");
|
|
15
|
+
const BrandVehicleType_1 = require("./BrandVehicleType");
|
|
15
16
|
const CompanyBrand_1 = require("./CompanyBrand");
|
|
16
17
|
let Brand = class Brand {
|
|
17
18
|
};
|
|
@@ -44,8 +45,17 @@ __decorate([
|
|
|
44
45
|
(0, typeorm_1.OneToMany)(() => CompanyBrand_1.CompanyBrand, (companyBrand) => companyBrand.brand),
|
|
45
46
|
__metadata("design:type", Array)
|
|
46
47
|
], Brand.prototype, "companyBrands", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.OneToMany)(() => BrandVehicleType_1.BrandVehicleType, (brandVehicleType) => brandVehicleType.brand),
|
|
50
|
+
__metadata("design:type", Array)
|
|
51
|
+
], Brand.prototype, "brandVehicleTypes", void 0);
|
|
47
52
|
exports.Brand = Brand = __decorate([
|
|
48
53
|
(0, typeorm_1.Entity)({
|
|
49
54
|
comment: "Marcas de vehículos que estarán disponibles en la plataforma.",
|
|
50
55
|
})
|
|
56
|
+
// DOC: El nombre es único: el catálogo es global y dos marcas con el mismo nombre
|
|
57
|
+
// solo generan duplicados en los selectores. El índice se declara con nombre
|
|
58
|
+
// propio para que coincida con el del script SQL (uk_brand_name).
|
|
59
|
+
,
|
|
60
|
+
(0, typeorm_1.Index)("uk_brand_name", ["name"], { unique: true })
|
|
51
61
|
], Brand);
|
|
@@ -0,0 +1,48 @@
|
|
|
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.BrandVehicleType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Brand_1 = require("./Brand");
|
|
15
|
+
const VehicleType_1 = require("./VehicleType");
|
|
16
|
+
let BrandVehicleType = class BrandVehicleType {
|
|
17
|
+
};
|
|
18
|
+
exports.BrandVehicleType = BrandVehicleType;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
+
type: "int",
|
|
22
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
23
|
+
}),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], BrandVehicleType.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.ManyToOne)(() => Brand_1.Brand, (brand) => brand.brandVehicleTypes, {
|
|
28
|
+
onDelete: "CASCADE",
|
|
29
|
+
onUpdate: "NO ACTION",
|
|
30
|
+
}),
|
|
31
|
+
(0, typeorm_1.JoinColumn)({ name: "brand" }),
|
|
32
|
+
__metadata("design:type", Brand_1.Brand)
|
|
33
|
+
], BrandVehicleType.prototype, "brand", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.ManyToOne)(() => VehicleType_1.VehicleType, (vehicleType) => vehicleType.brandVehicleTypes, {
|
|
36
|
+
onDelete: "CASCADE",
|
|
37
|
+
onUpdate: "NO ACTION",
|
|
38
|
+
}),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: "vehicle_type" }),
|
|
40
|
+
__metadata("design:type", VehicleType_1.VehicleType)
|
|
41
|
+
], BrandVehicleType.prototype, "vehicle_type", void 0);
|
|
42
|
+
exports.BrandVehicleType = BrandVehicleType = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)({
|
|
44
|
+
name: "brand_vehicle_type",
|
|
45
|
+
comment: "Tipos de vehículo que fabrica cada marca.",
|
|
46
|
+
}),
|
|
47
|
+
(0, typeorm_1.Index)("uk_brand_vehicle_type", ["brand", "vehicle_type"], { unique: true })
|
|
48
|
+
], BrandVehicleType);
|
|
@@ -6,10 +6,10 @@ import { VehicleType } from "./VehicleType";
|
|
|
6
6
|
export declare class Vehicle {
|
|
7
7
|
id: number;
|
|
8
8
|
vehicle_type: VehicleType;
|
|
9
|
-
plate: string;
|
|
9
|
+
plate: string | null;
|
|
10
10
|
brand: Brand;
|
|
11
11
|
company: Company;
|
|
12
|
-
mileage: number;
|
|
12
|
+
mileage: number | null;
|
|
13
13
|
model: number;
|
|
14
14
|
version: string;
|
|
15
15
|
details: any | null;
|
package/dist/entities/Vehicle.js
CHANGED
|
@@ -35,8 +35,14 @@ __decorate([
|
|
|
35
35
|
__metadata("design:type", VehicleType_1.VehicleType)
|
|
36
36
|
], Vehicle.prototype, "vehicle_type", void 0);
|
|
37
37
|
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({
|
|
39
|
-
|
|
38
|
+
(0, typeorm_1.Column)({
|
|
39
|
+
length: 10,
|
|
40
|
+
type: "varchar",
|
|
41
|
+
nullable: true,
|
|
42
|
+
default: null,
|
|
43
|
+
comment: "Placa del vehículo. Nula en los tipos que no llevan placa.",
|
|
44
|
+
}),
|
|
45
|
+
__metadata("design:type", Object)
|
|
40
46
|
], Vehicle.prototype, "plate", void 0);
|
|
41
47
|
__decorate([
|
|
42
48
|
(0, typeorm_1.ManyToOne)(() => Brand_1.Brand, (brand) => brand.vehicles, {
|
|
@@ -57,9 +63,11 @@ __decorate([
|
|
|
57
63
|
__decorate([
|
|
58
64
|
(0, typeorm_1.Column)({
|
|
59
65
|
type: "int",
|
|
60
|
-
|
|
66
|
+
nullable: true,
|
|
67
|
+
default: null,
|
|
68
|
+
comment: "Kilometraje del vehículo. Nulo si el tipo no lo exige.",
|
|
61
69
|
}),
|
|
62
|
-
__metadata("design:type",
|
|
70
|
+
__metadata("design:type", Object)
|
|
63
71
|
], Vehicle.prototype, "mileage", void 0);
|
|
64
72
|
__decorate([
|
|
65
73
|
(0, typeorm_1.Column)({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BrandVehicleType } from "./BrandVehicleType";
|
|
1
2
|
import { CompanyVehicleType } from "./CompanyVehicleType";
|
|
2
3
|
import { GlobalTemplate } from "./GlobalTemplate";
|
|
3
4
|
import { Template } from "./Template";
|
|
@@ -11,4 +12,5 @@ export declare class VehicleType {
|
|
|
11
12
|
vehicle_types_template: Template[];
|
|
12
13
|
vehicle_types_global_template: GlobalTemplate[];
|
|
13
14
|
companyVehicleTypes: CompanyVehicleType[];
|
|
15
|
+
brandVehicleTypes: BrandVehicleType[];
|
|
14
16
|
}
|
|
@@ -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 BrandVehicleType_1 = require("./BrandVehicleType");
|
|
14
15
|
const CompanyVehicleType_1 = require("./CompanyVehicleType");
|
|
15
16
|
const GlobalTemplate_1 = require("./GlobalTemplate");
|
|
16
17
|
const Template_1 = require("./Template");
|
|
@@ -67,6 +68,10 @@ __decorate([
|
|
|
67
68
|
(0, typeorm_1.OneToMany)(() => CompanyVehicleType_1.CompanyVehicleType, (companyVehicleType) => companyVehicleType.vehicle_type),
|
|
68
69
|
__metadata("design:type", Array)
|
|
69
70
|
], VehicleType.prototype, "companyVehicleTypes", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.OneToMany)(() => BrandVehicleType_1.BrandVehicleType, (brandVehicleType) => brandVehicleType.vehicle_type),
|
|
73
|
+
__metadata("design:type", Array)
|
|
74
|
+
], VehicleType.prototype, "brandVehicleTypes", void 0);
|
|
70
75
|
exports.VehicleType = VehicleType = __decorate([
|
|
71
76
|
(0, typeorm_1.Entity)({
|
|
72
77
|
comment: "Tabla creada para agregar los tipos de vehículos que va a manejar el concesionario/taller.",
|
package/dist/entities.index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export { MasterPermission } from "./entities/MasterPermission";
|
|
|
31
31
|
export { MasterSection } from "./entities/MasterSection";
|
|
32
32
|
export { VehicleType } from "./entities/VehicleType";
|
|
33
33
|
export { CompanyBrand } from "./entities/CompanyBrand";
|
|
34
|
+
export { BrandVehicleType } from "./entities/BrandVehicleType";
|
|
34
35
|
export { CompanyVehicleType } from "./entities/CompanyVehicleType";
|
|
35
36
|
export { CountryHoliday } from "./entities/CountryHoliday";
|
|
36
37
|
export { SubscriptionPlan } from "./entities/SubscriptionPlan";
|
package/dist/entities.index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.GlobalTemplateSectionItems = exports.GlobalTemplateSections = exports.GlobalTemplates = exports.SubscriptionAddonTemplates = exports.SubscriptionPlans = exports.Masters = exports.Companies = exports.WorkshopsByAssociate = exports.Workshops = exports.TemplateSectionItems = exports.TemplateSections = exports.Templates = exports.Reminders = exports.Vehicles = exports.Clients = void 0;
|
|
3
|
+
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.BrandVehicleType = exports.CompanyBrand = exports.VehicleType = exports.MasterSection = exports.MasterPermission = exports.MasterRole = exports.MasterPlatform = exports.MasterPasswordReset = 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.GlobalTemplateSectionItems = exports.GlobalTemplateSections = exports.GlobalTemplates = exports.SubscriptionAddonTemplates = exports.SubscriptionPlans = exports.Masters = exports.Companies = exports.WorkshopsByAssociate = exports.Workshops = exports.TemplateSectionItems = exports.TemplateSections = exports.Templates = exports.Reminders = exports.Vehicles = exports.Clients = exports.ServicesOrder = 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");
|
|
@@ -68,6 +68,8 @@ var VehicleType_1 = require("./entities/VehicleType");
|
|
|
68
68
|
Object.defineProperty(exports, "VehicleType", { enumerable: true, get: function () { return VehicleType_1.VehicleType; } });
|
|
69
69
|
var CompanyBrand_1 = require("./entities/CompanyBrand");
|
|
70
70
|
Object.defineProperty(exports, "CompanyBrand", { enumerable: true, get: function () { return CompanyBrand_1.CompanyBrand; } });
|
|
71
|
+
var BrandVehicleType_1 = require("./entities/BrandVehicleType");
|
|
72
|
+
Object.defineProperty(exports, "BrandVehicleType", { enumerable: true, get: function () { return BrandVehicleType_1.BrandVehicleType; } });
|
|
71
73
|
var CompanyVehicleType_1 = require("./entities/CompanyVehicleType");
|
|
72
74
|
Object.defineProperty(exports, "CompanyVehicleType", { enumerable: true, get: function () { return CompanyVehicleType_1.CompanyVehicleType; } });
|
|
73
75
|
var CountryHoliday_1 = require("./entities/CountryHoliday");
|
|
@@ -34,9 +34,9 @@ export declare class ServicesOrder {
|
|
|
34
34
|
workshop_updated: Date;
|
|
35
35
|
workshop_status: number;
|
|
36
36
|
vehicle_id: number;
|
|
37
|
-
vehicle_plate: string;
|
|
37
|
+
vehicle_plate: string | null;
|
|
38
38
|
vehicle_brand: number;
|
|
39
|
-
vehicle_mileage: number;
|
|
39
|
+
vehicle_mileage: number | null;
|
|
40
40
|
vehicle_model: number;
|
|
41
41
|
vehicle_version: string;
|
|
42
42
|
vehicle_details: any;
|
|
@@ -156,7 +156,7 @@ __decorate([
|
|
|
156
156
|
], ServicesOrder.prototype, "vehicle_id", void 0);
|
|
157
157
|
__decorate([
|
|
158
158
|
(0, typeorm_1.ViewColumn)(),
|
|
159
|
-
__metadata("design:type",
|
|
159
|
+
__metadata("design:type", Object)
|
|
160
160
|
], ServicesOrder.prototype, "vehicle_plate", void 0);
|
|
161
161
|
__decorate([
|
|
162
162
|
(0, typeorm_1.ViewColumn)(),
|
|
@@ -164,7 +164,7 @@ __decorate([
|
|
|
164
164
|
], ServicesOrder.prototype, "vehicle_brand", void 0);
|
|
165
165
|
__decorate([
|
|
166
166
|
(0, typeorm_1.ViewColumn)(),
|
|
167
|
-
__metadata("design:type",
|
|
167
|
+
__metadata("design:type", Object)
|
|
168
168
|
], ServicesOrder.prototype, "vehicle_mileage", void 0);
|
|
169
169
|
__decorate([
|
|
170
170
|
(0, typeorm_1.ViewColumn)(),
|
package/dist/views/Vehicles.d.ts
CHANGED
package/dist/views/Vehicles.js
CHANGED
|
@@ -28,7 +28,7 @@ __decorate([
|
|
|
28
28
|
], Vehicles.prototype, "vehicle_type", void 0);
|
|
29
29
|
__decorate([
|
|
30
30
|
(0, typeorm_1.ViewColumn)(),
|
|
31
|
-
__metadata("design:type",
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
32
|
], Vehicles.prototype, "plate", void 0);
|
|
33
33
|
__decorate([
|
|
34
34
|
(0, typeorm_1.ViewColumn)(),
|
|
@@ -36,7 +36,7 @@ __decorate([
|
|
|
36
36
|
], Vehicles.prototype, "brand", void 0);
|
|
37
37
|
__decorate([
|
|
38
38
|
(0, typeorm_1.ViewColumn)(),
|
|
39
|
-
__metadata("design:type",
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
40
|
], Vehicles.prototype, "mileage", void 0);
|
|
41
41
|
__decorate([
|
|
42
42
|
(0, typeorm_1.ViewColumn)(),
|