test-entity-library-asm 3.9.5 → 3.9.7
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/CustomRepository.js +21 -109
- package/dist/entities/AuthenticationCredential.js +54 -57
- package/dist/entities/Bank.js +50 -53
- package/dist/entities/BusinessType.js +47 -50
- package/dist/entities/BusinessTypeProduct.js +68 -71
- package/dist/entities/Category.js +148 -151
- package/dist/entities/CategoryDate.js +39 -42
- package/dist/entities/CategorySchedule.js +41 -44
- package/dist/entities/City.js +70 -73
- package/dist/entities/CodeRedemptionHistoryCompany.js +44 -47
- package/dist/entities/CodeRedemptionHistoryUser.js +54 -57
- package/dist/entities/Company.js +169 -172
- package/dist/entities/Configuration.d.ts +1 -1
- package/dist/entities/Configuration.js +25 -26
- package/dist/entities/Country.js +91 -94
- package/dist/entities/Day.js +38 -41
- package/dist/entities/DecorationReserve.js +46 -49
- package/dist/entities/DiscountCodeCompany.js +124 -129
- package/dist/entities/DiscountCodeUser.js +139 -142
- package/dist/entities/Gallery.js +88 -91
- package/dist/entities/Local.js +239 -242
- package/dist/entities/LocalDecorationReserve.js +64 -67
- package/dist/entities/LocalPaymentMethod.js +41 -44
- package/dist/entities/LocalPlan.js +88 -91
- package/dist/entities/LocalQualification.js +51 -54
- package/dist/entities/LocalReserve.js +177 -180
- package/dist/entities/LocalReserveStatus.js +85 -88
- package/dist/entities/LocalTable.js +163 -166
- package/dist/entities/LocalTableReserve.js +22 -25
- package/dist/entities/LocalTableReservePayment.js +156 -159
- package/dist/entities/LocalTableZone.js +84 -87
- package/dist/entities/Master.js +182 -185
- package/dist/entities/MasterNotification.js +96 -99
- package/dist/entities/MasterPermission.js +65 -68
- package/dist/entities/MasterRole.js +83 -86
- package/dist/entities/Partner.js +306 -309
- package/dist/entities/PartnerNotification.js +97 -100
- package/dist/entities/PartnerPlatform.js +66 -69
- package/dist/entities/PartnerPlatformSection.js +74 -79
- package/dist/entities/PartnerPlatformSectionPermission.js +113 -118
- package/dist/entities/PartnerPlatformSectionPermissionAssociate.js +26 -29
- package/dist/entities/PartnerRole.js +93 -96
- package/dist/entities/PartnerSession.js +94 -97
- package/dist/entities/PaymentMethod.js +91 -94
- package/dist/entities/Plan.js +86 -89
- package/dist/entities/PosSystem.js +69 -74
- package/dist/entities/Product.js +219 -222
- package/dist/entities/ProductDate.js +39 -42
- package/dist/entities/ProductGroup.js +76 -79
- package/dist/entities/ProductImage.js +33 -36
- package/dist/entities/ProductIngredient.js +54 -57
- package/dist/entities/ProductSchedule.js +41 -44
- package/dist/entities/ProductTopping.js +47 -50
- package/dist/entities/ReceiptConfig.js +184 -187
- package/dist/entities/Region.js +46 -49
- package/dist/entities/Request.js +152 -155
- package/dist/entities/RequestInvoice.js +125 -128
- package/dist/entities/RequestInvoiceCategory.js +34 -37
- package/dist/entities/RequestLocal.js +164 -169
- package/dist/entities/RequestLocalHistory.js +61 -64
- package/dist/entities/RequestLocalPayment.js +154 -157
- package/dist/entities/RequestLocalTable.js +34 -37
- package/dist/entities/RequestPrint.js +60 -63
- package/dist/entities/RequestProduct.js +58 -61
- package/dist/entities/RequestProductGroupComplement.js +51 -56
- package/dist/entities/ServiceDiscountsPlan.js +30 -33
- package/dist/entities/ServicePlan.js +84 -87
- package/dist/entities/Square.js +130 -133
- package/dist/entities/ToppingImage.js +56 -59
- package/dist/entities/TypeMeasureIngredient.js +45 -48
- package/dist/entities/User.js +234 -237
- package/dist/entities/UserAddress.js +114 -117
- package/dist/entities/UserPaymentMethod.js +118 -121
- package/dist/entities/VerificationCode.js +60 -63
- package/dist/entities/VerifyLocal.js +142 -145
- package/dist/entities/productGroupComplement.js +117 -120
- package/dist/filters/DiscountsCodeCompanyInformation.js +153 -202
- package/dist/filters/DiscountsCodeUserInformation.js +173 -220
- package/dist/filters/LocalReservesInformation.js +35 -81
- package/dist/filters/LocalsCompanyInformation.js +169 -218
- package/dist/filters/LocalsCompanyInformationForTheTable.js +157 -203
- package/dist/filters/VerifyLocalsInformation.js +131 -179
- package/dist/index.js +55 -130
- package/dist/transformers/dateTransformer.js +10 -13
- package/dist/transformers/jsonEncryptionTransformer.d.ts +2 -0
- package/dist/transformers/jsonEncryptionTransformer.js +72 -0
- package/dist/transformers/jsonTransformer.js +2 -2
- package/dist/utils.js +3 -3
- package/dist/views/DiscountsCodeUser.js +120 -123
- package/dist/views/LocalReserves.js +280 -283
- package/dist/views/LocalTableZonesFilter.js +76 -79
- package/dist/views/LocalsCompany.js +172 -175
- package/dist/views/LocalsCompanyInformationForTheMap.js +276 -279
- package/dist/views/LocalsCompanyInformationForTheTable.js +384 -387
- package/dist/views/MasterNotifications.js +132 -135
- package/dist/views/PartnerNotifications.js +104 -107
- package/dist/views/Partners.js +140 -143
- package/dist/views/VerifyLocals.js +152 -155
- package/dist/views/ViewLocalsCompanies.js +100 -103
- package/package.json +3 -2
- package/src/entities/Configuration.ts +3 -1
- package/src/transformers/jsonEncryptionTransformer.ts +78 -0
- package/tsconfig.json +7 -3
|
@@ -10,122 +10,117 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PartnerPlatformSectionPermission = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
-
type: "int",
|
|
21
|
-
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
|
-
}),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], PartnerPlatformSectionPermission.prototype, "id", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({
|
|
27
|
-
length: 10,
|
|
28
|
-
type: "varchar",
|
|
29
|
-
unique: true,
|
|
30
|
-
comment: "Código del permiso.",
|
|
31
|
-
}),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], PartnerPlatformSectionPermission.prototype, "code", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.PartnerPlatformSection; }, function (partnerPlatformSection) {
|
|
36
|
-
return partnerPlatformSection.partner_platform_sections;
|
|
37
|
-
}, {
|
|
38
|
-
onDelete: "RESTRICT",
|
|
39
|
-
onUpdate: "NO ACTION",
|
|
40
|
-
}),
|
|
41
|
-
(0, typeorm_1.JoinColumn)({ name: "section" }),
|
|
42
|
-
__metadata("design:type", __1.PartnerPlatformSection)
|
|
43
|
-
], PartnerPlatformSectionPermission.prototype, "section", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({
|
|
46
|
-
length: 40,
|
|
47
|
-
type: "varchar",
|
|
48
|
-
comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.",
|
|
49
|
-
}),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], PartnerPlatformSectionPermission.prototype, "name", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, typeorm_1.Column)({
|
|
54
|
-
length: 40,
|
|
55
|
-
type: "varchar",
|
|
56
|
-
comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.",
|
|
57
|
-
nullable: true,
|
|
58
|
-
default: null,
|
|
59
|
-
}),
|
|
60
|
-
__metadata("design:type", Object)
|
|
61
|
-
], PartnerPlatformSectionPermission.prototype, "description", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, typeorm_1.Column)({
|
|
64
|
-
length: 100,
|
|
65
|
-
type: "varchar",
|
|
66
|
-
comment: "Campo que me indica qué acción se hace en el frontend.",
|
|
67
|
-
nullable: true,
|
|
68
|
-
default: null,
|
|
69
|
-
}),
|
|
70
|
-
__metadata("design:type", Object)
|
|
71
|
-
], PartnerPlatformSectionPermission.prototype, "action", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, typeorm_1.Column)({
|
|
74
|
-
length: 100,
|
|
75
|
-
type: "varchar",
|
|
76
|
-
comment: "Acá guardamos el endpoint que usa para esa acción.",
|
|
77
|
-
nullable: true,
|
|
78
|
-
default: null,
|
|
79
|
-
}),
|
|
80
|
-
__metadata("design:type", Object)
|
|
81
|
-
], PartnerPlatformSectionPermission.prototype, "endpoint", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, typeorm_1.Column)({
|
|
84
|
-
length: 20,
|
|
85
|
-
type: "varchar",
|
|
86
|
-
comment: "Icono de la sección para los permisos.",
|
|
87
|
-
nullable: true,
|
|
88
|
-
default: null,
|
|
89
|
-
}),
|
|
90
|
-
__metadata("design:type", Object)
|
|
91
|
-
], PartnerPlatformSectionPermission.prototype, "icon", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, typeorm_1.Column)({
|
|
94
|
-
default: 1,
|
|
95
|
-
type: "int",
|
|
96
|
-
width: 1,
|
|
97
|
-
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
98
|
-
}),
|
|
99
|
-
__metadata("design:type", Number)
|
|
100
|
-
], PartnerPlatformSectionPermission.prototype, "status", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
(0, typeorm_1.OneToMany)(function () { return __1.PartnerPlatformSectionPermissionAssociate; }, function (ppa) { return ppa.permission; }),
|
|
103
|
-
__metadata("design:type", Array)
|
|
104
|
-
], PartnerPlatformSectionPermission.prototype, "permission_associates", void 0);
|
|
105
|
-
__decorate([
|
|
106
|
-
(0, typeorm_1.OneToMany)(function () { return __1.PartnerPlatformSectionPermissionAssociate; }, function (ppa) { return ppa.associate; }),
|
|
107
|
-
__metadata("design:type", Array)
|
|
108
|
-
], PartnerPlatformSectionPermission.prototype, "associated_by", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
(0, typeorm_1.ManyToMany)(function () { return __1.PartnerRole; }, function (partnerRole) { return partnerRole.roles_permissions; }),
|
|
111
|
-
(0, typeorm_1.JoinTable)({
|
|
112
|
-
name: "partner_role_permission",
|
|
113
|
-
joinColumn: {
|
|
114
|
-
name: "permission",
|
|
115
|
-
referencedColumnName: "id",
|
|
116
|
-
},
|
|
117
|
-
inverseJoinColumn: {
|
|
118
|
-
name: "role",
|
|
119
|
-
referencedColumnName: "id",
|
|
120
|
-
},
|
|
121
|
-
}),
|
|
122
|
-
__metadata("design:type", Array)
|
|
123
|
-
], PartnerPlatformSectionPermission.prototype, "roles_permissions", void 0);
|
|
124
|
-
PartnerPlatformSectionPermission = __decorate([
|
|
125
|
-
(0, typeorm_1.Entity)("partner_platform_section_permission", {
|
|
126
|
-
comment: "Permisos que estarán disponibles en la plataforma para los usuarios (partners).",
|
|
127
|
-
})
|
|
128
|
-
], PartnerPlatformSectionPermission);
|
|
129
|
-
return PartnerPlatformSectionPermission;
|
|
130
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
let PartnerPlatformSectionPermission = class PartnerPlatformSectionPermission {
|
|
16
|
+
};
|
|
131
17
|
exports.PartnerPlatformSectionPermission = PartnerPlatformSectionPermission;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
+
type: "int",
|
|
21
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], PartnerPlatformSectionPermission.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({
|
|
27
|
+
length: 10,
|
|
28
|
+
type: "varchar",
|
|
29
|
+
unique: true,
|
|
30
|
+
comment: "Código del permiso.",
|
|
31
|
+
}),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], PartnerPlatformSectionPermission.prototype, "code", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.ManyToOne)(() => __1.PartnerPlatformSection, (partnerPlatformSection) => partnerPlatformSection.partner_platform_sections, {
|
|
36
|
+
onDelete: "RESTRICT",
|
|
37
|
+
onUpdate: "NO ACTION",
|
|
38
|
+
}),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: "section" }),
|
|
40
|
+
__metadata("design:type", __1.PartnerPlatformSection)
|
|
41
|
+
], PartnerPlatformSectionPermission.prototype, "section", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({
|
|
44
|
+
length: 40,
|
|
45
|
+
type: "varchar",
|
|
46
|
+
comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.",
|
|
47
|
+
}),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], PartnerPlatformSectionPermission.prototype, "name", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({
|
|
52
|
+
length: 40,
|
|
53
|
+
type: "varchar",
|
|
54
|
+
comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.",
|
|
55
|
+
nullable: true,
|
|
56
|
+
default: null,
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], PartnerPlatformSectionPermission.prototype, "description", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({
|
|
62
|
+
length: 100,
|
|
63
|
+
type: "varchar",
|
|
64
|
+
comment: "Campo que me indica qué acción se hace en el frontend.",
|
|
65
|
+
nullable: true,
|
|
66
|
+
default: null,
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], PartnerPlatformSectionPermission.prototype, "action", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({
|
|
72
|
+
length: 100,
|
|
73
|
+
type: "varchar",
|
|
74
|
+
comment: "Acá guardamos el endpoint que usa para esa acción.",
|
|
75
|
+
nullable: true,
|
|
76
|
+
default: null,
|
|
77
|
+
}),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], PartnerPlatformSectionPermission.prototype, "endpoint", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({
|
|
82
|
+
length: 20,
|
|
83
|
+
type: "varchar",
|
|
84
|
+
comment: "Icono de la sección para los permisos.",
|
|
85
|
+
nullable: true,
|
|
86
|
+
default: null,
|
|
87
|
+
}),
|
|
88
|
+
__metadata("design:type", Object)
|
|
89
|
+
], PartnerPlatformSectionPermission.prototype, "icon", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, typeorm_1.Column)({
|
|
92
|
+
default: 1,
|
|
93
|
+
type: "int",
|
|
94
|
+
width: 1,
|
|
95
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
96
|
+
}),
|
|
97
|
+
__metadata("design:type", Number)
|
|
98
|
+
], PartnerPlatformSectionPermission.prototype, "status", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.OneToMany)(() => __1.PartnerPlatformSectionPermissionAssociate, (ppa) => ppa.permission),
|
|
101
|
+
__metadata("design:type", Array)
|
|
102
|
+
], PartnerPlatformSectionPermission.prototype, "permission_associates", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.OneToMany)(() => __1.PartnerPlatformSectionPermissionAssociate, (ppa) => ppa.associate),
|
|
105
|
+
__metadata("design:type", Array)
|
|
106
|
+
], PartnerPlatformSectionPermission.prototype, "associated_by", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, typeorm_1.ManyToMany)(() => __1.PartnerRole, (partnerRole) => partnerRole.roles_permissions),
|
|
109
|
+
(0, typeorm_1.JoinTable)({
|
|
110
|
+
name: "partner_role_permission",
|
|
111
|
+
joinColumn: {
|
|
112
|
+
name: "permission",
|
|
113
|
+
referencedColumnName: "id",
|
|
114
|
+
},
|
|
115
|
+
inverseJoinColumn: {
|
|
116
|
+
name: "role",
|
|
117
|
+
referencedColumnName: "id",
|
|
118
|
+
},
|
|
119
|
+
}),
|
|
120
|
+
__metadata("design:type", Array)
|
|
121
|
+
], PartnerPlatformSectionPermission.prototype, "roles_permissions", void 0);
|
|
122
|
+
exports.PartnerPlatformSectionPermission = PartnerPlatformSectionPermission = __decorate([
|
|
123
|
+
(0, typeorm_1.Entity)("partner_platform_section_permission", {
|
|
124
|
+
comment: "Permisos que estarán disponibles en la plataforma para los usuarios (partners).",
|
|
125
|
+
})
|
|
126
|
+
], PartnerPlatformSectionPermission);
|
|
@@ -10,33 +10,30 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PartnerPlatformSectionPermissionAssociate = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
-
type: "int",
|
|
21
|
-
comment: "ID único del registro de asociación.",
|
|
22
|
-
}),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], PartnerPlatformSectionPermissionAssociate.prototype, "id", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.ManyToOne)(function () { return PartnerPlatformSectionPermission_1.PartnerPlatformSectionPermission; }, function (permission) { return permission.permission_associates; }, { onDelete: "CASCADE" }),
|
|
27
|
-
(0, typeorm_1.JoinColumn)({ name: "partner_platform_section_permission" }),
|
|
28
|
-
__metadata("design:type", PartnerPlatformSectionPermission_1.PartnerPlatformSectionPermission)
|
|
29
|
-
], PartnerPlatformSectionPermissionAssociate.prototype, "permission", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.ManyToOne)(function () { return PartnerPlatformSectionPermission_1.PartnerPlatformSectionPermission; }, function (associate) { return associate.associated_by; }, { onDelete: "CASCADE" }),
|
|
32
|
-
(0, typeorm_1.JoinColumn)({ name: "partner_platform_section_permission_associate" }),
|
|
33
|
-
__metadata("design:type", PartnerPlatformSectionPermission_1.PartnerPlatformSectionPermission)
|
|
34
|
-
], PartnerPlatformSectionPermissionAssociate.prototype, "associate", void 0);
|
|
35
|
-
PartnerPlatformSectionPermissionAssociate = __decorate([
|
|
36
|
-
(0, typeorm_1.Entity)("partner_platform_section_permission_associate", {
|
|
37
|
-
comment: "Asociaciones de permisos que dependen entre sí. Esto sirve por si algún permiso necesita que otros permisos estén activos para poder activarse.",
|
|
38
|
-
})
|
|
39
|
-
], PartnerPlatformSectionPermissionAssociate);
|
|
40
|
-
return PartnerPlatformSectionPermissionAssociate;
|
|
41
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const PartnerPlatformSectionPermission_1 = require("./PartnerPlatformSectionPermission");
|
|
15
|
+
let PartnerPlatformSectionPermissionAssociate = class PartnerPlatformSectionPermissionAssociate {
|
|
16
|
+
};
|
|
42
17
|
exports.PartnerPlatformSectionPermissionAssociate = PartnerPlatformSectionPermissionAssociate;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
+
type: "int",
|
|
21
|
+
comment: "ID único del registro de asociación.",
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], PartnerPlatformSectionPermissionAssociate.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.ManyToOne)(() => PartnerPlatformSectionPermission_1.PartnerPlatformSectionPermission, (permission) => permission.permission_associates, { onDelete: "CASCADE" }),
|
|
27
|
+
(0, typeorm_1.JoinColumn)({ name: "partner_platform_section_permission" }),
|
|
28
|
+
__metadata("design:type", PartnerPlatformSectionPermission_1.PartnerPlatformSectionPermission)
|
|
29
|
+
], PartnerPlatformSectionPermissionAssociate.prototype, "permission", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.ManyToOne)(() => PartnerPlatformSectionPermission_1.PartnerPlatformSectionPermission, (associate) => associate.associated_by, { onDelete: "CASCADE" }),
|
|
32
|
+
(0, typeorm_1.JoinColumn)({ name: "partner_platform_section_permission_associate" }),
|
|
33
|
+
__metadata("design:type", PartnerPlatformSectionPermission_1.PartnerPlatformSectionPermission)
|
|
34
|
+
], PartnerPlatformSectionPermissionAssociate.prototype, "associate", void 0);
|
|
35
|
+
exports.PartnerPlatformSectionPermissionAssociate = PartnerPlatformSectionPermissionAssociate = __decorate([
|
|
36
|
+
(0, typeorm_1.Entity)("partner_platform_section_permission_associate", {
|
|
37
|
+
comment: "Asociaciones de permisos que dependen entre sí. Esto sirve por si algún permiso necesita que otros permisos estén activos para poder activarse.",
|
|
38
|
+
})
|
|
39
|
+
], PartnerPlatformSectionPermissionAssociate);
|
|
@@ -10,100 +10,97 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PartnerRole = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
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
|
-
], PartnerRole.prototype, "id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({
|
|
29
|
-
length: 10,
|
|
30
|
-
type: "varchar",
|
|
31
|
-
unique: true,
|
|
32
|
-
comment: "Código único del rol.",
|
|
33
|
-
}),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], PartnerRole.prototype, "code", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.ManyToOne)(function () { return Company_1.Company; }, function (company) { return company.roles_company; }, {
|
|
38
|
-
onDelete: "CASCADE",
|
|
39
|
-
onUpdate: "NO ACTION",
|
|
40
|
-
nullable: true,
|
|
41
|
-
}),
|
|
42
|
-
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
43
|
-
__metadata("design:type", Object)
|
|
44
|
-
], PartnerRole.prototype, "company", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({
|
|
47
|
-
length: 40,
|
|
48
|
-
type: "varchar",
|
|
49
|
-
comment: 'Id de la variable que se encuentra en los archivos "locale" para el multilenguaje.\r\n\r\nCabe recordar qué los usuarios también pueden crear roles, estos deben ir normal, sin id para el lenguaje.',
|
|
50
|
-
}),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], PartnerRole.prototype, "name", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)({
|
|
55
|
-
length: 200,
|
|
56
|
-
nullable: true,
|
|
57
|
-
default: null,
|
|
58
|
-
type: "varchar",
|
|
59
|
-
comment: 'Id de la variable que se encuentra en los archivos "locale" para el multilenguaje.\r\n\r\nCabe recordar qué los usuarios también pueden crear roles, estos deben ir normal, sin id para el lenguaje.',
|
|
60
|
-
}),
|
|
61
|
-
__metadata("design:type", Object)
|
|
62
|
-
], PartnerRole.prototype, "description", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, typeorm_1.Column)({
|
|
65
|
-
default: 1,
|
|
66
|
-
type: "int",
|
|
67
|
-
width: 1,
|
|
68
|
-
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
69
|
-
}),
|
|
70
|
-
__metadata("design:type", Number)
|
|
71
|
-
], PartnerRole.prototype, "status", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, typeorm_1.ManyToMany)(function () { return PartnerPlatformSectionPermission_1.PartnerPlatformSectionPermission; }, function (partnerPermission) { return partnerPermission.roles_permissions; }),
|
|
74
|
-
(0, typeorm_1.JoinTable)({
|
|
75
|
-
name: "partner_role_permission",
|
|
76
|
-
joinColumn: {
|
|
77
|
-
name: "role",
|
|
78
|
-
referencedColumnName: "id",
|
|
79
|
-
},
|
|
80
|
-
inverseJoinColumn: {
|
|
81
|
-
name: "permission",
|
|
82
|
-
referencedColumnName: "id",
|
|
83
|
-
},
|
|
84
|
-
}),
|
|
85
|
-
__metadata("design:type", Array)
|
|
86
|
-
], PartnerRole.prototype, "roles_permissions", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
(0, typeorm_1.ManyToMany)(function () { return Partner_1.Partner; }, function (partner) { return partner.partners_roles; }),
|
|
89
|
-
(0, typeorm_1.JoinTable)({
|
|
90
|
-
name: "partner_assigned_role",
|
|
91
|
-
joinColumn: {
|
|
92
|
-
name: "role",
|
|
93
|
-
referencedColumnName: "id",
|
|
94
|
-
},
|
|
95
|
-
inverseJoinColumn: {
|
|
96
|
-
name: "partner",
|
|
97
|
-
referencedColumnName: "id",
|
|
98
|
-
},
|
|
99
|
-
}),
|
|
100
|
-
__metadata("design:type", Array)
|
|
101
|
-
], PartnerRole.prototype, "partners_roles", void 0);
|
|
102
|
-
PartnerRole = __decorate([
|
|
103
|
-
(0, typeorm_1.Entity)("partner_role", {
|
|
104
|
-
comment: "Roles que se le pueden agregar a un usuario (partner) en la plataforma.",
|
|
105
|
-
})
|
|
106
|
-
], PartnerRole);
|
|
107
|
-
return PartnerRole;
|
|
108
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Company_1 = require("./Company");
|
|
15
|
+
const Partner_1 = require("./Partner");
|
|
16
|
+
const PartnerPlatformSectionPermission_1 = require("./PartnerPlatformSectionPermission");
|
|
17
|
+
let PartnerRole = class PartnerRole {
|
|
18
|
+
};
|
|
109
19
|
exports.PartnerRole = PartnerRole;
|
|
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
|
+
], PartnerRole.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({
|
|
29
|
+
length: 10,
|
|
30
|
+
type: "varchar",
|
|
31
|
+
unique: true,
|
|
32
|
+
comment: "Código único del rol.",
|
|
33
|
+
}),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], PartnerRole.prototype, "code", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.ManyToOne)(() => Company_1.Company, (company) => company.roles_company, {
|
|
38
|
+
onDelete: "CASCADE",
|
|
39
|
+
onUpdate: "NO ACTION",
|
|
40
|
+
nullable: true,
|
|
41
|
+
}),
|
|
42
|
+
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], PartnerRole.prototype, "company", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({
|
|
47
|
+
length: 40,
|
|
48
|
+
type: "varchar",
|
|
49
|
+
comment: 'Id de la variable que se encuentra en los archivos "locale" para el multilenguaje.\r\n\r\nCabe recordar qué los usuarios también pueden crear roles, estos deben ir normal, sin id para el lenguaje.',
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], PartnerRole.prototype, "name", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({
|
|
55
|
+
length: 200,
|
|
56
|
+
nullable: true,
|
|
57
|
+
default: null,
|
|
58
|
+
type: "varchar",
|
|
59
|
+
comment: 'Id de la variable que se encuentra en los archivos "locale" para el multilenguaje.\r\n\r\nCabe recordar qué los usuarios también pueden crear roles, estos deben ir normal, sin id para el lenguaje.',
|
|
60
|
+
}),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], PartnerRole.prototype, "description", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({
|
|
65
|
+
default: 1,
|
|
66
|
+
type: "int",
|
|
67
|
+
width: 1,
|
|
68
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
69
|
+
}),
|
|
70
|
+
__metadata("design:type", Number)
|
|
71
|
+
], PartnerRole.prototype, "status", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.ManyToMany)(() => PartnerPlatformSectionPermission_1.PartnerPlatformSectionPermission, (partnerPermission) => partnerPermission.roles_permissions),
|
|
74
|
+
(0, typeorm_1.JoinTable)({
|
|
75
|
+
name: "partner_role_permission",
|
|
76
|
+
joinColumn: {
|
|
77
|
+
name: "role",
|
|
78
|
+
referencedColumnName: "id",
|
|
79
|
+
},
|
|
80
|
+
inverseJoinColumn: {
|
|
81
|
+
name: "permission",
|
|
82
|
+
referencedColumnName: "id",
|
|
83
|
+
},
|
|
84
|
+
}),
|
|
85
|
+
__metadata("design:type", Array)
|
|
86
|
+
], PartnerRole.prototype, "roles_permissions", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.ManyToMany)(() => Partner_1.Partner, (partner) => partner.partners_roles),
|
|
89
|
+
(0, typeorm_1.JoinTable)({
|
|
90
|
+
name: "partner_assigned_role",
|
|
91
|
+
joinColumn: {
|
|
92
|
+
name: "role",
|
|
93
|
+
referencedColumnName: "id",
|
|
94
|
+
},
|
|
95
|
+
inverseJoinColumn: {
|
|
96
|
+
name: "partner",
|
|
97
|
+
referencedColumnName: "id",
|
|
98
|
+
},
|
|
99
|
+
}),
|
|
100
|
+
__metadata("design:type", Array)
|
|
101
|
+
], PartnerRole.prototype, "partners_roles", void 0);
|
|
102
|
+
exports.PartnerRole = PartnerRole = __decorate([
|
|
103
|
+
(0, typeorm_1.Entity)("partner_role", {
|
|
104
|
+
comment: "Roles que se le pueden agregar a un usuario (partner) en la plataforma.",
|
|
105
|
+
})
|
|
106
|
+
], PartnerRole);
|
|
@@ -10,101 +10,98 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PartnerSession = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
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
|
-
], PartnerSession.prototype, "id", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.partners_session; }, {
|
|
28
|
-
onDelete: "CASCADE",
|
|
29
|
-
onUpdate: "NO ACTION",
|
|
30
|
-
}),
|
|
31
|
-
(0, typeorm_1.JoinColumn)({ name: "partner" }),
|
|
32
|
-
__metadata("design:type", __1.Partner)
|
|
33
|
-
], PartnerSession.prototype, "partner", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.Column)({
|
|
36
|
-
type: "int",
|
|
37
|
-
default: 1,
|
|
38
|
-
comment: "Plataforma a la que está inciando sesión:\r\n1. Administrador.\r\n2. Portal - Terminal.",
|
|
39
|
-
}),
|
|
40
|
-
__metadata("design:type", Number)
|
|
41
|
-
], PartnerSession.prototype, "platform", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({
|
|
44
|
-
length: 255,
|
|
45
|
-
type: "varchar",
|
|
46
|
-
comment: "Token generado para la sesión.",
|
|
47
|
-
}),
|
|
48
|
-
__metadata("design:type", String)
|
|
49
|
-
], PartnerSession.prototype, "token", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({
|
|
52
|
-
length: 255,
|
|
53
|
-
type: "varchar",
|
|
54
|
-
comment: "Dirección IP de donde está accediendo.",
|
|
55
|
-
}),
|
|
56
|
-
__metadata("design:type", String)
|
|
57
|
-
], PartnerSession.prototype, "ip_address", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, typeorm_1.Column)({
|
|
60
|
-
type: "datetime",
|
|
61
|
-
comment: "Fecha de inicio de la sesión.",
|
|
62
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
63
|
-
}),
|
|
64
|
-
__metadata("design:type", Date)
|
|
65
|
-
], PartnerSession.prototype, "start_time", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, typeorm_1.Column)({
|
|
68
|
-
type: "datetime",
|
|
69
|
-
nullable: true,
|
|
70
|
-
default: null,
|
|
71
|
-
comment: "Fecha de finalización de la sesión.",
|
|
72
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
73
|
-
}),
|
|
74
|
-
__metadata("design:type", Object)
|
|
75
|
-
], PartnerSession.prototype, "finish_time", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, typeorm_1.Column)({
|
|
78
|
-
default: 1,
|
|
79
|
-
type: "int",
|
|
80
|
-
width: 1,
|
|
81
|
-
comment: "Estado de la sesión:\r\n1. Activa.\r\n2. Expirada.\r\n3. Revocada.",
|
|
82
|
-
}),
|
|
83
|
-
__metadata("design:type", Number)
|
|
84
|
-
], PartnerSession.prototype, "status", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
(0, typeorm_1.Column)({
|
|
87
|
-
type: "datetime",
|
|
88
|
-
comment: "Fecha de creación del registro.",
|
|
89
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
90
|
-
}),
|
|
91
|
-
__metadata("design:type", Date)
|
|
92
|
-
], PartnerSession.prototype, "created", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, typeorm_1.Column)({
|
|
95
|
-
type: "datetime",
|
|
96
|
-
nullable: true,
|
|
97
|
-
comment: "Fecha de actualización del registro.",
|
|
98
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
99
|
-
}),
|
|
100
|
-
__metadata("design:type", Object)
|
|
101
|
-
], PartnerSession.prototype, "updated", void 0);
|
|
102
|
-
PartnerSession = __decorate([
|
|
103
|
-
(0, typeorm_1.Entity)({
|
|
104
|
-
comment: "Tabla creada para llevar el control de las sesiones (partner)",
|
|
105
|
-
name: "partner_session",
|
|
106
|
-
})
|
|
107
|
-
], PartnerSession);
|
|
108
|
-
return PartnerSession;
|
|
109
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
const dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
let PartnerSession = class PartnerSession {
|
|
17
|
+
};
|
|
110
18
|
exports.PartnerSession = PartnerSession;
|
|
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
|
+
], PartnerSession.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.ManyToOne)(() => __1.Partner, (partner) => partner.partners_session, {
|
|
28
|
+
onDelete: "CASCADE",
|
|
29
|
+
onUpdate: "NO ACTION",
|
|
30
|
+
}),
|
|
31
|
+
(0, typeorm_1.JoinColumn)({ name: "partner" }),
|
|
32
|
+
__metadata("design:type", __1.Partner)
|
|
33
|
+
], PartnerSession.prototype, "partner", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({
|
|
36
|
+
type: "int",
|
|
37
|
+
default: 1,
|
|
38
|
+
comment: "Plataforma a la que está inciando sesión:\r\n1. Administrador.\r\n2. Portal - Terminal.",
|
|
39
|
+
}),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], PartnerSession.prototype, "platform", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({
|
|
44
|
+
length: 255,
|
|
45
|
+
type: "varchar",
|
|
46
|
+
comment: "Token generado para la sesión.",
|
|
47
|
+
}),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], PartnerSession.prototype, "token", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({
|
|
52
|
+
length: 255,
|
|
53
|
+
type: "varchar",
|
|
54
|
+
comment: "Dirección IP de donde está accediendo.",
|
|
55
|
+
}),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], PartnerSession.prototype, "ip_address", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({
|
|
60
|
+
type: "datetime",
|
|
61
|
+
comment: "Fecha de inicio de la sesión.",
|
|
62
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
63
|
+
}),
|
|
64
|
+
__metadata("design:type", Date)
|
|
65
|
+
], PartnerSession.prototype, "start_time", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({
|
|
68
|
+
type: "datetime",
|
|
69
|
+
nullable: true,
|
|
70
|
+
default: null,
|
|
71
|
+
comment: "Fecha de finalización de la sesión.",
|
|
72
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
73
|
+
}),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], PartnerSession.prototype, "finish_time", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({
|
|
78
|
+
default: 1,
|
|
79
|
+
type: "int",
|
|
80
|
+
width: 1,
|
|
81
|
+
comment: "Estado de la sesión:\r\n1. Activa.\r\n2. Expirada.\r\n3. Revocada.",
|
|
82
|
+
}),
|
|
83
|
+
__metadata("design:type", Number)
|
|
84
|
+
], PartnerSession.prototype, "status", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({
|
|
87
|
+
type: "datetime",
|
|
88
|
+
comment: "Fecha de creación del registro.",
|
|
89
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
90
|
+
}),
|
|
91
|
+
__metadata("design:type", Date)
|
|
92
|
+
], PartnerSession.prototype, "created", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({
|
|
95
|
+
type: "datetime",
|
|
96
|
+
nullable: true,
|
|
97
|
+
comment: "Fecha de actualización del registro.",
|
|
98
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
99
|
+
}),
|
|
100
|
+
__metadata("design:type", Object)
|
|
101
|
+
], PartnerSession.prototype, "updated", void 0);
|
|
102
|
+
exports.PartnerSession = PartnerSession = __decorate([
|
|
103
|
+
(0, typeorm_1.Entity)({
|
|
104
|
+
comment: "Tabla creada para llevar el control de las sesiones (partner)",
|
|
105
|
+
name: "partner_session",
|
|
106
|
+
})
|
|
107
|
+
], PartnerSession);
|