test-entity-library-asm 3.9.4 → 3.9.6
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 +57 -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.d.ts +1 -0
- package/dist/views/LocalsCompanyInformationForTheTable.js +384 -383
- 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 +2 -1
- package/src/entities/Configuration.ts +3 -1
- package/src/transformers/jsonEncryptionTransformer.ts +75 -0
- package/src/views/LocalsCompanyInformationForTheTable.ts +3 -0
- package/tsconfig.json +7 -3
|
@@ -10,149 +10,146 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.VerifyLocal = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
23
|
-
type: "int",
|
|
24
|
-
comment: "Número de identificación (ID) único de cada registro.",
|
|
25
|
-
}),
|
|
26
|
-
__metadata("design:type", Number)
|
|
27
|
-
], VerifyLocal.prototype, "id", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, typeorm_1.ManyToOne)(function () { return Partner_1.Partner; }, function (partner) { return partner.verifyLocals; }, {
|
|
30
|
-
onDelete: "CASCADE",
|
|
31
|
-
onUpdate: "NO ACTION",
|
|
32
|
-
}),
|
|
33
|
-
(0, typeorm_1.JoinColumn)({ name: "partner" }),
|
|
34
|
-
__metadata("design:type", Partner_1.Partner)
|
|
35
|
-
], VerifyLocal.prototype, "partner", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.Master; }, function (master) { return master.verifyLocals; }, {
|
|
38
|
-
onDelete: "RESTRICT",
|
|
39
|
-
onUpdate: "NO ACTION",
|
|
40
|
-
}),
|
|
41
|
-
(0, typeorm_1.JoinColumn)({ name: "assigned_master" }),
|
|
42
|
-
__metadata("design:type", __1.Master)
|
|
43
|
-
], VerifyLocal.prototype, "assigned_master", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({
|
|
46
|
-
type: "longtext",
|
|
47
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
48
|
-
comment: "Campos que el usuario (partner) agrega al nuevo local.",
|
|
49
|
-
}),
|
|
50
|
-
__metadata("design:type", Object)
|
|
51
|
-
], VerifyLocal.prototype, "local_information", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, typeorm_1.Column)({
|
|
54
|
-
type: "longtext",
|
|
55
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
56
|
-
comment: "Estructura de paso información básica.",
|
|
57
|
-
}),
|
|
58
|
-
__metadata("design:type", Object)
|
|
59
|
-
], VerifyLocal.prototype, "basic_information", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, typeorm_1.Column)({
|
|
62
|
-
type: "longtext",
|
|
63
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
64
|
-
nullable: true,
|
|
65
|
-
default: null,
|
|
66
|
-
comment: "Estructura de paso configuración.",
|
|
67
|
-
}),
|
|
68
|
-
__metadata("design:type", Object)
|
|
69
|
-
], VerifyLocal.prototype, "settings", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, typeorm_1.Column)({
|
|
72
|
-
type: "longtext",
|
|
73
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
74
|
-
nullable: true,
|
|
75
|
-
default: null,
|
|
76
|
-
comment: "Estructura de paso horarios de atención.",
|
|
77
|
-
}),
|
|
78
|
-
__metadata("design:type", Object)
|
|
79
|
-
], VerifyLocal.prototype, "opening_hours", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, typeorm_1.Column)({
|
|
82
|
-
type: "longtext",
|
|
83
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
84
|
-
comment: "Estructura de paso terminales y usuarios.",
|
|
85
|
-
}),
|
|
86
|
-
__metadata("design:type", Object)
|
|
87
|
-
], VerifyLocal.prototype, "terminal_users", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, typeorm_1.Column)({
|
|
90
|
-
type: "longtext",
|
|
91
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
92
|
-
comment: "Estructura de paso terminales y usuarios.",
|
|
93
|
-
}),
|
|
94
|
-
__metadata("design:type", Object)
|
|
95
|
-
], VerifyLocal.prototype, "terminals", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
(0, typeorm_1.Column)({
|
|
98
|
-
type: "text",
|
|
99
|
-
nullable: true,
|
|
100
|
-
default: null,
|
|
101
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
102
|
-
comment: "Información adicional del local para su verificación.",
|
|
103
|
-
}),
|
|
104
|
-
__metadata("design:type", Object)
|
|
105
|
-
], VerifyLocal.prototype, "details", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
(0, typeorm_1.Column)({
|
|
108
|
-
type: "datetime",
|
|
109
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
110
|
-
comment: "Fecha de creación del registro.",
|
|
111
|
-
}),
|
|
112
|
-
__metadata("design:type", Date)
|
|
113
|
-
], VerifyLocal.prototype, "created", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
(0, typeorm_1.Column)({
|
|
116
|
-
type: "datetime",
|
|
117
|
-
nullable: true,
|
|
118
|
-
default: null,
|
|
119
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
120
|
-
comment: "Fecha de verificación del registro.",
|
|
121
|
-
}),
|
|
122
|
-
__metadata("design:type", Object)
|
|
123
|
-
], VerifyLocal.prototype, "verification_date", void 0);
|
|
124
|
-
__decorate([
|
|
125
|
-
(0, typeorm_1.Column)({
|
|
126
|
-
type: "datetime",
|
|
127
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
128
|
-
comment: "Fecha de actualización de los nuevos cambios del registro.",
|
|
129
|
-
}),
|
|
130
|
-
__metadata("design:type", Date)
|
|
131
|
-
], VerifyLocal.prototype, "update_partner", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
(0, typeorm_1.Column)({
|
|
134
|
-
default: 1,
|
|
135
|
-
type: "int",
|
|
136
|
-
width: 1,
|
|
137
|
-
comment: "Este campo hace referencia al estado que tiene la verificación del local, es decir:\r\n1. Pendiente de verificación (Pending verification): Este estado hace referencia a que el usuario ya creó el local y lo mandó a verificación, entonces, le queda al master validar y aprobar o rechazar.\r\n\r\n2. Rechazado (Rejected): Hace referencia a que el master verificó y por alguna razón rechazó la información de la creación del local.\r\n\r\n3. Aprobado (approved): Hace referencia a que la información y se procede a la realización del pago (Si hay un plan, no debería hacer el pago, eso es automático).",
|
|
138
|
-
}),
|
|
139
|
-
__metadata("design:type", Number)
|
|
140
|
-
], VerifyLocal.prototype, "status", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
(0, typeorm_1.Column)({
|
|
143
|
-
default: 1,
|
|
144
|
-
type: "int",
|
|
145
|
-
width: 1,
|
|
146
|
-
comment: "Visible al usuario: 1 El registro es visto por el administrador en los locales verificados.0 El registro no es visto para el administrador y pasa a la papelera de reciclaje",
|
|
147
|
-
}),
|
|
148
|
-
__metadata("design:type", Number)
|
|
149
|
-
], VerifyLocal.prototype, "visible", void 0);
|
|
150
|
-
VerifyLocal = __decorate([
|
|
151
|
-
(0, typeorm_1.Entity)({
|
|
152
|
-
name: "verify_local",
|
|
153
|
-
comment: "Tabla creada para almacenar la información del local que el administrador (partner) ingrese para su aprobación.",
|
|
154
|
-
})
|
|
155
|
-
], VerifyLocal);
|
|
156
|
-
return VerifyLocal;
|
|
157
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
const dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
const jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
17
|
+
const Partner_1 = require("./Partner");
|
|
18
|
+
let VerifyLocal = class VerifyLocal {
|
|
19
|
+
};
|
|
158
20
|
exports.VerifyLocal = VerifyLocal;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
23
|
+
type: "int",
|
|
24
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
25
|
+
}),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], VerifyLocal.prototype, "id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(() => Partner_1.Partner, (partner) => partner.verifyLocals, {
|
|
30
|
+
onDelete: "CASCADE",
|
|
31
|
+
onUpdate: "NO ACTION",
|
|
32
|
+
}),
|
|
33
|
+
(0, typeorm_1.JoinColumn)({ name: "partner" }),
|
|
34
|
+
__metadata("design:type", Partner_1.Partner)
|
|
35
|
+
], VerifyLocal.prototype, "partner", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.ManyToOne)(() => __1.Master, (master) => master.verifyLocals, {
|
|
38
|
+
onDelete: "RESTRICT",
|
|
39
|
+
onUpdate: "NO ACTION",
|
|
40
|
+
}),
|
|
41
|
+
(0, typeorm_1.JoinColumn)({ name: "assigned_master" }),
|
|
42
|
+
__metadata("design:type", __1.Master)
|
|
43
|
+
], VerifyLocal.prototype, "assigned_master", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({
|
|
46
|
+
type: "longtext",
|
|
47
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
48
|
+
comment: "Campos que el usuario (partner) agrega al nuevo local.",
|
|
49
|
+
}),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], VerifyLocal.prototype, "local_information", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({
|
|
54
|
+
type: "longtext",
|
|
55
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
56
|
+
comment: "Estructura de paso información básica.",
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], VerifyLocal.prototype, "basic_information", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({
|
|
62
|
+
type: "longtext",
|
|
63
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
64
|
+
nullable: true,
|
|
65
|
+
default: null,
|
|
66
|
+
comment: "Estructura de paso configuración.",
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], VerifyLocal.prototype, "settings", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({
|
|
72
|
+
type: "longtext",
|
|
73
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
74
|
+
nullable: true,
|
|
75
|
+
default: null,
|
|
76
|
+
comment: "Estructura de paso horarios de atención.",
|
|
77
|
+
}),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], VerifyLocal.prototype, "opening_hours", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({
|
|
82
|
+
type: "longtext",
|
|
83
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
84
|
+
comment: "Estructura de paso terminales y usuarios.",
|
|
85
|
+
}),
|
|
86
|
+
__metadata("design:type", Object)
|
|
87
|
+
], VerifyLocal.prototype, "terminal_users", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({
|
|
90
|
+
type: "longtext",
|
|
91
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
92
|
+
comment: "Estructura de paso terminales y usuarios.",
|
|
93
|
+
}),
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
|
+
], VerifyLocal.prototype, "terminals", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.Column)({
|
|
98
|
+
type: "text",
|
|
99
|
+
nullable: true,
|
|
100
|
+
default: null,
|
|
101
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
102
|
+
comment: "Información adicional del local para su verificación.",
|
|
103
|
+
}),
|
|
104
|
+
__metadata("design:type", Object)
|
|
105
|
+
], VerifyLocal.prototype, "details", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, typeorm_1.Column)({
|
|
108
|
+
type: "datetime",
|
|
109
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
110
|
+
comment: "Fecha de creación del registro.",
|
|
111
|
+
}),
|
|
112
|
+
__metadata("design:type", Date)
|
|
113
|
+
], VerifyLocal.prototype, "created", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, typeorm_1.Column)({
|
|
116
|
+
type: "datetime",
|
|
117
|
+
nullable: true,
|
|
118
|
+
default: null,
|
|
119
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
120
|
+
comment: "Fecha de verificación del registro.",
|
|
121
|
+
}),
|
|
122
|
+
__metadata("design:type", Object)
|
|
123
|
+
], VerifyLocal.prototype, "verification_date", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, typeorm_1.Column)({
|
|
126
|
+
type: "datetime",
|
|
127
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
128
|
+
comment: "Fecha de actualización de los nuevos cambios del registro.",
|
|
129
|
+
}),
|
|
130
|
+
__metadata("design:type", Date)
|
|
131
|
+
], VerifyLocal.prototype, "update_partner", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, typeorm_1.Column)({
|
|
134
|
+
default: 1,
|
|
135
|
+
type: "int",
|
|
136
|
+
width: 1,
|
|
137
|
+
comment: "Este campo hace referencia al estado que tiene la verificación del local, es decir:\r\n1. Pendiente de verificación (Pending verification): Este estado hace referencia a que el usuario ya creó el local y lo mandó a verificación, entonces, le queda al master validar y aprobar o rechazar.\r\n\r\n2. Rechazado (Rejected): Hace referencia a que el master verificó y por alguna razón rechazó la información de la creación del local.\r\n\r\n3. Aprobado (approved): Hace referencia a que la información y se procede a la realización del pago (Si hay un plan, no debería hacer el pago, eso es automático).",
|
|
138
|
+
}),
|
|
139
|
+
__metadata("design:type", Number)
|
|
140
|
+
], VerifyLocal.prototype, "status", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
(0, typeorm_1.Column)({
|
|
143
|
+
default: 1,
|
|
144
|
+
type: "int",
|
|
145
|
+
width: 1,
|
|
146
|
+
comment: "Visible al usuario: 1 El registro es visto por el administrador en los locales verificados.0 El registro no es visto para el administrador y pasa a la papelera de reciclaje",
|
|
147
|
+
}),
|
|
148
|
+
__metadata("design:type", Number)
|
|
149
|
+
], VerifyLocal.prototype, "visible", void 0);
|
|
150
|
+
exports.VerifyLocal = VerifyLocal = __decorate([
|
|
151
|
+
(0, typeorm_1.Entity)({
|
|
152
|
+
name: "verify_local",
|
|
153
|
+
comment: "Tabla creada para almacenar la información del local que el administrador (partner) ingrese para su aprobación.",
|
|
154
|
+
})
|
|
155
|
+
], VerifyLocal);
|
|
@@ -10,124 +10,121 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ProductGroupComplement = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
23
|
-
type: "int",
|
|
24
|
-
comment: "Número de identificación (ID) único de cada registro.",
|
|
25
|
-
}),
|
|
26
|
-
__metadata("design:type", Number)
|
|
27
|
-
], ProductGroupComplement.prototype, "id", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, typeorm_1.ManyToOne)(function () { return ProductGroup_1.ProductGroup; }, function (productGroup) { return productGroup.groups_complement; }, {
|
|
30
|
-
onDelete: "CASCADE",
|
|
31
|
-
onUpdate: "NO ACTION",
|
|
32
|
-
}),
|
|
33
|
-
(0, typeorm_1.JoinColumn)({ name: "group_id" }),
|
|
34
|
-
__metadata("design:type", ProductGroup_1.ProductGroup)
|
|
35
|
-
], ProductGroupComplement.prototype, "group_id", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)({ length: 30, type: "varchar", comment: "Nombre del complemento." }),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], ProductGroupComplement.prototype, "name", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.ToppingImage; }, function (toppingImage) { return toppingImage.topping_images; }, {
|
|
42
|
-
onDelete: "RESTRICT",
|
|
43
|
-
onUpdate: "NO ACTION",
|
|
44
|
-
}),
|
|
45
|
-
(0, typeorm_1.JoinColumn)({ name: "image" }),
|
|
46
|
-
__metadata("design:type", __1.ToppingImage)
|
|
47
|
-
], ProductGroupComplement.prototype, "image", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typeorm_1.Column)({
|
|
50
|
-
length: 20,
|
|
51
|
-
type: "varchar",
|
|
52
|
-
nullable: true,
|
|
53
|
-
default: null,
|
|
54
|
-
comment: "Precio del complemento.",
|
|
55
|
-
}),
|
|
56
|
-
__metadata("design:type", Object)
|
|
57
|
-
], ProductGroupComplement.prototype, "price", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, typeorm_1.Column)({
|
|
60
|
-
nullable: true,
|
|
61
|
-
type: "int",
|
|
62
|
-
default: null,
|
|
63
|
-
comment: "Límite máximo para poder agregar el complement (topping) al producto.",
|
|
64
|
-
}),
|
|
65
|
-
__metadata("design:type", Object)
|
|
66
|
-
], ProductGroupComplement.prototype, "maximum_limit", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, typeorm_1.Column)({
|
|
69
|
-
type: "int",
|
|
70
|
-
comment: "El orden en que aparece los grupos en el producto.",
|
|
71
|
-
}),
|
|
72
|
-
__metadata("design:type", Number)
|
|
73
|
-
], ProductGroupComplement.prototype, "position", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, typeorm_1.Column)({
|
|
76
|
-
type: "mediumtext",
|
|
77
|
-
nullable: true,
|
|
78
|
-
default: null,
|
|
79
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
80
|
-
comment: "Valores qué se van a mostrar mientras se aprueban los nuevos cambios.",
|
|
81
|
-
}),
|
|
82
|
-
__metadata("design:type", Object)
|
|
83
|
-
], ProductGroupComplement.prototype, "current_values", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
(0, typeorm_1.Column)({
|
|
86
|
-
default: 1,
|
|
87
|
-
type: "int",
|
|
88
|
-
width: 1,
|
|
89
|
-
comment: "Estado en el que está el elemento: \n0. Inactivo. \n1. Activo. \n2. Eliminado.",
|
|
90
|
-
}),
|
|
91
|
-
__metadata("design:type", Number)
|
|
92
|
-
], ProductGroupComplement.prototype, "status", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, typeorm_1.Column)({
|
|
95
|
-
type: "text",
|
|
96
|
-
nullable: true,
|
|
97
|
-
default: null,
|
|
98
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
99
|
-
comment: "Cuando un complemento se inactiva, existe la opción de hacerlo por:\r\n1. Un solo día: El elemento no estará disponible hasta las 00:00 del siguiente día (Se guarda un elemento de tipo fecha).\r\n2. Fecha personalizada: Se puede escoger la fecha en la que el elemento estará activo (Se guarda un elemento de tipo fecha).\r\n3. Indefinidamente: El elemento estará inactivo hasta que se vuelva a activar (El campo inactive_until estará vacío).",
|
|
100
|
-
}),
|
|
101
|
-
__metadata("design:type", Object)
|
|
102
|
-
], ProductGroupComplement.prototype, "inactive_until", void 0);
|
|
103
|
-
__decorate([
|
|
104
|
-
(0, typeorm_1.Column)({
|
|
105
|
-
default: 1,
|
|
106
|
-
type: "int",
|
|
107
|
-
width: 1,
|
|
108
|
-
comment: "Estado en el que se encuentra la revisión de los cambios: \n1. En revisión. \n2. Rechazado.",
|
|
109
|
-
}),
|
|
110
|
-
__metadata("design:type", Number)
|
|
111
|
-
], ProductGroupComplement.prototype, "status_review", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
(0, typeorm_1.Column)({
|
|
114
|
-
nullable: true,
|
|
115
|
-
default: null,
|
|
116
|
-
type: "varchar",
|
|
117
|
-
length: 600,
|
|
118
|
-
comment: "Comentarios u observaciones de la revisión.",
|
|
119
|
-
}),
|
|
120
|
-
__metadata("design:type", Object)
|
|
121
|
-
], ProductGroupComplement.prototype, "review_comment", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
(0, typeorm_1.OneToMany)(function () { return RequestProductGroupComplement_1.RequestProductGroupComplement; }, function (requestProduct) { return requestProduct.product_group_complement; }),
|
|
124
|
-
__metadata("design:type", Array)
|
|
125
|
-
], ProductGroupComplement.prototype, "request_product_group_complements", void 0);
|
|
126
|
-
ProductGroupComplement = __decorate([
|
|
127
|
-
(0, typeorm_1.Entity)("product_group_complement", {
|
|
128
|
-
comment: "Los complementos que tiene el grupo de un producto (product_group_complement).",
|
|
129
|
-
})
|
|
130
|
-
], ProductGroupComplement);
|
|
131
|
-
return ProductGroupComplement;
|
|
132
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
const jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
16
|
+
const ProductGroup_1 = require("./ProductGroup");
|
|
17
|
+
const RequestProductGroupComplement_1 = require("./RequestProductGroupComplement");
|
|
18
|
+
let ProductGroupComplement = class ProductGroupComplement {
|
|
19
|
+
};
|
|
133
20
|
exports.ProductGroupComplement = ProductGroupComplement;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
23
|
+
type: "int",
|
|
24
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
25
|
+
}),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], ProductGroupComplement.prototype, "id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(() => ProductGroup_1.ProductGroup, (productGroup) => productGroup.groups_complement, {
|
|
30
|
+
onDelete: "CASCADE",
|
|
31
|
+
onUpdate: "NO ACTION",
|
|
32
|
+
}),
|
|
33
|
+
(0, typeorm_1.JoinColumn)({ name: "group_id" }),
|
|
34
|
+
__metadata("design:type", ProductGroup_1.ProductGroup)
|
|
35
|
+
], ProductGroupComplement.prototype, "group_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ length: 30, type: "varchar", comment: "Nombre del complemento." }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], ProductGroupComplement.prototype, "name", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.ManyToOne)(() => __1.ToppingImage, (toppingImage) => toppingImage.topping_images, {
|
|
42
|
+
onDelete: "RESTRICT",
|
|
43
|
+
onUpdate: "NO ACTION",
|
|
44
|
+
}),
|
|
45
|
+
(0, typeorm_1.JoinColumn)({ name: "image" }),
|
|
46
|
+
__metadata("design:type", __1.ToppingImage)
|
|
47
|
+
], ProductGroupComplement.prototype, "image", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({
|
|
50
|
+
length: 20,
|
|
51
|
+
type: "varchar",
|
|
52
|
+
nullable: true,
|
|
53
|
+
default: null,
|
|
54
|
+
comment: "Precio del complemento.",
|
|
55
|
+
}),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], ProductGroupComplement.prototype, "price", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({
|
|
60
|
+
nullable: true,
|
|
61
|
+
type: "int",
|
|
62
|
+
default: null,
|
|
63
|
+
comment: "Límite máximo para poder agregar el complement (topping) al producto.",
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], ProductGroupComplement.prototype, "maximum_limit", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({
|
|
69
|
+
type: "int",
|
|
70
|
+
comment: "El orden en que aparece los grupos en el producto.",
|
|
71
|
+
}),
|
|
72
|
+
__metadata("design:type", Number)
|
|
73
|
+
], ProductGroupComplement.prototype, "position", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({
|
|
76
|
+
type: "mediumtext",
|
|
77
|
+
nullable: true,
|
|
78
|
+
default: null,
|
|
79
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
80
|
+
comment: "Valores qué se van a mostrar mientras se aprueban los nuevos cambios.",
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], ProductGroupComplement.prototype, "current_values", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({
|
|
86
|
+
default: 1,
|
|
87
|
+
type: "int",
|
|
88
|
+
width: 1,
|
|
89
|
+
comment: "Estado en el que está el elemento: \n0. Inactivo. \n1. Activo. \n2. Eliminado.",
|
|
90
|
+
}),
|
|
91
|
+
__metadata("design:type", Number)
|
|
92
|
+
], ProductGroupComplement.prototype, "status", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({
|
|
95
|
+
type: "text",
|
|
96
|
+
nullable: true,
|
|
97
|
+
default: null,
|
|
98
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
99
|
+
comment: "Cuando un complemento se inactiva, existe la opción de hacerlo por:\r\n1. Un solo día: El elemento no estará disponible hasta las 00:00 del siguiente día (Se guarda un elemento de tipo fecha).\r\n2. Fecha personalizada: Se puede escoger la fecha en la que el elemento estará activo (Se guarda un elemento de tipo fecha).\r\n3. Indefinidamente: El elemento estará inactivo hasta que se vuelva a activar (El campo inactive_until estará vacío).",
|
|
100
|
+
}),
|
|
101
|
+
__metadata("design:type", Object)
|
|
102
|
+
], ProductGroupComplement.prototype, "inactive_until", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.Column)({
|
|
105
|
+
default: 1,
|
|
106
|
+
type: "int",
|
|
107
|
+
width: 1,
|
|
108
|
+
comment: "Estado en el que se encuentra la revisión de los cambios: \n1. En revisión. \n2. Rechazado.",
|
|
109
|
+
}),
|
|
110
|
+
__metadata("design:type", Number)
|
|
111
|
+
], ProductGroupComplement.prototype, "status_review", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, typeorm_1.Column)({
|
|
114
|
+
nullable: true,
|
|
115
|
+
default: null,
|
|
116
|
+
type: "varchar",
|
|
117
|
+
length: 600,
|
|
118
|
+
comment: "Comentarios u observaciones de la revisión.",
|
|
119
|
+
}),
|
|
120
|
+
__metadata("design:type", Object)
|
|
121
|
+
], ProductGroupComplement.prototype, "review_comment", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, typeorm_1.OneToMany)(() => RequestProductGroupComplement_1.RequestProductGroupComplement, (requestProduct) => requestProduct.product_group_complement),
|
|
124
|
+
__metadata("design:type", Array)
|
|
125
|
+
], ProductGroupComplement.prototype, "request_product_group_complements", void 0);
|
|
126
|
+
exports.ProductGroupComplement = ProductGroupComplement = __decorate([
|
|
127
|
+
(0, typeorm_1.Entity)("product_group_complement", {
|
|
128
|
+
comment: "Los complementos que tiene el grupo de un producto (product_group_complement).",
|
|
129
|
+
})
|
|
130
|
+
], ProductGroupComplement);
|