@asumano/worklip-typeorm-db 1.1.15 → 1.1.16
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/GlobalTemplate.d.ts +2 -0
- package/dist/entities/GlobalTemplate.js +9 -0
- package/dist/entities/Template.d.ts +2 -0
- package/dist/entities/Template.js +9 -0
- package/dist/entities/Vehicle.d.ts +3 -1
- package/dist/entities/Vehicle.js +10 -1
- package/dist/entities/VehicleType.d.ts +12 -0
- package/dist/entities/VehicleType.js +69 -0
- package/dist/entities.index.d.ts +1 -0
- package/dist/entities.index.js +3 -1
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { GlobalTemplateSection } from "./GlobalTemplateSection";
|
|
2
|
+
import { VehicleType } from "./VehicleType";
|
|
2
3
|
export declare class GlobalTemplate {
|
|
3
4
|
id: number;
|
|
4
5
|
code: string;
|
|
6
|
+
vehicle_type: VehicleType;
|
|
5
7
|
name: string;
|
|
6
8
|
created: Date;
|
|
7
9
|
updated: Date | null;
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.GlobalTemplate = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const GlobalTemplateSection_1 = require("./GlobalTemplateSection");
|
|
15
|
+
const VehicleType_1 = require("./VehicleType");
|
|
15
16
|
let GlobalTemplate = class GlobalTemplate {
|
|
16
17
|
};
|
|
17
18
|
exports.GlobalTemplate = GlobalTemplate;
|
|
@@ -31,6 +32,14 @@ __decorate([
|
|
|
31
32
|
}),
|
|
32
33
|
__metadata("design:type", String)
|
|
33
34
|
], GlobalTemplate.prototype, "code", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.ManyToOne)(() => VehicleType_1.VehicleType, (vehicleType) => vehicleType.vehicle_types_global_template, {
|
|
37
|
+
onDelete: "RESTRICT",
|
|
38
|
+
onUpdate: "NO ACTION",
|
|
39
|
+
}),
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: "vehicle_type" }),
|
|
41
|
+
__metadata("design:type", VehicleType_1.VehicleType)
|
|
42
|
+
], GlobalTemplate.prototype, "vehicle_type", void 0);
|
|
34
43
|
__decorate([
|
|
35
44
|
(0, typeorm_1.Column)({
|
|
36
45
|
length: 100,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Workshop } from "./Workshop";
|
|
2
2
|
import { TemplateSection } from "./TemplateSection";
|
|
3
3
|
import { ServiceOrder } from "./ServiceOrder";
|
|
4
|
+
import { VehicleType } from "./VehicleType";
|
|
4
5
|
export declare class Template {
|
|
5
6
|
id: number;
|
|
6
7
|
code: string;
|
|
8
|
+
vehicle_type: VehicleType;
|
|
7
9
|
workshop: Workshop;
|
|
8
10
|
name: string;
|
|
9
11
|
created: Date;
|
|
@@ -14,6 +14,7 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const Workshop_1 = require("./Workshop");
|
|
15
15
|
const TemplateSection_1 = require("./TemplateSection");
|
|
16
16
|
const ServiceOrder_1 = require("./ServiceOrder");
|
|
17
|
+
const VehicleType_1 = require("./VehicleType");
|
|
17
18
|
let Template = class Template {
|
|
18
19
|
};
|
|
19
20
|
exports.Template = Template;
|
|
@@ -33,6 +34,14 @@ __decorate([
|
|
|
33
34
|
}),
|
|
34
35
|
__metadata("design:type", String)
|
|
35
36
|
], Template.prototype, "code", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.ManyToOne)(() => VehicleType_1.VehicleType, (vehicleType) => vehicleType.vehicle_types_template, {
|
|
39
|
+
onDelete: "RESTRICT",
|
|
40
|
+
onUpdate: "NO ACTION",
|
|
41
|
+
}),
|
|
42
|
+
(0, typeorm_1.JoinColumn)({ name: "vehicle_type" }),
|
|
43
|
+
__metadata("design:type", VehicleType_1.VehicleType)
|
|
44
|
+
], Template.prototype, "vehicle_type", void 0);
|
|
36
45
|
__decorate([
|
|
37
46
|
(0, typeorm_1.ManyToOne)(() => Workshop_1.Workshop, (workshop) => workshop.templates, {
|
|
38
47
|
onDelete: "CASCADE",
|
|
@@ -2,9 +2,11 @@ import { Brand } from "./Brand";
|
|
|
2
2
|
import { Company } from "./Company";
|
|
3
3
|
import { ServiceOrder } from "./ServiceOrder";
|
|
4
4
|
import { Reminder } from "./Reminder";
|
|
5
|
+
import { VehicleType } from "./VehicleType";
|
|
5
6
|
export declare class Vehicle {
|
|
6
7
|
id: number;
|
|
7
|
-
|
|
8
|
+
vehicle_type: VehicleType;
|
|
9
|
+
plate: string;
|
|
8
10
|
brand: Brand;
|
|
9
11
|
company: Company;
|
|
10
12
|
mileage: number;
|
package/dist/entities/Vehicle.js
CHANGED
|
@@ -15,6 +15,7 @@ const Brand_1 = require("./Brand");
|
|
|
15
15
|
const Company_1 = require("./Company");
|
|
16
16
|
const ServiceOrder_1 = require("./ServiceOrder");
|
|
17
17
|
const Reminder_1 = require("./Reminder");
|
|
18
|
+
const VehicleType_1 = require("./VehicleType");
|
|
18
19
|
let Vehicle = class Vehicle {
|
|
19
20
|
};
|
|
20
21
|
exports.Vehicle = Vehicle;
|
|
@@ -25,10 +26,18 @@ __decorate([
|
|
|
25
26
|
}),
|
|
26
27
|
__metadata("design:type", Number)
|
|
27
28
|
], Vehicle.prototype, "id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.ManyToOne)(() => VehicleType_1.VehicleType, (vehicleType) => vehicleType.vehicle_types, {
|
|
31
|
+
onDelete: "RESTRICT",
|
|
32
|
+
onUpdate: "NO ACTION",
|
|
33
|
+
}),
|
|
34
|
+
(0, typeorm_1.JoinColumn)({ name: "vehicle_type" }),
|
|
35
|
+
__metadata("design:type", VehicleType_1.VehicleType)
|
|
36
|
+
], Vehicle.prototype, "vehicle_type", void 0);
|
|
28
37
|
__decorate([
|
|
29
38
|
(0, typeorm_1.Column)({ length: 10, type: "varchar", comment: "Placa del vehículo." }),
|
|
30
39
|
__metadata("design:type", String)
|
|
31
|
-
], Vehicle.prototype, "
|
|
40
|
+
], Vehicle.prototype, "plate", void 0);
|
|
32
41
|
__decorate([
|
|
33
42
|
(0, typeorm_1.ManyToOne)(() => Brand_1.Brand, (brand) => brand.vehicles, {
|
|
34
43
|
onDelete: "RESTRICT",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GlobalTemplate } from "./GlobalTemplate";
|
|
2
|
+
import { Template } from "./Template";
|
|
3
|
+
import { Vehicle } from "./Vehicle";
|
|
4
|
+
export declare class VehicleType {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
details: any | null;
|
|
8
|
+
status: number;
|
|
9
|
+
vehicle_types: Vehicle[];
|
|
10
|
+
vehicle_types_template: Template[];
|
|
11
|
+
vehicle_types_global_template: GlobalTemplate[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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.VehicleType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const GlobalTemplate_1 = require("./GlobalTemplate");
|
|
15
|
+
const Template_1 = require("./Template");
|
|
16
|
+
const Vehicle_1 = require("./Vehicle");
|
|
17
|
+
let VehicleType = class VehicleType {
|
|
18
|
+
};
|
|
19
|
+
exports.VehicleType = VehicleType;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
22
|
+
type: "int",
|
|
23
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
24
|
+
}),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], VehicleType.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({
|
|
29
|
+
length: 50,
|
|
30
|
+
type: "varchar",
|
|
31
|
+
comment: "Nombre del tipo de vehículo.",
|
|
32
|
+
}),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], VehicleType.prototype, "name", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({
|
|
37
|
+
type: "json",
|
|
38
|
+
nullable: true,
|
|
39
|
+
default: null,
|
|
40
|
+
comment: "Campo de tipo json para agregar estructura si se necesita.",
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], VehicleType.prototype, "details", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({
|
|
46
|
+
default: 1,
|
|
47
|
+
type: "int",
|
|
48
|
+
width: 1,
|
|
49
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", Number)
|
|
52
|
+
], VehicleType.prototype, "status", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.OneToMany)(() => Vehicle_1.Vehicle, (vehicle) => vehicle.vehicle_type),
|
|
55
|
+
__metadata("design:type", Array)
|
|
56
|
+
], VehicleType.prototype, "vehicle_types", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.OneToMany)(() => Template_1.Template, (template) => template.vehicle_type),
|
|
59
|
+
__metadata("design:type", Array)
|
|
60
|
+
], VehicleType.prototype, "vehicle_types_template", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.OneToMany)(() => GlobalTemplate_1.GlobalTemplate, (globalTemplate) => globalTemplate.vehicle_type),
|
|
63
|
+
__metadata("design:type", Array)
|
|
64
|
+
], VehicleType.prototype, "vehicle_types_global_template", void 0);
|
|
65
|
+
exports.VehicleType = VehicleType = __decorate([
|
|
66
|
+
(0, typeorm_1.Entity)({
|
|
67
|
+
comment: "Tabla creada para agregar los tipos de vehículos que va a manejar el concesionario/taller.",
|
|
68
|
+
})
|
|
69
|
+
], VehicleType);
|
package/dist/entities.index.d.ts
CHANGED
|
@@ -24,4 +24,5 @@ export { AssociateRole } from "./entities/AssociateRole";
|
|
|
24
24
|
export { AssociatePermission } from "./entities/AssociatePermission";
|
|
25
25
|
export { AssociateSection } from "./entities/AssociateSection";
|
|
26
26
|
export { AssociatePasswordReset } from "./entities/AssociatePasswordReset";
|
|
27
|
+
export { VehicleType } from "./entities/VehicleType";
|
|
27
28
|
export { Associates } from "./views/Associates";
|
package/dist/entities.index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Associates = 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;
|
|
3
|
+
exports.Associates = exports.VehicleType = 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
4
|
var Country_1 = require("./entities/Country");
|
|
5
5
|
Object.defineProperty(exports, "Country", { enumerable: true, get: function () { return Country_1.Country; } });
|
|
6
6
|
var Region_1 = require("./entities/Region");
|
|
@@ -53,5 +53,7 @@ var AssociateSection_1 = require("./entities/AssociateSection");
|
|
|
53
53
|
Object.defineProperty(exports, "AssociateSection", { enumerable: true, get: function () { return AssociateSection_1.AssociateSection; } });
|
|
54
54
|
var AssociatePasswordReset_1 = require("./entities/AssociatePasswordReset");
|
|
55
55
|
Object.defineProperty(exports, "AssociatePasswordReset", { enumerable: true, get: function () { return AssociatePasswordReset_1.AssociatePasswordReset; } });
|
|
56
|
+
var VehicleType_1 = require("./entities/VehicleType");
|
|
57
|
+
Object.defineProperty(exports, "VehicleType", { enumerable: true, get: function () { return VehicleType_1.VehicleType; } });
|
|
56
58
|
var Associates_1 = require("./views/Associates");
|
|
57
59
|
Object.defineProperty(exports, "Associates", { enumerable: true, get: function () { return Associates_1.Associates; } });
|