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,191 +10,188 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ReceiptConfig = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
22
|
-
type: "int",
|
|
23
|
-
comment: "ID único de cada registro.",
|
|
24
|
-
}),
|
|
25
|
-
__metadata("design:type", Number)
|
|
26
|
-
], ReceiptConfig.prototype, "id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.Company; }, function (company) { return company.receipts_company_config; }, {
|
|
29
|
-
onDelete: "CASCADE",
|
|
30
|
-
onUpdate: "NO ACTION",
|
|
31
|
-
nullable: true,
|
|
32
|
-
}),
|
|
33
|
-
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
34
|
-
__metadata("design:type", Object)
|
|
35
|
-
], ReceiptConfig.prototype, "company", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.Local; }, function (local) { return local.receipts_local_config; }, {
|
|
38
|
-
onDelete: "CASCADE",
|
|
39
|
-
onUpdate: "NO ACTION",
|
|
40
|
-
nullable: true,
|
|
41
|
-
}),
|
|
42
|
-
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
43
|
-
__metadata("design:type", Object)
|
|
44
|
-
], ReceiptConfig.prototype, "local", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({
|
|
47
|
-
default: 1,
|
|
48
|
-
type: "int",
|
|
49
|
-
width: 1,
|
|
50
|
-
comment: "Para saber sí mostramos el logo en la factura:\r\n0: No.\r\n1: Sí.",
|
|
51
|
-
}),
|
|
52
|
-
__metadata("design:type", Number)
|
|
53
|
-
], ReceiptConfig.prototype, "is_logo", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, typeorm_1.Column)({
|
|
56
|
-
default: 1,
|
|
57
|
-
type: "int",
|
|
58
|
-
nullable: true,
|
|
59
|
-
width: 1,
|
|
60
|
-
comment: "Columna para saber si el logo va a ir redondeado o no:\r\n1. Redondeado.\r\n2. Cuadrado.",
|
|
61
|
-
}),
|
|
62
|
-
__metadata("design:type", Object)
|
|
63
|
-
], ReceiptConfig.prototype, "logo_type", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, typeorm_1.Column)({
|
|
66
|
-
default: 1,
|
|
67
|
-
type: "int",
|
|
68
|
-
width: 1,
|
|
69
|
-
comment: "Para saber sí mostramos la dirección del restaurante:\r\n0: No.\r\n1: Sí.",
|
|
70
|
-
}),
|
|
71
|
-
__metadata("design:type", Number)
|
|
72
|
-
], ReceiptConfig.prototype, "is_address", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, typeorm_1.Column)({
|
|
75
|
-
default: 1,
|
|
76
|
-
type: "int",
|
|
77
|
-
width: 1,
|
|
78
|
-
comment: "Para saber sí mostramos la el número de teléfono del restaurante:\r\n0: No.\r\n1: Sí.",
|
|
79
|
-
}),
|
|
80
|
-
__metadata("design:type", Number)
|
|
81
|
-
], ReceiptConfig.prototype, "is_phone", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, typeorm_1.Column)({
|
|
84
|
-
length: 50,
|
|
85
|
-
type: "varchar",
|
|
86
|
-
default: "yyyy-mm-dd hh:mm:ss",
|
|
87
|
-
comment: "Formato de la fecha que se va a mostrar. Este formato viene de la interfaz TFormatTypeDate que está en utils.ts",
|
|
88
|
-
}),
|
|
89
|
-
__metadata("design:type", String)
|
|
90
|
-
], ReceiptConfig.prototype, "format_date", void 0);
|
|
91
|
-
__decorate([
|
|
92
|
-
(0, typeorm_1.Column)({
|
|
93
|
-
length: 4,
|
|
94
|
-
type: "varchar",
|
|
95
|
-
default: "80mm",
|
|
96
|
-
comment: "Tamaño que va a tener la impresión de facturas:\r\n1: 80mm.\r\n2: 58mm.",
|
|
97
|
-
}),
|
|
98
|
-
__metadata("design:type", String)
|
|
99
|
-
], ReceiptConfig.prototype, "ticket_width_mm", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
(0, typeorm_1.Column)({
|
|
102
|
-
default: 1,
|
|
103
|
-
type: "int",
|
|
104
|
-
width: 1,
|
|
105
|
-
comment: "Mostrar información del usuario que recibe el pago y entrega las cuentas:\r\n1: Sí.\r\n0: No.",
|
|
106
|
-
}),
|
|
107
|
-
__metadata("design:type", Number)
|
|
108
|
-
], ReceiptConfig.prototype, "is_show_user_box", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
(0, typeorm_1.Column)({
|
|
111
|
-
default: 1,
|
|
112
|
-
type: "int",
|
|
113
|
-
width: 1,
|
|
114
|
-
comment: "Mostrar el precio unitario de los productos:\r\n1: Sí.\r\n0: No.",
|
|
115
|
-
}),
|
|
116
|
-
__metadata("design:type", Number)
|
|
117
|
-
], ReceiptConfig.prototype, "is_show_unit_price", void 0);
|
|
118
|
-
__decorate([
|
|
119
|
-
(0, typeorm_1.Column)({
|
|
120
|
-
default: 1,
|
|
121
|
-
type: "int",
|
|
122
|
-
width: 1,
|
|
123
|
-
comment: "Dividir en columnas separadas el nombre y la cantidad del producto:\r\n1: Sí.\r\n0: No.",
|
|
124
|
-
}),
|
|
125
|
-
__metadata("design:type", Number)
|
|
126
|
-
], ReceiptConfig.prototype, "is_divide_name_and_quantity", void 0);
|
|
127
|
-
__decorate([
|
|
128
|
-
(0, typeorm_1.Column)({
|
|
129
|
-
type: "text",
|
|
130
|
-
nullable: true,
|
|
131
|
-
default: null,
|
|
132
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
133
|
-
comment: "Comentarios a mostrar en la factura, esto será un elemento de tipo html por si el usuario lo quiere personalizar.",
|
|
134
|
-
}),
|
|
135
|
-
__metadata("design:type", Object)
|
|
136
|
-
], ReceiptConfig.prototype, "custom_message_below", void 0);
|
|
137
|
-
__decorate([
|
|
138
|
-
(0, typeorm_1.Column)({
|
|
139
|
-
type: "text",
|
|
140
|
-
nullable: true,
|
|
141
|
-
default: null,
|
|
142
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
143
|
-
comment: "Comentarios a mostrar en la factura, esto será un elemento de tipo html por si el usuario lo quiere personalizar.",
|
|
144
|
-
}),
|
|
145
|
-
__metadata("design:type", Object)
|
|
146
|
-
], ReceiptConfig.prototype, "custom_message_top", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
(0, typeorm_1.Column)({
|
|
149
|
-
type: "mediumtext",
|
|
150
|
-
nullable: true,
|
|
151
|
-
default: null,
|
|
152
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
153
|
-
comment: "Columna creada por si se necesitan agregar más elementos adicionales para personalizar la factura.",
|
|
154
|
-
}),
|
|
155
|
-
__metadata("design:type", Object)
|
|
156
|
-
], ReceiptConfig.prototype, "details", void 0);
|
|
157
|
-
__decorate([
|
|
158
|
-
(0, typeorm_1.Column)({
|
|
159
|
-
type: "datetime",
|
|
160
|
-
comment: "Fecha de creación del registro.",
|
|
161
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
162
|
-
}),
|
|
163
|
-
__metadata("design:type", Date)
|
|
164
|
-
], ReceiptConfig.prototype, "created", void 0);
|
|
165
|
-
__decorate([
|
|
166
|
-
(0, typeorm_1.Column)({
|
|
167
|
-
type: "datetime",
|
|
168
|
-
nullable: true,
|
|
169
|
-
default: null,
|
|
170
|
-
comment: "Fecha de actualización del registro.",
|
|
171
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
172
|
-
}),
|
|
173
|
-
__metadata("design:type", Object)
|
|
174
|
-
], ReceiptConfig.prototype, "updated", void 0);
|
|
175
|
-
__decorate([
|
|
176
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.User; }, function (user) { return user.receipts_user_config; }, {
|
|
177
|
-
onDelete: "NO ACTION",
|
|
178
|
-
onUpdate: "NO ACTION",
|
|
179
|
-
}),
|
|
180
|
-
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
181
|
-
__metadata("design:type", __1.User)
|
|
182
|
-
], ReceiptConfig.prototype, "updated_by", void 0);
|
|
183
|
-
__decorate([
|
|
184
|
-
(0, typeorm_1.Column)({
|
|
185
|
-
default: 1,
|
|
186
|
-
type: "int",
|
|
187
|
-
width: 1,
|
|
188
|
-
comment: "Estado en el que se encuentra el registro:\r\n0: Inactivo.\r\n1: Activo.",
|
|
189
|
-
}),
|
|
190
|
-
__metadata("design:type", Number)
|
|
191
|
-
], ReceiptConfig.prototype, "status", void 0);
|
|
192
|
-
ReceiptConfig = __decorate([
|
|
193
|
-
(0, typeorm_1.Entity)({
|
|
194
|
-
comment: "Personalización de las facturas de los pedidos para los restaurantes/empresas.",
|
|
195
|
-
name: "receipt_config",
|
|
196
|
-
})
|
|
197
|
-
], ReceiptConfig);
|
|
198
|
-
return ReceiptConfig;
|
|
199
|
-
}());
|
|
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
|
+
let ReceiptConfig = class ReceiptConfig {
|
|
18
|
+
};
|
|
200
19
|
exports.ReceiptConfig = ReceiptConfig;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
22
|
+
type: "int",
|
|
23
|
+
comment: "ID único de cada registro.",
|
|
24
|
+
}),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], ReceiptConfig.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.ManyToOne)(() => __1.Company, (company) => company.receipts_company_config, {
|
|
29
|
+
onDelete: "CASCADE",
|
|
30
|
+
onUpdate: "NO ACTION",
|
|
31
|
+
nullable: true,
|
|
32
|
+
}),
|
|
33
|
+
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], ReceiptConfig.prototype, "company", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.ManyToOne)(() => __1.Local, (local) => local.receipts_local_config, {
|
|
38
|
+
onDelete: "CASCADE",
|
|
39
|
+
onUpdate: "NO ACTION",
|
|
40
|
+
nullable: true,
|
|
41
|
+
}),
|
|
42
|
+
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], ReceiptConfig.prototype, "local", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({
|
|
47
|
+
default: 1,
|
|
48
|
+
type: "int",
|
|
49
|
+
width: 1,
|
|
50
|
+
comment: "Para saber sí mostramos el logo en la factura:\r\n0: No.\r\n1: Sí.",
|
|
51
|
+
}),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], ReceiptConfig.prototype, "is_logo", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({
|
|
56
|
+
default: 1,
|
|
57
|
+
type: "int",
|
|
58
|
+
nullable: true,
|
|
59
|
+
width: 1,
|
|
60
|
+
comment: "Columna para saber si el logo va a ir redondeado o no:\r\n1. Redondeado.\r\n2. Cuadrado.",
|
|
61
|
+
}),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], ReceiptConfig.prototype, "logo_type", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({
|
|
66
|
+
default: 1,
|
|
67
|
+
type: "int",
|
|
68
|
+
width: 1,
|
|
69
|
+
comment: "Para saber sí mostramos la dirección del restaurante:\r\n0: No.\r\n1: Sí.",
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", Number)
|
|
72
|
+
], ReceiptConfig.prototype, "is_address", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({
|
|
75
|
+
default: 1,
|
|
76
|
+
type: "int",
|
|
77
|
+
width: 1,
|
|
78
|
+
comment: "Para saber sí mostramos la el número de teléfono del restaurante:\r\n0: No.\r\n1: Sí.",
|
|
79
|
+
}),
|
|
80
|
+
__metadata("design:type", Number)
|
|
81
|
+
], ReceiptConfig.prototype, "is_phone", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({
|
|
84
|
+
length: 50,
|
|
85
|
+
type: "varchar",
|
|
86
|
+
default: "yyyy-mm-dd hh:mm:ss",
|
|
87
|
+
comment: "Formato de la fecha que se va a mostrar. Este formato viene de la interfaz TFormatTypeDate que está en utils.ts",
|
|
88
|
+
}),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], ReceiptConfig.prototype, "format_date", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({
|
|
93
|
+
length: 4,
|
|
94
|
+
type: "varchar",
|
|
95
|
+
default: "80mm",
|
|
96
|
+
comment: "Tamaño que va a tener la impresión de facturas:\r\n1: 80mm.\r\n2: 58mm.",
|
|
97
|
+
}),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], ReceiptConfig.prototype, "ticket_width_mm", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({
|
|
102
|
+
default: 1,
|
|
103
|
+
type: "int",
|
|
104
|
+
width: 1,
|
|
105
|
+
comment: "Mostrar información del usuario que recibe el pago y entrega las cuentas:\r\n1: Sí.\r\n0: No.",
|
|
106
|
+
}),
|
|
107
|
+
__metadata("design:type", Number)
|
|
108
|
+
], ReceiptConfig.prototype, "is_show_user_box", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.Column)({
|
|
111
|
+
default: 1,
|
|
112
|
+
type: "int",
|
|
113
|
+
width: 1,
|
|
114
|
+
comment: "Mostrar el precio unitario de los productos:\r\n1: Sí.\r\n0: No.",
|
|
115
|
+
}),
|
|
116
|
+
__metadata("design:type", Number)
|
|
117
|
+
], ReceiptConfig.prototype, "is_show_unit_price", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, typeorm_1.Column)({
|
|
120
|
+
default: 1,
|
|
121
|
+
type: "int",
|
|
122
|
+
width: 1,
|
|
123
|
+
comment: "Dividir en columnas separadas el nombre y la cantidad del producto:\r\n1: Sí.\r\n0: No.",
|
|
124
|
+
}),
|
|
125
|
+
__metadata("design:type", Number)
|
|
126
|
+
], ReceiptConfig.prototype, "is_divide_name_and_quantity", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, typeorm_1.Column)({
|
|
129
|
+
type: "text",
|
|
130
|
+
nullable: true,
|
|
131
|
+
default: null,
|
|
132
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
133
|
+
comment: "Comentarios a mostrar en la factura, esto será un elemento de tipo html por si el usuario lo quiere personalizar.",
|
|
134
|
+
}),
|
|
135
|
+
__metadata("design:type", Object)
|
|
136
|
+
], ReceiptConfig.prototype, "custom_message_below", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, typeorm_1.Column)({
|
|
139
|
+
type: "text",
|
|
140
|
+
nullable: true,
|
|
141
|
+
default: null,
|
|
142
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
143
|
+
comment: "Comentarios a mostrar en la factura, esto será un elemento de tipo html por si el usuario lo quiere personalizar.",
|
|
144
|
+
}),
|
|
145
|
+
__metadata("design:type", Object)
|
|
146
|
+
], ReceiptConfig.prototype, "custom_message_top", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, typeorm_1.Column)({
|
|
149
|
+
type: "mediumtext",
|
|
150
|
+
nullable: true,
|
|
151
|
+
default: null,
|
|
152
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
153
|
+
comment: "Columna creada por si se necesitan agregar más elementos adicionales para personalizar la factura.",
|
|
154
|
+
}),
|
|
155
|
+
__metadata("design:type", Object)
|
|
156
|
+
], ReceiptConfig.prototype, "details", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, typeorm_1.Column)({
|
|
159
|
+
type: "datetime",
|
|
160
|
+
comment: "Fecha de creación del registro.",
|
|
161
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
162
|
+
}),
|
|
163
|
+
__metadata("design:type", Date)
|
|
164
|
+
], ReceiptConfig.prototype, "created", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
(0, typeorm_1.Column)({
|
|
167
|
+
type: "datetime",
|
|
168
|
+
nullable: true,
|
|
169
|
+
default: null,
|
|
170
|
+
comment: "Fecha de actualización del registro.",
|
|
171
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
172
|
+
}),
|
|
173
|
+
__metadata("design:type", Object)
|
|
174
|
+
], ReceiptConfig.prototype, "updated", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, typeorm_1.ManyToOne)(() => __1.User, (user) => user.receipts_user_config, {
|
|
177
|
+
onDelete: "NO ACTION",
|
|
178
|
+
onUpdate: "NO ACTION",
|
|
179
|
+
}),
|
|
180
|
+
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
181
|
+
__metadata("design:type", __1.User)
|
|
182
|
+
], ReceiptConfig.prototype, "updated_by", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
(0, typeorm_1.Column)({
|
|
185
|
+
default: 1,
|
|
186
|
+
type: "int",
|
|
187
|
+
width: 1,
|
|
188
|
+
comment: "Estado en el que se encuentra el registro:\r\n0: Inactivo.\r\n1: Activo.",
|
|
189
|
+
}),
|
|
190
|
+
__metadata("design:type", Number)
|
|
191
|
+
], ReceiptConfig.prototype, "status", void 0);
|
|
192
|
+
exports.ReceiptConfig = ReceiptConfig = __decorate([
|
|
193
|
+
(0, typeorm_1.Entity)({
|
|
194
|
+
comment: "Personalización de las facturas de los pedidos para los restaurantes/empresas.",
|
|
195
|
+
name: "receipt_config",
|
|
196
|
+
})
|
|
197
|
+
], ReceiptConfig);
|
package/dist/entities/Region.js
CHANGED
|
@@ -10,53 +10,50 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Region = 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
|
-
], Region.prototype, "id", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typeorm_1.ManyToOne)(function () { return Country_1.Country; }, function (country) { return country.regions; }, {
|
|
28
|
-
onDelete: "RESTRICT",
|
|
29
|
-
onUpdate: "NO ACTION",
|
|
30
|
-
}),
|
|
31
|
-
(0, typeorm_1.JoinColumn)({ name: "country" }),
|
|
32
|
-
__metadata("design:type", Country_1.Country)
|
|
33
|
-
], Region.prototype, "country", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.Column)({
|
|
36
|
-
length: 50,
|
|
37
|
-
type: "varchar",
|
|
38
|
-
comment: "Nombre de la región/departamento/estado.\r\n\r\nID/KEY de la variable que se encuentra en los archivos `locales` para el multilenguaje.",
|
|
39
|
-
}),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], Region.prototype, "name", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({
|
|
44
|
-
default: 1,
|
|
45
|
-
type: "int",
|
|
46
|
-
width: 1,
|
|
47
|
-
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
48
|
-
}),
|
|
49
|
-
__metadata("design:type", Number)
|
|
50
|
-
], Region.prototype, "status", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, typeorm_1.OneToMany)(function () { return City_1.City; }, function (city) { return city.region; }),
|
|
53
|
-
__metadata("design:type", Array)
|
|
54
|
-
], Region.prototype, "cities", void 0);
|
|
55
|
-
Region = __decorate([
|
|
56
|
-
(0, typeorm_1.Entity)({
|
|
57
|
-
comment: "Regiones/departamentos donde estará visible la plataforma.",
|
|
58
|
-
})
|
|
59
|
-
], Region);
|
|
60
|
-
return Region;
|
|
61
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const City_1 = require("./City");
|
|
15
|
+
const Country_1 = require("./Country");
|
|
16
|
+
let Region = class Region {
|
|
17
|
+
};
|
|
62
18
|
exports.Region = Region;
|
|
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
|
+
], Region.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.ManyToOne)(() => Country_1.Country, (country) => country.regions, {
|
|
28
|
+
onDelete: "RESTRICT",
|
|
29
|
+
onUpdate: "NO ACTION",
|
|
30
|
+
}),
|
|
31
|
+
(0, typeorm_1.JoinColumn)({ name: "country" }),
|
|
32
|
+
__metadata("design:type", Country_1.Country)
|
|
33
|
+
], Region.prototype, "country", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({
|
|
36
|
+
length: 50,
|
|
37
|
+
type: "varchar",
|
|
38
|
+
comment: "Nombre de la región/departamento/estado.\r\n\r\nID/KEY de la variable que se encuentra en los archivos `locales` para el multilenguaje.",
|
|
39
|
+
}),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], Region.prototype, "name", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({
|
|
44
|
+
default: 1,
|
|
45
|
+
type: "int",
|
|
46
|
+
width: 1,
|
|
47
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
48
|
+
}),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], Region.prototype, "status", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.OneToMany)(() => City_1.City, (city) => city.region),
|
|
53
|
+
__metadata("design:type", Array)
|
|
54
|
+
], Region.prototype, "cities", void 0);
|
|
55
|
+
exports.Region = Region = __decorate([
|
|
56
|
+
(0, typeorm_1.Entity)({
|
|
57
|
+
comment: "Regiones/departamentos donde estará visible la plataforma.",
|
|
58
|
+
})
|
|
59
|
+
], Region);
|