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
package/dist/entities/Local.js
CHANGED
|
@@ -10,246 +10,243 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Local = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
31
|
-
type: "int",
|
|
32
|
-
comment: "Número de identificación (ID) único de cada registro.",
|
|
33
|
-
}),
|
|
34
|
-
__metadata("design:type", Number)
|
|
35
|
-
], Local.prototype, "id", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.ManyToOne)(function () { return Company_1.Company; }, function (company) { return company.locals; }, {
|
|
38
|
-
onDelete: "CASCADE",
|
|
39
|
-
onUpdate: "NO ACTION",
|
|
40
|
-
}),
|
|
41
|
-
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
42
|
-
__metadata("design:type", Company_1.Company)
|
|
43
|
-
], Local.prototype, "company", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 100 }),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], Local.prototype, "name", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typeorm_1.ManyToOne)(function () { return City_1.City; }, function (city) { return city.locals; }, {
|
|
50
|
-
onDelete: "RESTRICT",
|
|
51
|
-
onUpdate: "NO ACTION",
|
|
52
|
-
}),
|
|
53
|
-
(0, typeorm_1.JoinColumn)({ name: "city" }),
|
|
54
|
-
__metadata("design:type", City_1.City)
|
|
55
|
-
], Local.prototype, "city", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, typeorm_1.Column)({ type: "varchar", length: 120 }),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], Local.prototype, "address", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 8 }),
|
|
62
|
-
__metadata("design:type", Number)
|
|
63
|
-
], Local.prototype, "latitude", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 8 }),
|
|
66
|
-
__metadata("design:type", Number)
|
|
67
|
-
], Local.prototype, "longitude", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, typeorm_1.Column)({
|
|
70
|
-
type: "longtext",
|
|
71
|
-
nullable: true,
|
|
72
|
-
default: null,
|
|
73
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
74
|
-
comment: "Campo de tipo JSON por si es necesario agregar información adicional",
|
|
75
|
-
}),
|
|
76
|
-
__metadata("design:type", Object)
|
|
77
|
-
], Local.prototype, "details", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, typeorm_1.Column)({ type: "datetime", transformer: new dateTransformer_1.DateTransformer() }),
|
|
80
|
-
__metadata("design:type", Date)
|
|
81
|
-
], Local.prototype, "created", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, typeorm_1.Column)({ type: "datetime", transformer: new dateTransformer_1.DateTransformer() }),
|
|
84
|
-
__metadata("design:type", Date)
|
|
85
|
-
], Local.prototype, "updated", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, typeorm_1.ManyToOne)(function () { return Partner_1.Partner; }, function (partner) { return partner.locals; }, {
|
|
88
|
-
onDelete: "NO ACTION",
|
|
89
|
-
onUpdate: "NO ACTION",
|
|
90
|
-
}),
|
|
91
|
-
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
92
|
-
__metadata("design:type", Partner_1.Partner)
|
|
93
|
-
], Local.prototype, "updated_by", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, typeorm_1.ManyToOne)(function () { return Square_1.Square; }, function (square) { return square.locals; }, {
|
|
96
|
-
onDelete: "RESTRICT",
|
|
97
|
-
onUpdate: "NO ACTION",
|
|
98
|
-
}),
|
|
99
|
-
(0, typeorm_1.JoinColumn)({ name: "square" }),
|
|
100
|
-
__metadata("design:type", Square_1.Square)
|
|
101
|
-
], Local.prototype, "square", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.PosSystem; }, function (posSystem) { return posSystem.locals_pos_system; }, {
|
|
104
|
-
onDelete: "RESTRICT",
|
|
105
|
-
onUpdate: "NO ACTION",
|
|
106
|
-
}),
|
|
107
|
-
(0, typeorm_1.JoinColumn)({ name: "pos_system" }),
|
|
108
|
-
__metadata("design:type", __1.PosSystem)
|
|
109
|
-
], Local.prototype, "pos_system", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
(0, typeorm_1.Column)({
|
|
112
|
-
type: "text",
|
|
113
|
-
nullable: true,
|
|
114
|
-
default: null,
|
|
115
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
116
|
-
comment: "Campo de tipo JSON por si es necesario agregar información adicional",
|
|
117
|
-
}),
|
|
118
|
-
__metadata("design:type", Object)
|
|
119
|
-
], Local.prototype, "pos_system_settings", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
(0, typeorm_1.Column)({
|
|
122
|
-
default: 1,
|
|
123
|
-
type: "int",
|
|
124
|
-
width: 1,
|
|
125
|
-
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
126
|
-
}),
|
|
127
|
-
__metadata("design:type", Number)
|
|
128
|
-
], Local.prototype, "status", void 0);
|
|
129
|
-
__decorate([
|
|
130
|
-
(0, typeorm_1.Column)({
|
|
131
|
-
default: 1,
|
|
132
|
-
type: "int",
|
|
133
|
-
width: 1,
|
|
134
|
-
comment: "Es el estado para verificar si se envía en la papelera o no.",
|
|
135
|
-
}),
|
|
136
|
-
__metadata("design:type", Number)
|
|
137
|
-
], Local.prototype, "visible", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
(0, typeorm_1.ManyToMany)(function () { return Partner_1.Partner; }, function (partner) { return partner.locals_partner; }),
|
|
140
|
-
(0, typeorm_1.JoinTable)({
|
|
141
|
-
name: "local_partner",
|
|
142
|
-
joinColumn: {
|
|
143
|
-
name: "local",
|
|
144
|
-
referencedColumnName: "id",
|
|
145
|
-
},
|
|
146
|
-
inverseJoinColumn: {
|
|
147
|
-
name: "partner",
|
|
148
|
-
referencedColumnName: "id",
|
|
149
|
-
},
|
|
150
|
-
}),
|
|
151
|
-
__metadata("design:type", Array)
|
|
152
|
-
], Local.prototype, "locals_partners", void 0);
|
|
153
|
-
__decorate([
|
|
154
|
-
(0, typeorm_1.OneToMany)(function () { return __1.RequestLocal; }, function (requestLocal) { return requestLocal.local; }),
|
|
155
|
-
__metadata("design:type", Array)
|
|
156
|
-
], Local.prototype, "requests_local", void 0);
|
|
157
|
-
__decorate([
|
|
158
|
-
(0, typeorm_1.OneToMany)(function () { return Category_1.Category; }, function (category) { return category.local; }),
|
|
159
|
-
__metadata("design:type", Array)
|
|
160
|
-
], Local.prototype, "categories", void 0);
|
|
161
|
-
__decorate([
|
|
162
|
-
(0, typeorm_1.ManyToMany)(function () { return PaymentMethod_1.PaymentMethod; }, function (paymentMethod) { return paymentMethod.locals; }),
|
|
163
|
-
(0, typeorm_1.JoinTable)({
|
|
164
|
-
name: "local_payment_method",
|
|
165
|
-
joinColumn: {
|
|
166
|
-
name: "local",
|
|
167
|
-
referencedColumnName: "id",
|
|
168
|
-
},
|
|
169
|
-
inverseJoinColumn: {
|
|
170
|
-
name: "payment_method",
|
|
171
|
-
referencedColumnName: "id",
|
|
172
|
-
},
|
|
173
|
-
}),
|
|
174
|
-
__metadata("design:type", Array)
|
|
175
|
-
], Local.prototype, "payment_methods", void 0);
|
|
176
|
-
__decorate([
|
|
177
|
-
(0, typeorm_1.OneToMany)(function () { return LocalQualification_1.LocalQualification; }, function (localQualification) { return localQualification.local; }),
|
|
178
|
-
__metadata("design:type", Array)
|
|
179
|
-
], Local.prototype, "qualifications", void 0);
|
|
180
|
-
__decorate([
|
|
181
|
-
(0, typeorm_1.ManyToMany)(function () { return User_1.User; }, function (user) { return user.user_favorite_locals; }),
|
|
182
|
-
(0, typeorm_1.JoinTable)({
|
|
183
|
-
name: "user_favorite_local",
|
|
184
|
-
joinColumn: {
|
|
185
|
-
name: "local",
|
|
186
|
-
referencedColumnName: "id",
|
|
187
|
-
},
|
|
188
|
-
inverseJoinColumn: {
|
|
189
|
-
name: "user",
|
|
190
|
-
referencedColumnName: "id",
|
|
191
|
-
},
|
|
192
|
-
}),
|
|
193
|
-
__metadata("design:type", Array)
|
|
194
|
-
], Local.prototype, "users_favorite_local", void 0);
|
|
195
|
-
__decorate([
|
|
196
|
-
(0, typeorm_1.ManyToMany)(function () { return BusinessTypeProduct_1.BusinessTypeProduct; }, function (businessTypeProduct) { return businessTypeProduct.business_type_products; }),
|
|
197
|
-
(0, typeorm_1.JoinTable)({
|
|
198
|
-
name: "business_type_product_local",
|
|
199
|
-
joinColumn: {
|
|
200
|
-
name: "local",
|
|
201
|
-
referencedColumnName: "id",
|
|
202
|
-
},
|
|
203
|
-
inverseJoinColumn: {
|
|
204
|
-
name: "business_type_product",
|
|
205
|
-
referencedColumnName: "id",
|
|
206
|
-
},
|
|
207
|
-
}),
|
|
208
|
-
__metadata("design:type", Array)
|
|
209
|
-
], Local.prototype, "business_type_products", void 0);
|
|
210
|
-
__decorate([
|
|
211
|
-
(0, typeorm_1.OneToMany)(function () { return __1.DiscountCodeUser; }, function (discountCodeUser) { return discountCodeUser.local; }),
|
|
212
|
-
__metadata("design:type", Array)
|
|
213
|
-
], Local.prototype, "discount_code_locals", void 0);
|
|
214
|
-
__decorate([
|
|
215
|
-
(0, typeorm_1.OneToMany)(function () { return __1.LocalPlan; }, function (localPlan) { return localPlan.local; }),
|
|
216
|
-
__metadata("design:type", Array)
|
|
217
|
-
], Local.prototype, "locals_plan", void 0);
|
|
218
|
-
__decorate([
|
|
219
|
-
(0, typeorm_1.OneToMany)(function () { return __1.ReceiptConfig; }, function (receiptConfig) { return receiptConfig.local; }),
|
|
220
|
-
__metadata("design:type", Array)
|
|
221
|
-
], Local.prototype, "receipts_local_config", void 0);
|
|
222
|
-
__decorate([
|
|
223
|
-
(0, typeorm_1.OneToMany)(function () { return __1.LocalTableZone; }, function (localTableZone) { return localTableZone.local; }),
|
|
224
|
-
__metadata("design:type", Array)
|
|
225
|
-
], Local.prototype, "local_table_zones", void 0);
|
|
226
|
-
__decorate([
|
|
227
|
-
(0, typeorm_1.OneToMany)(function () { return __1.LocalTable; }, function (localTable) { return localTable.local; }),
|
|
228
|
-
__metadata("design:type", Array)
|
|
229
|
-
], Local.prototype, "local_tables", void 0);
|
|
230
|
-
__decorate([
|
|
231
|
-
(0, typeorm_1.OneToMany)(function () { return __1.LocalDecorationReserve; }, function (localDecorationReserve) { return localDecorationReserve.local; }),
|
|
232
|
-
__metadata("design:type", Array)
|
|
233
|
-
], Local.prototype, "local_decorations_reserve", void 0);
|
|
234
|
-
__decorate([
|
|
235
|
-
(0, typeorm_1.OneToMany)(function () { return __1.LocalReserveStatus; }, function (localReserveStatus) { return localReserveStatus.local; }),
|
|
236
|
-
__metadata("design:type", Array)
|
|
237
|
-
], Local.prototype, "local_reserve_status", void 0);
|
|
238
|
-
__decorate([
|
|
239
|
-
(0, typeorm_1.OneToMany)(function () { return __1.RequestInvoice; }, function (requestInvoice) { return requestInvoice.local; }),
|
|
240
|
-
__metadata("design:type", Array)
|
|
241
|
-
], Local.prototype, "request_invoices", void 0);
|
|
242
|
-
__decorate([
|
|
243
|
-
(0, typeorm_1.OneToMany)(function () { return __1.Gallery; }, function (gallery) { return gallery.local; }),
|
|
244
|
-
__metadata("design:type", Array)
|
|
245
|
-
], Local.prototype, "galleries", void 0);
|
|
246
|
-
__decorate([
|
|
247
|
-
(0, typeorm_1.OneToMany)(function () { return __1.LocalPaymentMethod; }, function (localPaymentMethod) { return localPaymentMethod.local; }),
|
|
248
|
-
__metadata("design:type", Array)
|
|
249
|
-
], Local.prototype, "locals_payment_method", void 0);
|
|
250
|
-
Local = __decorate([
|
|
251
|
-
(0, typeorm_1.Entity)({ comment: "Locales disponibles de las empresas (company)." })
|
|
252
|
-
], Local);
|
|
253
|
-
return Local;
|
|
254
|
-
}());
|
|
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 BusinessTypeProduct_1 = require("./BusinessTypeProduct");
|
|
18
|
+
const Category_1 = require("./Category");
|
|
19
|
+
const City_1 = require("./City");
|
|
20
|
+
const Company_1 = require("./Company");
|
|
21
|
+
const LocalQualification_1 = require("./LocalQualification");
|
|
22
|
+
const Partner_1 = require("./Partner");
|
|
23
|
+
const PaymentMethod_1 = require("./PaymentMethod");
|
|
24
|
+
const Square_1 = require("./Square");
|
|
25
|
+
const User_1 = require("./User");
|
|
26
|
+
let Local = class Local {
|
|
27
|
+
};
|
|
255
28
|
exports.Local = Local;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
31
|
+
type: "int",
|
|
32
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
33
|
+
}),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], Local.prototype, "id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.ManyToOne)(() => Company_1.Company, (company) => company.locals, {
|
|
38
|
+
onDelete: "CASCADE",
|
|
39
|
+
onUpdate: "NO ACTION",
|
|
40
|
+
}),
|
|
41
|
+
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
42
|
+
__metadata("design:type", Company_1.Company)
|
|
43
|
+
], Local.prototype, "company", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100 }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], Local.prototype, "name", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.ManyToOne)(() => City_1.City, (city) => city.locals, {
|
|
50
|
+
onDelete: "RESTRICT",
|
|
51
|
+
onUpdate: "NO ACTION",
|
|
52
|
+
}),
|
|
53
|
+
(0, typeorm_1.JoinColumn)({ name: "city" }),
|
|
54
|
+
__metadata("design:type", City_1.City)
|
|
55
|
+
], Local.prototype, "city", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 120 }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], Local.prototype, "address", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 8 }),
|
|
62
|
+
__metadata("design:type", Number)
|
|
63
|
+
], Local.prototype, "latitude", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 8 }),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], Local.prototype, "longitude", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({
|
|
70
|
+
type: "longtext",
|
|
71
|
+
nullable: true,
|
|
72
|
+
default: null,
|
|
73
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
74
|
+
comment: "Campo de tipo JSON por si es necesario agregar información adicional",
|
|
75
|
+
}),
|
|
76
|
+
__metadata("design:type", Object)
|
|
77
|
+
], Local.prototype, "details", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ type: "datetime", transformer: new dateTransformer_1.DateTransformer() }),
|
|
80
|
+
__metadata("design:type", Date)
|
|
81
|
+
], Local.prototype, "created", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({ type: "datetime", transformer: new dateTransformer_1.DateTransformer() }),
|
|
84
|
+
__metadata("design:type", Date)
|
|
85
|
+
], Local.prototype, "updated", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, typeorm_1.ManyToOne)(() => Partner_1.Partner, (partner) => partner.locals, {
|
|
88
|
+
onDelete: "NO ACTION",
|
|
89
|
+
onUpdate: "NO ACTION",
|
|
90
|
+
}),
|
|
91
|
+
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
92
|
+
__metadata("design:type", Partner_1.Partner)
|
|
93
|
+
], Local.prototype, "updated_by", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, typeorm_1.ManyToOne)(() => Square_1.Square, (square) => square.locals, {
|
|
96
|
+
onDelete: "RESTRICT",
|
|
97
|
+
onUpdate: "NO ACTION",
|
|
98
|
+
}),
|
|
99
|
+
(0, typeorm_1.JoinColumn)({ name: "square" }),
|
|
100
|
+
__metadata("design:type", Square_1.Square)
|
|
101
|
+
], Local.prototype, "square", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, typeorm_1.ManyToOne)(() => __1.PosSystem, (posSystem) => posSystem.locals_pos_system, {
|
|
104
|
+
onDelete: "RESTRICT",
|
|
105
|
+
onUpdate: "NO ACTION",
|
|
106
|
+
}),
|
|
107
|
+
(0, typeorm_1.JoinColumn)({ name: "pos_system" }),
|
|
108
|
+
__metadata("design:type", __1.PosSystem)
|
|
109
|
+
], Local.prototype, "pos_system", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, typeorm_1.Column)({
|
|
112
|
+
type: "text",
|
|
113
|
+
nullable: true,
|
|
114
|
+
default: null,
|
|
115
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
116
|
+
comment: "Campo de tipo JSON por si es necesario agregar información adicional",
|
|
117
|
+
}),
|
|
118
|
+
__metadata("design:type", Object)
|
|
119
|
+
], Local.prototype, "pos_system_settings", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, typeorm_1.Column)({
|
|
122
|
+
default: 1,
|
|
123
|
+
type: "int",
|
|
124
|
+
width: 1,
|
|
125
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
126
|
+
}),
|
|
127
|
+
__metadata("design:type", Number)
|
|
128
|
+
], Local.prototype, "status", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, typeorm_1.Column)({
|
|
131
|
+
default: 1,
|
|
132
|
+
type: "int",
|
|
133
|
+
width: 1,
|
|
134
|
+
comment: "Es el estado para verificar si se envía en la papelera o no.",
|
|
135
|
+
}),
|
|
136
|
+
__metadata("design:type", Number)
|
|
137
|
+
], Local.prototype, "visible", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, typeorm_1.ManyToMany)(() => Partner_1.Partner, (partner) => partner.locals_partner),
|
|
140
|
+
(0, typeorm_1.JoinTable)({
|
|
141
|
+
name: "local_partner",
|
|
142
|
+
joinColumn: {
|
|
143
|
+
name: "local",
|
|
144
|
+
referencedColumnName: "id",
|
|
145
|
+
},
|
|
146
|
+
inverseJoinColumn: {
|
|
147
|
+
name: "partner",
|
|
148
|
+
referencedColumnName: "id",
|
|
149
|
+
},
|
|
150
|
+
}),
|
|
151
|
+
__metadata("design:type", Array)
|
|
152
|
+
], Local.prototype, "locals_partners", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, typeorm_1.OneToMany)(() => __1.RequestLocal, (requestLocal) => requestLocal.local),
|
|
155
|
+
__metadata("design:type", Array)
|
|
156
|
+
], Local.prototype, "requests_local", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, typeorm_1.OneToMany)(() => Category_1.Category, (category) => category.local),
|
|
159
|
+
__metadata("design:type", Array)
|
|
160
|
+
], Local.prototype, "categories", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
(0, typeorm_1.ManyToMany)(() => PaymentMethod_1.PaymentMethod, (paymentMethod) => paymentMethod.locals),
|
|
163
|
+
(0, typeorm_1.JoinTable)({
|
|
164
|
+
name: "local_payment_method",
|
|
165
|
+
joinColumn: {
|
|
166
|
+
name: "local",
|
|
167
|
+
referencedColumnName: "id",
|
|
168
|
+
},
|
|
169
|
+
inverseJoinColumn: {
|
|
170
|
+
name: "payment_method",
|
|
171
|
+
referencedColumnName: "id",
|
|
172
|
+
},
|
|
173
|
+
}),
|
|
174
|
+
__metadata("design:type", Array)
|
|
175
|
+
], Local.prototype, "payment_methods", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, typeorm_1.OneToMany)(() => LocalQualification_1.LocalQualification, (localQualification) => localQualification.local),
|
|
178
|
+
__metadata("design:type", Array)
|
|
179
|
+
], Local.prototype, "qualifications", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, typeorm_1.ManyToMany)(() => User_1.User, (user) => user.user_favorite_locals),
|
|
182
|
+
(0, typeorm_1.JoinTable)({
|
|
183
|
+
name: "user_favorite_local",
|
|
184
|
+
joinColumn: {
|
|
185
|
+
name: "local",
|
|
186
|
+
referencedColumnName: "id",
|
|
187
|
+
},
|
|
188
|
+
inverseJoinColumn: {
|
|
189
|
+
name: "user",
|
|
190
|
+
referencedColumnName: "id",
|
|
191
|
+
},
|
|
192
|
+
}),
|
|
193
|
+
__metadata("design:type", Array)
|
|
194
|
+
], Local.prototype, "users_favorite_local", void 0);
|
|
195
|
+
__decorate([
|
|
196
|
+
(0, typeorm_1.ManyToMany)(() => BusinessTypeProduct_1.BusinessTypeProduct, (businessTypeProduct) => businessTypeProduct.business_type_products),
|
|
197
|
+
(0, typeorm_1.JoinTable)({
|
|
198
|
+
name: "business_type_product_local",
|
|
199
|
+
joinColumn: {
|
|
200
|
+
name: "local",
|
|
201
|
+
referencedColumnName: "id",
|
|
202
|
+
},
|
|
203
|
+
inverseJoinColumn: {
|
|
204
|
+
name: "business_type_product",
|
|
205
|
+
referencedColumnName: "id",
|
|
206
|
+
},
|
|
207
|
+
}),
|
|
208
|
+
__metadata("design:type", Array)
|
|
209
|
+
], Local.prototype, "business_type_products", void 0);
|
|
210
|
+
__decorate([
|
|
211
|
+
(0, typeorm_1.OneToMany)(() => __1.DiscountCodeUser, (discountCodeUser) => discountCodeUser.local),
|
|
212
|
+
__metadata("design:type", Array)
|
|
213
|
+
], Local.prototype, "discount_code_locals", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
(0, typeorm_1.OneToMany)(() => __1.LocalPlan, (localPlan) => localPlan.local),
|
|
216
|
+
__metadata("design:type", Array)
|
|
217
|
+
], Local.prototype, "locals_plan", void 0);
|
|
218
|
+
__decorate([
|
|
219
|
+
(0, typeorm_1.OneToMany)(() => __1.ReceiptConfig, (receiptConfig) => receiptConfig.local),
|
|
220
|
+
__metadata("design:type", Array)
|
|
221
|
+
], Local.prototype, "receipts_local_config", void 0);
|
|
222
|
+
__decorate([
|
|
223
|
+
(0, typeorm_1.OneToMany)(() => __1.LocalTableZone, (localTableZone) => localTableZone.local),
|
|
224
|
+
__metadata("design:type", Array)
|
|
225
|
+
], Local.prototype, "local_table_zones", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
(0, typeorm_1.OneToMany)(() => __1.LocalTable, (localTable) => localTable.local),
|
|
228
|
+
__metadata("design:type", Array)
|
|
229
|
+
], Local.prototype, "local_tables", void 0);
|
|
230
|
+
__decorate([
|
|
231
|
+
(0, typeorm_1.OneToMany)(() => __1.LocalDecorationReserve, (localDecorationReserve) => localDecorationReserve.local),
|
|
232
|
+
__metadata("design:type", Array)
|
|
233
|
+
], Local.prototype, "local_decorations_reserve", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
(0, typeorm_1.OneToMany)(() => __1.LocalReserveStatus, (localReserveStatus) => localReserveStatus.local),
|
|
236
|
+
__metadata("design:type", Array)
|
|
237
|
+
], Local.prototype, "local_reserve_status", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
(0, typeorm_1.OneToMany)(() => __1.RequestInvoice, (requestInvoice) => requestInvoice.local),
|
|
240
|
+
__metadata("design:type", Array)
|
|
241
|
+
], Local.prototype, "request_invoices", void 0);
|
|
242
|
+
__decorate([
|
|
243
|
+
(0, typeorm_1.OneToMany)(() => __1.Gallery, (gallery) => gallery.local),
|
|
244
|
+
__metadata("design:type", Array)
|
|
245
|
+
], Local.prototype, "galleries", void 0);
|
|
246
|
+
__decorate([
|
|
247
|
+
(0, typeorm_1.OneToMany)(() => __1.LocalPaymentMethod, (localPaymentMethod) => localPaymentMethod.local),
|
|
248
|
+
__metadata("design:type", Array)
|
|
249
|
+
], Local.prototype, "locals_payment_method", void 0);
|
|
250
|
+
exports.Local = Local = __decorate([
|
|
251
|
+
(0, typeorm_1.Entity)({ comment: "Locales disponibles de las empresas (company)." })
|
|
252
|
+
], Local);
|
|
@@ -10,71 +10,68 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.LocalDecorationReserve = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
-
type: "int",
|
|
21
|
-
comment: "Id único de cada registro.",
|
|
22
|
-
}),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], LocalDecorationReserve.prototype, "id", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({
|
|
27
|
-
length: 10,
|
|
28
|
-
type: "varchar",
|
|
29
|
-
unique: true,
|
|
30
|
-
comment: "Código único de cada registro.",
|
|
31
|
-
}),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], LocalDecorationReserve.prototype, "code", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.Local; }, function (local) { return local.local_decorations_reserve; }, {
|
|
36
|
-
onDelete: "NO ACTION",
|
|
37
|
-
onUpdate: "NO ACTION",
|
|
38
|
-
}),
|
|
39
|
-
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
40
|
-
__metadata("design:type", __1.Local)
|
|
41
|
-
], LocalDecorationReserve.prototype, "local", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.DecorationReserve; }, function (decorationReserve) { return decorationReserve.local_decorations_reserve; }, {
|
|
44
|
-
onDelete: "RESTRICT",
|
|
45
|
-
onUpdate: "NO ACTION",
|
|
46
|
-
}),
|
|
47
|
-
(0, typeorm_1.JoinColumn)({ name: "name" }),
|
|
48
|
-
__metadata("design:type", __1.DecorationReserve)
|
|
49
|
-
], LocalDecorationReserve.prototype, "name", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({
|
|
52
|
-
type: "decimal",
|
|
53
|
-
precision: 10,
|
|
54
|
-
scale: 2,
|
|
55
|
-
comment: "Precio de la decoración.",
|
|
56
|
-
}),
|
|
57
|
-
__metadata("design:type", Number)
|
|
58
|
-
], LocalDecorationReserve.prototype, "price", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, typeorm_1.Column)({
|
|
61
|
-
default: 1,
|
|
62
|
-
type: "int",
|
|
63
|
-
width: 1,
|
|
64
|
-
comment: "Estado de la decoración:\r\n0: Inactivo.\r\n1: Activo.",
|
|
65
|
-
}),
|
|
66
|
-
__metadata("design:type", Number)
|
|
67
|
-
], LocalDecorationReserve.prototype, "status", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, typeorm_1.OneToMany)(function () { return __1.LocalReserve; }, function (localReserve) { return localReserve.decoration; }),
|
|
70
|
-
__metadata("design:type", Array)
|
|
71
|
-
], LocalDecorationReserve.prototype, "local_reserves", void 0);
|
|
72
|
-
LocalDecorationReserve = __decorate([
|
|
73
|
-
(0, typeorm_1.Entity)({
|
|
74
|
-
comment: "Tipos de decoración qué tiene el local.",
|
|
75
|
-
name: "local_decoration_reserve",
|
|
76
|
-
})
|
|
77
|
-
], LocalDecorationReserve);
|
|
78
|
-
return LocalDecorationReserve;
|
|
79
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
let LocalDecorationReserve = class LocalDecorationReserve {
|
|
16
|
+
};
|
|
80
17
|
exports.LocalDecorationReserve = LocalDecorationReserve;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
+
type: "int",
|
|
21
|
+
comment: "Id único de cada registro.",
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], LocalDecorationReserve.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({
|
|
27
|
+
length: 10,
|
|
28
|
+
type: "varchar",
|
|
29
|
+
unique: true,
|
|
30
|
+
comment: "Código único de cada registro.",
|
|
31
|
+
}),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], LocalDecorationReserve.prototype, "code", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.ManyToOne)(() => __1.Local, (local) => local.local_decorations_reserve, {
|
|
36
|
+
onDelete: "NO ACTION",
|
|
37
|
+
onUpdate: "NO ACTION",
|
|
38
|
+
}),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
40
|
+
__metadata("design:type", __1.Local)
|
|
41
|
+
], LocalDecorationReserve.prototype, "local", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.ManyToOne)(() => __1.DecorationReserve, (decorationReserve) => decorationReserve.local_decorations_reserve, {
|
|
44
|
+
onDelete: "RESTRICT",
|
|
45
|
+
onUpdate: "NO ACTION",
|
|
46
|
+
}),
|
|
47
|
+
(0, typeorm_1.JoinColumn)({ name: "name" }),
|
|
48
|
+
__metadata("design:type", __1.DecorationReserve)
|
|
49
|
+
], LocalDecorationReserve.prototype, "name", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({
|
|
52
|
+
type: "decimal",
|
|
53
|
+
precision: 10,
|
|
54
|
+
scale: 2,
|
|
55
|
+
comment: "Precio de la decoración.",
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], LocalDecorationReserve.prototype, "price", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({
|
|
61
|
+
default: 1,
|
|
62
|
+
type: "int",
|
|
63
|
+
width: 1,
|
|
64
|
+
comment: "Estado de la decoración:\r\n0: Inactivo.\r\n1: Activo.",
|
|
65
|
+
}),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], LocalDecorationReserve.prototype, "status", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.OneToMany)(() => __1.LocalReserve, (localReserve) => localReserve.decoration),
|
|
70
|
+
__metadata("design:type", Array)
|
|
71
|
+
], LocalDecorationReserve.prototype, "local_reserves", void 0);
|
|
72
|
+
exports.LocalDecorationReserve = LocalDecorationReserve = __decorate([
|
|
73
|
+
(0, typeorm_1.Entity)({
|
|
74
|
+
comment: "Tipos de decoración qué tiene el local.",
|
|
75
|
+
name: "local_decoration_reserve",
|
|
76
|
+
})
|
|
77
|
+
], LocalDecorationReserve);
|