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.
Files changed (105) hide show
  1. package/dist/CustomRepository.js +21 -109
  2. package/dist/entities/AuthenticationCredential.js +54 -57
  3. package/dist/entities/Bank.js +50 -53
  4. package/dist/entities/BusinessType.js +47 -50
  5. package/dist/entities/BusinessTypeProduct.js +68 -71
  6. package/dist/entities/Category.js +148 -151
  7. package/dist/entities/CategoryDate.js +39 -42
  8. package/dist/entities/CategorySchedule.js +41 -44
  9. package/dist/entities/City.js +70 -73
  10. package/dist/entities/CodeRedemptionHistoryCompany.js +44 -47
  11. package/dist/entities/CodeRedemptionHistoryUser.js +54 -57
  12. package/dist/entities/Company.js +169 -172
  13. package/dist/entities/Configuration.d.ts +1 -1
  14. package/dist/entities/Configuration.js +25 -26
  15. package/dist/entities/Country.js +91 -94
  16. package/dist/entities/Day.js +38 -41
  17. package/dist/entities/DecorationReserve.js +46 -49
  18. package/dist/entities/DiscountCodeCompany.js +124 -129
  19. package/dist/entities/DiscountCodeUser.js +139 -142
  20. package/dist/entities/Gallery.js +88 -91
  21. package/dist/entities/Local.js +239 -242
  22. package/dist/entities/LocalDecorationReserve.js +64 -67
  23. package/dist/entities/LocalPaymentMethod.js +41 -44
  24. package/dist/entities/LocalPlan.js +88 -91
  25. package/dist/entities/LocalQualification.js +51 -54
  26. package/dist/entities/LocalReserve.js +177 -180
  27. package/dist/entities/LocalReserveStatus.js +85 -88
  28. package/dist/entities/LocalTable.js +163 -166
  29. package/dist/entities/LocalTableReserve.js +22 -25
  30. package/dist/entities/LocalTableReservePayment.js +156 -159
  31. package/dist/entities/LocalTableZone.js +84 -87
  32. package/dist/entities/Master.js +182 -185
  33. package/dist/entities/MasterNotification.js +96 -99
  34. package/dist/entities/MasterPermission.js +65 -68
  35. package/dist/entities/MasterRole.js +83 -86
  36. package/dist/entities/Partner.js +306 -309
  37. package/dist/entities/PartnerNotification.js +97 -100
  38. package/dist/entities/PartnerPlatform.js +66 -69
  39. package/dist/entities/PartnerPlatformSection.js +74 -79
  40. package/dist/entities/PartnerPlatformSectionPermission.js +113 -118
  41. package/dist/entities/PartnerPlatformSectionPermissionAssociate.js +26 -29
  42. package/dist/entities/PartnerRole.js +93 -96
  43. package/dist/entities/PartnerSession.js +94 -97
  44. package/dist/entities/PaymentMethod.js +91 -94
  45. package/dist/entities/Plan.js +86 -89
  46. package/dist/entities/PosSystem.js +69 -74
  47. package/dist/entities/Product.js +219 -222
  48. package/dist/entities/ProductDate.js +39 -42
  49. package/dist/entities/ProductGroup.js +76 -79
  50. package/dist/entities/ProductImage.js +33 -36
  51. package/dist/entities/ProductIngredient.js +54 -57
  52. package/dist/entities/ProductSchedule.js +41 -44
  53. package/dist/entities/ProductTopping.js +47 -50
  54. package/dist/entities/ReceiptConfig.js +184 -187
  55. package/dist/entities/Region.js +46 -49
  56. package/dist/entities/Request.js +152 -155
  57. package/dist/entities/RequestInvoice.js +125 -128
  58. package/dist/entities/RequestInvoiceCategory.js +34 -37
  59. package/dist/entities/RequestLocal.js +164 -169
  60. package/dist/entities/RequestLocalHistory.js +61 -64
  61. package/dist/entities/RequestLocalPayment.js +154 -157
  62. package/dist/entities/RequestLocalTable.js +34 -37
  63. package/dist/entities/RequestPrint.js +60 -63
  64. package/dist/entities/RequestProduct.js +58 -61
  65. package/dist/entities/RequestProductGroupComplement.js +51 -56
  66. package/dist/entities/ServiceDiscountsPlan.js +30 -33
  67. package/dist/entities/ServicePlan.js +84 -87
  68. package/dist/entities/Square.js +130 -133
  69. package/dist/entities/ToppingImage.js +56 -59
  70. package/dist/entities/TypeMeasureIngredient.js +45 -48
  71. package/dist/entities/User.js +234 -237
  72. package/dist/entities/UserAddress.js +114 -117
  73. package/dist/entities/UserPaymentMethod.js +118 -121
  74. package/dist/entities/VerificationCode.js +60 -63
  75. package/dist/entities/VerifyLocal.js +142 -145
  76. package/dist/entities/productGroupComplement.js +117 -120
  77. package/dist/filters/DiscountsCodeCompanyInformation.js +153 -202
  78. package/dist/filters/DiscountsCodeUserInformation.js +173 -220
  79. package/dist/filters/LocalReservesInformation.js +35 -81
  80. package/dist/filters/LocalsCompanyInformation.js +169 -218
  81. package/dist/filters/LocalsCompanyInformationForTheTable.js +157 -203
  82. package/dist/filters/VerifyLocalsInformation.js +131 -179
  83. package/dist/index.js +55 -130
  84. package/dist/transformers/dateTransformer.js +10 -13
  85. package/dist/transformers/jsonEncryptionTransformer.d.ts +2 -0
  86. package/dist/transformers/jsonEncryptionTransformer.js +57 -0
  87. package/dist/transformers/jsonTransformer.js +2 -2
  88. package/dist/utils.js +3 -3
  89. package/dist/views/DiscountsCodeUser.js +120 -123
  90. package/dist/views/LocalReserves.js +280 -283
  91. package/dist/views/LocalTableZonesFilter.js +76 -79
  92. package/dist/views/LocalsCompany.js +172 -175
  93. package/dist/views/LocalsCompanyInformationForTheMap.js +276 -279
  94. package/dist/views/LocalsCompanyInformationForTheTable.d.ts +1 -0
  95. package/dist/views/LocalsCompanyInformationForTheTable.js +384 -383
  96. package/dist/views/MasterNotifications.js +132 -135
  97. package/dist/views/PartnerNotifications.js +104 -107
  98. package/dist/views/Partners.js +140 -143
  99. package/dist/views/VerifyLocals.js +152 -155
  100. package/dist/views/ViewLocalsCompanies.js +100 -103
  101. package/package.json +2 -1
  102. package/src/entities/Configuration.ts +3 -1
  103. package/src/transformers/jsonEncryptionTransformer.ts +75 -0
  104. package/src/views/LocalsCompanyInformationForTheTable.ts +3 -0
  105. package/tsconfig.json +7 -3
@@ -10,226 +10,223 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Product = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var __1 = require("..");
15
- var dateTransformer_1 = require("../transformers/dateTransformer");
16
- var jsonTransformer_1 = require("../transformers/jsonTransformer");
17
- var Category_1 = require("./Category");
18
- var ProductGroup_1 = require("./ProductGroup");
19
- var ProductIngredient_1 = require("./ProductIngredient");
20
- var RequestProduct_1 = require("./RequestProduct");
21
- var User_1 = require("./User");
22
- var Product = /** @class */ (function () {
23
- function Product() {
24
- }
25
- __decorate([
26
- (0, typeorm_1.PrimaryGeneratedColumn)({
27
- type: "int",
28
- comment: "Número de identificación (ID) único de cada registro.",
29
- }),
30
- __metadata("design:type", Number)
31
- ], Product.prototype, "id", void 0);
32
- __decorate([
33
- (0, typeorm_1.ManyToOne)(function () { return Category_1.Category; }, function (category) { return category.products; }, {
34
- onDelete: "CASCADE",
35
- onUpdate: "NO ACTION",
36
- }),
37
- (0, typeorm_1.JoinColumn)({ name: "category" }),
38
- __metadata("design:type", Category_1.Category)
39
- ], Product.prototype, "category", void 0);
40
- __decorate([
41
- (0, typeorm_1.Column)({ length: 50, type: "varchar", comment: "Nombre del producto." }),
42
- __metadata("design:type", String)
43
- ], Product.prototype, "name", void 0);
44
- __decorate([
45
- (0, typeorm_1.Column)({
46
- length: 400,
47
- type: "varchar",
48
- comment: "Detalles del producto. \n\n ¿Qué contiene?",
49
- }),
50
- __metadata("design:type", String)
51
- ], Product.prototype, "details", void 0);
52
- __decorate([
53
- (0, typeorm_1.Column)({ length: 20, type: "varchar", comment: "Precio del producto." }),
54
- __metadata("design:type", String)
55
- ], Product.prototype, "price", void 0);
56
- __decorate([
57
- (0, typeorm_1.Column)({
58
- default: 0,
59
- type: "int",
60
- width: 1,
61
- comment: "¿El producto cuenta con restricción de edad?\r\n1. Cuenta con restricción.\r\n0. No cuenta con restricción.",
62
- }),
63
- __metadata("design:type", Number)
64
- ], Product.prototype, "age_restriction", void 0);
65
- __decorate([
66
- (0, typeorm_1.Column)({
67
- default: 0,
68
- type: "int",
69
- width: 1,
70
- comment: "¿El producto es un combo?\r\n1. Combo.\r\n0. No es un combo.",
71
- }),
72
- __metadata("design:type", Number)
73
- ], Product.prototype, "combo", void 0);
74
- __decorate([
75
- (0, typeorm_1.Column)({
76
- type: "int",
77
- comment: "En qué posición se va a mostrar el producto.",
78
- }),
79
- __metadata("design:type", Number)
80
- ], Product.prototype, "position", void 0);
81
- __decorate([
82
- (0, typeorm_1.Column)({
83
- type: "mediumtext",
84
- transformer: jsonTransformer_1.jsonTransformer,
85
- nullable: true,
86
- default: null,
87
- comment: "Campo de tipo JSON donde se guarda información necesaria para el registro.",
88
- }),
89
- __metadata("design:type", Object)
90
- ], Product.prototype, "additional_information", void 0);
91
- __decorate([
92
- (0, typeorm_1.Column)({
93
- nullable: true,
94
- type: "int",
95
- width: 1,
96
- comment: "Campo para saber el tipo de horario que se va a mostrar en la aplicación:\n 1. Días. \n2. Fecha específica.",
97
- default: null,
98
- }),
99
- __metadata("design:type", Object)
100
- ], Product.prototype, "type_sales_hours", void 0);
101
- __decorate([
102
- (0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.partners_created_by; }, {
103
- onDelete: "RESTRICT",
104
- onUpdate: "NO ACTION",
105
- }),
106
- (0, typeorm_1.JoinColumn)({ name: "created_by" }),
107
- __metadata("design:type", __1.Partner)
108
- ], Product.prototype, "created_by", void 0);
109
- __decorate([
110
- (0, typeorm_1.Column)({
111
- type: "datetime",
112
- transformer: new dateTransformer_1.DateTransformer(),
113
- comment: "Fecha de creación del registro.",
114
- }),
115
- __metadata("design:type", Date)
116
- ], Product.prototype, "created", void 0);
117
- __decorate([
118
- (0, typeorm_1.Column)({
119
- type: "datetime",
120
- nullable: true,
121
- default: null,
122
- transformer: new dateTransformer_1.DateTransformer(),
123
- comment: "Fecha de actualización del registro.",
124
- }),
125
- __metadata("design:type", Date)
126
- ], Product.prototype, "updated", void 0);
127
- __decorate([
128
- (0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.partners_update_by; }, {
129
- onDelete: "RESTRICT",
130
- onUpdate: "NO ACTION",
131
- nullable: true,
132
- }),
133
- (0, typeorm_1.JoinColumn)({ name: "updated_by" }),
134
- __metadata("design:type", __1.Partner)
135
- ], Product.prototype, "updated_by", void 0);
136
- __decorate([
137
- (0, typeorm_1.Column)({
138
- type: "mediumtext",
139
- nullable: true,
140
- default: null,
141
- transformer: jsonTransformer_1.jsonTransformer,
142
- comment: "Valores qué se van a mostrar mientras se aprueban los nuevos cambios.",
143
- }),
144
- __metadata("design:type", Object)
145
- ], Product.prototype, "current_values", void 0);
146
- __decorate([
147
- (0, typeorm_1.Column)({
148
- default: 1,
149
- type: "int",
150
- width: 1,
151
- comment: "Estado en el que está el elemento: \n0. Inactivo. \n1. Activo. \n2. Eliminado.",
152
- }),
153
- __metadata("design:type", Number)
154
- ], Product.prototype, "status", void 0);
155
- __decorate([
156
- (0, typeorm_1.Column)({
157
- default: 1,
158
- type: "int",
159
- width: 1,
160
- comment: "Estado en el que se encuentra la revisión de los cambios: \n1. En revisión. \n2. Rechazado.",
161
- }),
162
- __metadata("design:type", Number)
163
- ], Product.prototype, "status_review", void 0);
164
- __decorate([
165
- (0, typeorm_1.Column)({
166
- nullable: true,
167
- default: null,
168
- type: "varchar",
169
- length: 600,
170
- comment: "Comentarios u observaciones de la revisión.",
171
- }),
172
- __metadata("design:type", Object)
173
- ], Product.prototype, "review_comment", void 0);
174
- __decorate([
175
- (0, typeorm_1.OneToMany)(function () { return ProductGroup_1.ProductGroup; }, function (productGroup) { return productGroup.product; }),
176
- __metadata("design:type", Array)
177
- ], Product.prototype, "product_groups", void 0);
178
- __decorate([
179
- (0, typeorm_1.OneToMany)(function () { return ProductIngredient_1.ProductIngredient; }, function (productIngredient) { return productIngredient.product; }),
180
- __metadata("design:type", Array)
181
- ], Product.prototype, "product_ingredients", void 0);
182
- __decorate([
183
- (0, typeorm_1.OneToMany)(function () { return RequestProduct_1.RequestProduct; }, function (requestProduct) { return requestProduct.product; }),
184
- __metadata("design:type", Array)
185
- ], Product.prototype, "request_products", void 0);
186
- __decorate([
187
- (0, typeorm_1.ManyToMany)(function () { return User_1.User; }, function (user) { return user.user_favorite_products; }),
188
- (0, typeorm_1.JoinTable)({
189
- name: "user_favorite_product",
190
- joinColumn: {
191
- name: "product",
192
- referencedColumnName: "id",
193
- },
194
- inverseJoinColumn: {
195
- name: "user",
196
- referencedColumnName: "id",
197
- },
198
- }),
199
- __metadata("design:type", Array)
200
- ], Product.prototype, "users_favorite_product", void 0);
201
- __decorate([
202
- (0, typeorm_1.OneToMany)(function () { return __1.ProductSchedule; }, function (productSchedule) { return productSchedule.product; }),
203
- __metadata("design:type", Array)
204
- ], Product.prototype, "product_schedules", void 0);
205
- __decorate([
206
- (0, typeorm_1.OneToMany)(function () { return __1.ProductDate; }, function (productDate) { return productDate.product; }),
207
- __metadata("design:type", Array)
208
- ], Product.prototype, "product_dates", void 0);
209
- __decorate([
210
- (0, typeorm_1.OneToMany)(function () { return __1.ProductImage; }, function (productImage) { return productImage.product; }),
211
- __metadata("design:type", Array)
212
- ], Product.prototype, "products_image", void 0);
213
- __decorate([
214
- (0, typeorm_1.ManyToMany)(function () { return __1.Gallery; }, function (gallery) { return gallery.products_images; }),
215
- (0, typeorm_1.JoinTable)({
216
- name: "product_image",
217
- joinColumn: {
218
- name: "product",
219
- referencedColumnName: "id",
220
- },
221
- inverseJoinColumn: {
222
- name: "image",
223
- referencedColumnName: "id",
224
- },
225
- }),
226
- __metadata("design:type", Array)
227
- ], Product.prototype, "product_images", void 0);
228
- Product = __decorate([
229
- (0, typeorm_1.Entity)({
230
- comment: "Productos qué serán visibles a los usuarios, estos están asociados a un local.",
231
- })
232
- ], Product);
233
- return Product;
234
- }());
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 Category_1 = require("./Category");
18
+ const ProductGroup_1 = require("./ProductGroup");
19
+ const ProductIngredient_1 = require("./ProductIngredient");
20
+ const RequestProduct_1 = require("./RequestProduct");
21
+ const User_1 = require("./User");
22
+ let Product = class Product {
23
+ };
235
24
  exports.Product = Product;
25
+ __decorate([
26
+ (0, typeorm_1.PrimaryGeneratedColumn)({
27
+ type: "int",
28
+ comment: "Número de identificación (ID) único de cada registro.",
29
+ }),
30
+ __metadata("design:type", Number)
31
+ ], Product.prototype, "id", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.ManyToOne)(() => Category_1.Category, (category) => category.products, {
34
+ onDelete: "CASCADE",
35
+ onUpdate: "NO ACTION",
36
+ }),
37
+ (0, typeorm_1.JoinColumn)({ name: "category" }),
38
+ __metadata("design:type", Category_1.Category)
39
+ ], Product.prototype, "category", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ length: 50, type: "varchar", comment: "Nombre del producto." }),
42
+ __metadata("design:type", String)
43
+ ], Product.prototype, "name", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({
46
+ length: 400,
47
+ type: "varchar",
48
+ comment: "Detalles del producto. \n\n ¿Qué contiene?",
49
+ }),
50
+ __metadata("design:type", String)
51
+ ], Product.prototype, "details", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ length: 20, type: "varchar", comment: "Precio del producto." }),
54
+ __metadata("design:type", String)
55
+ ], Product.prototype, "price", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({
58
+ default: 0,
59
+ type: "int",
60
+ width: 1,
61
+ comment: "¿El producto cuenta con restricción de edad?\r\n1. Cuenta con restricción.\r\n0. No cuenta con restricción.",
62
+ }),
63
+ __metadata("design:type", Number)
64
+ ], Product.prototype, "age_restriction", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({
67
+ default: 0,
68
+ type: "int",
69
+ width: 1,
70
+ comment: "¿El producto es un combo?\r\n1. Combo.\r\n0. No es un combo.",
71
+ }),
72
+ __metadata("design:type", Number)
73
+ ], Product.prototype, "combo", void 0);
74
+ __decorate([
75
+ (0, typeorm_1.Column)({
76
+ type: "int",
77
+ comment: "En qué posición se va a mostrar el producto.",
78
+ }),
79
+ __metadata("design:type", Number)
80
+ ], Product.prototype, "position", void 0);
81
+ __decorate([
82
+ (0, typeorm_1.Column)({
83
+ type: "mediumtext",
84
+ transformer: jsonTransformer_1.jsonTransformer,
85
+ nullable: true,
86
+ default: null,
87
+ comment: "Campo de tipo JSON donde se guarda información necesaria para el registro.",
88
+ }),
89
+ __metadata("design:type", Object)
90
+ ], Product.prototype, "additional_information", void 0);
91
+ __decorate([
92
+ (0, typeorm_1.Column)({
93
+ nullable: true,
94
+ type: "int",
95
+ width: 1,
96
+ comment: "Campo para saber el tipo de horario que se va a mostrar en la aplicación:\n 1. Días. \n2. Fecha específica.",
97
+ default: null,
98
+ }),
99
+ __metadata("design:type", Object)
100
+ ], Product.prototype, "type_sales_hours", void 0);
101
+ __decorate([
102
+ (0, typeorm_1.ManyToOne)(() => __1.Partner, (partner) => partner.partners_created_by, {
103
+ onDelete: "RESTRICT",
104
+ onUpdate: "NO ACTION",
105
+ }),
106
+ (0, typeorm_1.JoinColumn)({ name: "created_by" }),
107
+ __metadata("design:type", __1.Partner)
108
+ ], Product.prototype, "created_by", void 0);
109
+ __decorate([
110
+ (0, typeorm_1.Column)({
111
+ type: "datetime",
112
+ transformer: new dateTransformer_1.DateTransformer(),
113
+ comment: "Fecha de creación del registro.",
114
+ }),
115
+ __metadata("design:type", Date)
116
+ ], Product.prototype, "created", void 0);
117
+ __decorate([
118
+ (0, typeorm_1.Column)({
119
+ type: "datetime",
120
+ nullable: true,
121
+ default: null,
122
+ transformer: new dateTransformer_1.DateTransformer(),
123
+ comment: "Fecha de actualización del registro.",
124
+ }),
125
+ __metadata("design:type", Date)
126
+ ], Product.prototype, "updated", void 0);
127
+ __decorate([
128
+ (0, typeorm_1.ManyToOne)(() => __1.Partner, (partner) => partner.partners_update_by, {
129
+ onDelete: "RESTRICT",
130
+ onUpdate: "NO ACTION",
131
+ nullable: true,
132
+ }),
133
+ (0, typeorm_1.JoinColumn)({ name: "updated_by" }),
134
+ __metadata("design:type", __1.Partner)
135
+ ], Product.prototype, "updated_by", void 0);
136
+ __decorate([
137
+ (0, typeorm_1.Column)({
138
+ type: "mediumtext",
139
+ nullable: true,
140
+ default: null,
141
+ transformer: jsonTransformer_1.jsonTransformer,
142
+ comment: "Valores qué se van a mostrar mientras se aprueban los nuevos cambios.",
143
+ }),
144
+ __metadata("design:type", Object)
145
+ ], Product.prototype, "current_values", void 0);
146
+ __decorate([
147
+ (0, typeorm_1.Column)({
148
+ default: 1,
149
+ type: "int",
150
+ width: 1,
151
+ comment: "Estado en el que está el elemento: \n0. Inactivo. \n1. Activo. \n2. Eliminado.",
152
+ }),
153
+ __metadata("design:type", Number)
154
+ ], Product.prototype, "status", void 0);
155
+ __decorate([
156
+ (0, typeorm_1.Column)({
157
+ default: 1,
158
+ type: "int",
159
+ width: 1,
160
+ comment: "Estado en el que se encuentra la revisión de los cambios: \n1. En revisión. \n2. Rechazado.",
161
+ }),
162
+ __metadata("design:type", Number)
163
+ ], Product.prototype, "status_review", void 0);
164
+ __decorate([
165
+ (0, typeorm_1.Column)({
166
+ nullable: true,
167
+ default: null,
168
+ type: "varchar",
169
+ length: 600,
170
+ comment: "Comentarios u observaciones de la revisión.",
171
+ }),
172
+ __metadata("design:type", Object)
173
+ ], Product.prototype, "review_comment", void 0);
174
+ __decorate([
175
+ (0, typeorm_1.OneToMany)(() => ProductGroup_1.ProductGroup, (productGroup) => productGroup.product),
176
+ __metadata("design:type", Array)
177
+ ], Product.prototype, "product_groups", void 0);
178
+ __decorate([
179
+ (0, typeorm_1.OneToMany)(() => ProductIngredient_1.ProductIngredient, (productIngredient) => productIngredient.product),
180
+ __metadata("design:type", Array)
181
+ ], Product.prototype, "product_ingredients", void 0);
182
+ __decorate([
183
+ (0, typeorm_1.OneToMany)(() => RequestProduct_1.RequestProduct, (requestProduct) => requestProduct.product),
184
+ __metadata("design:type", Array)
185
+ ], Product.prototype, "request_products", void 0);
186
+ __decorate([
187
+ (0, typeorm_1.ManyToMany)(() => User_1.User, (user) => user.user_favorite_products),
188
+ (0, typeorm_1.JoinTable)({
189
+ name: "user_favorite_product",
190
+ joinColumn: {
191
+ name: "product",
192
+ referencedColumnName: "id",
193
+ },
194
+ inverseJoinColumn: {
195
+ name: "user",
196
+ referencedColumnName: "id",
197
+ },
198
+ }),
199
+ __metadata("design:type", Array)
200
+ ], Product.prototype, "users_favorite_product", void 0);
201
+ __decorate([
202
+ (0, typeorm_1.OneToMany)(() => __1.ProductSchedule, (productSchedule) => productSchedule.product),
203
+ __metadata("design:type", Array)
204
+ ], Product.prototype, "product_schedules", void 0);
205
+ __decorate([
206
+ (0, typeorm_1.OneToMany)(() => __1.ProductDate, (productDate) => productDate.product),
207
+ __metadata("design:type", Array)
208
+ ], Product.prototype, "product_dates", void 0);
209
+ __decorate([
210
+ (0, typeorm_1.OneToMany)(() => __1.ProductImage, (productImage) => productImage.product),
211
+ __metadata("design:type", Array)
212
+ ], Product.prototype, "products_image", void 0);
213
+ __decorate([
214
+ (0, typeorm_1.ManyToMany)(() => __1.Gallery, (gallery) => gallery.products_images),
215
+ (0, typeorm_1.JoinTable)({
216
+ name: "product_image",
217
+ joinColumn: {
218
+ name: "product",
219
+ referencedColumnName: "id",
220
+ },
221
+ inverseJoinColumn: {
222
+ name: "image",
223
+ referencedColumnName: "id",
224
+ },
225
+ }),
226
+ __metadata("design:type", Array)
227
+ ], Product.prototype, "product_images", void 0);
228
+ exports.Product = Product = __decorate([
229
+ (0, typeorm_1.Entity)({
230
+ comment: "Productos qué serán visibles a los usuarios, estos están asociados a un local.",
231
+ })
232
+ ], Product);
@@ -10,46 +10,43 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductDate = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var __1 = require("..");
15
- var ProductDate = /** @class */ (function () {
16
- function ProductDate() {
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
- ], ProductDate.prototype, "id", void 0);
25
- __decorate([
26
- (0, typeorm_1.ManyToOne)(function () { return __1.Product; }, function (product) { return product.product_dates; }, {
27
- onDelete: "CASCADE",
28
- onUpdate: "NO ACTION",
29
- }),
30
- (0, typeorm_1.JoinColumn)({ name: "product" }),
31
- __metadata("design:type", __1.Product)
32
- ], ProductDate.prototype, "product", void 0);
33
- __decorate([
34
- (0, typeorm_1.Column)({
35
- type: "date",
36
- comment: "Fecha en la que va a estar disponible el producto.",
37
- }),
38
- __metadata("design:type", Date)
39
- ], ProductDate.prototype, "date", void 0);
40
- __decorate([
41
- (0, typeorm_1.Column)({ type: "varchar", comment: "Hora de inicio." }),
42
- __metadata("design:type", String)
43
- ], ProductDate.prototype, "start_time", void 0);
44
- __decorate([
45
- (0, typeorm_1.Column)({ type: "varchar", comment: "Hora de finalización." }),
46
- __metadata("design:type", String)
47
- ], ProductDate.prototype, "end_time", void 0);
48
- ProductDate = __decorate([
49
- (0, typeorm_1.Entity)("product_date", {
50
- comment: "Fechas específicas donde se pueden agregar horarios",
51
- })
52
- ], ProductDate);
53
- return ProductDate;
54
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const __1 = require("..");
15
+ let ProductDate = class ProductDate {
16
+ };
55
17
  exports.ProductDate = ProductDate;
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
+ ], ProductDate.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.ManyToOne)(() => __1.Product, (product) => product.product_dates, {
27
+ onDelete: "CASCADE",
28
+ onUpdate: "NO ACTION",
29
+ }),
30
+ (0, typeorm_1.JoinColumn)({ name: "product" }),
31
+ __metadata("design:type", __1.Product)
32
+ ], ProductDate.prototype, "product", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({
35
+ type: "date",
36
+ comment: "Fecha en la que va a estar disponible el producto.",
37
+ }),
38
+ __metadata("design:type", Date)
39
+ ], ProductDate.prototype, "date", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: "varchar", comment: "Hora de inicio." }),
42
+ __metadata("design:type", String)
43
+ ], ProductDate.prototype, "start_time", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: "varchar", comment: "Hora de finalización." }),
46
+ __metadata("design:type", String)
47
+ ], ProductDate.prototype, "end_time", void 0);
48
+ exports.ProductDate = ProductDate = __decorate([
49
+ (0, typeorm_1.Entity)("product_date", {
50
+ comment: "Fechas específicas donde se pueden agregar horarios",
51
+ })
52
+ ], ProductDate);
@@ -10,83 +10,80 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductGroup = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var Product_1 = require("./Product");
15
- var ProductTopping_1 = require("./ProductTopping");
16
- var productGroupComplement_1 = require("./productGroupComplement");
17
- var ProductGroup = /** @class */ (function () {
18
- function ProductGroup() {
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
- ], ProductGroup.prototype, "id", void 0);
27
- __decorate([
28
- (0, typeorm_1.ManyToOne)(function () { return Product_1.Product; }, function (product) { return product.product_groups; }, {
29
- onDelete: "CASCADE",
30
- onUpdate: "NO ACTION",
31
- }),
32
- (0, typeorm_1.JoinColumn)({ name: "product" }),
33
- __metadata("design:type", Product_1.Product)
34
- ], ProductGroup.prototype, "product", void 0);
35
- __decorate([
36
- (0, typeorm_1.ManyToOne)(function () { return ProductTopping_1.ProductTopping; }, function (productTopping) { return productTopping.product_groups; }, {
37
- onDelete: "CASCADE",
38
- onUpdate: "NO ACTION",
39
- }),
40
- (0, typeorm_1.JoinColumn)({ name: "topping" }),
41
- __metadata("design:type", ProductTopping_1.ProductTopping)
42
- ], ProductGroup.prototype, "topping", void 0);
43
- __decorate([
44
- (0, typeorm_1.Column)({ length: 30, type: "varchar", comment: "Nombre del grupo." }),
45
- __metadata("design:type", String)
46
- ], ProductGroup.prototype, "name", void 0);
47
- __decorate([
48
- (0, typeorm_1.Column)({
49
- default: 1,
50
- type: "int",
51
- width: 1,
52
- comment: "El `type` se refiere a si el grupo es opcional o si es requerido:\r\n1. Opcional.\r\n2. Requerido.",
53
- }),
54
- __metadata("design:type", Number)
55
- ], ProductGroup.prototype, "type", void 0);
56
- __decorate([
57
- (0, typeorm_1.Column)({
58
- default: 0,
59
- type: "int",
60
- width: 1,
61
- comment: "Cantidad mínima que el usuario puede agregar para el grupo.\r\n\r\n- Cuando `type` es `Requerido (2)` entonces la cantidad mínima debería ser 1.\r\n\r\n- Cuando `type` es `Opcional (1)` entonces la cantidad puede ser 0.",
62
- }),
63
- __metadata("design:type", Number)
64
- ], ProductGroup.prototype, "minimum_quantity", void 0);
65
- __decorate([
66
- (0, typeorm_1.Column)({
67
- default: 0,
68
- type: "int",
69
- width: 1,
70
- comment: "Cantidad máxima que el usuario puede agregar para el grupo.",
71
- }),
72
- __metadata("design:type", Number)
73
- ], ProductGroup.prototype, "maximum_quantity", void 0);
74
- __decorate([
75
- (0, typeorm_1.Column)({
76
- type: "int",
77
- comment: "El orden en que aparece los grupos en el producto.",
78
- }),
79
- __metadata("design:type", Number)
80
- ], ProductGroup.prototype, "position", void 0);
81
- __decorate([
82
- (0, typeorm_1.OneToMany)(function () { return productGroupComplement_1.ProductGroupComplement; }, function (productGroupComplement) { return productGroupComplement.group_id; }),
83
- __metadata("design:type", Array)
84
- ], ProductGroup.prototype, "groups_complement", void 0);
85
- ProductGroup = __decorate([
86
- (0, typeorm_1.Entity)("product_group", {
87
- comment: "Grupos para agregar al topping por producto.\r\n\r\nEstos elementos que se agreguen acá estarán visibles para los usuarios en la APP.",
88
- })
89
- ], ProductGroup);
90
- return ProductGroup;
91
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const Product_1 = require("./Product");
15
+ const ProductTopping_1 = require("./ProductTopping");
16
+ const productGroupComplement_1 = require("./productGroupComplement");
17
+ let ProductGroup = class ProductGroup {
18
+ };
92
19
  exports.ProductGroup = ProductGroup;
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
+ ], ProductGroup.prototype, "id", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.ManyToOne)(() => Product_1.Product, (product) => product.product_groups, {
29
+ onDelete: "CASCADE",
30
+ onUpdate: "NO ACTION",
31
+ }),
32
+ (0, typeorm_1.JoinColumn)({ name: "product" }),
33
+ __metadata("design:type", Product_1.Product)
34
+ ], ProductGroup.prototype, "product", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.ManyToOne)(() => ProductTopping_1.ProductTopping, (productTopping) => productTopping.product_groups, {
37
+ onDelete: "CASCADE",
38
+ onUpdate: "NO ACTION",
39
+ }),
40
+ (0, typeorm_1.JoinColumn)({ name: "topping" }),
41
+ __metadata("design:type", ProductTopping_1.ProductTopping)
42
+ ], ProductGroup.prototype, "topping", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ length: 30, type: "varchar", comment: "Nombre del grupo." }),
45
+ __metadata("design:type", String)
46
+ ], ProductGroup.prototype, "name", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({
49
+ default: 1,
50
+ type: "int",
51
+ width: 1,
52
+ comment: "El `type` se refiere a si el grupo es opcional o si es requerido:\r\n1. Opcional.\r\n2. Requerido.",
53
+ }),
54
+ __metadata("design:type", Number)
55
+ ], ProductGroup.prototype, "type", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({
58
+ default: 0,
59
+ type: "int",
60
+ width: 1,
61
+ comment: "Cantidad mínima que el usuario puede agregar para el grupo.\r\n\r\n- Cuando `type` es `Requerido (2)` entonces la cantidad mínima debería ser 1.\r\n\r\n- Cuando `type` es `Opcional (1)` entonces la cantidad puede ser 0.",
62
+ }),
63
+ __metadata("design:type", Number)
64
+ ], ProductGroup.prototype, "minimum_quantity", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({
67
+ default: 0,
68
+ type: "int",
69
+ width: 1,
70
+ comment: "Cantidad máxima que el usuario puede agregar para el grupo.",
71
+ }),
72
+ __metadata("design:type", Number)
73
+ ], ProductGroup.prototype, "maximum_quantity", void 0);
74
+ __decorate([
75
+ (0, typeorm_1.Column)({
76
+ type: "int",
77
+ comment: "El orden en que aparece los grupos en el producto.",
78
+ }),
79
+ __metadata("design:type", Number)
80
+ ], ProductGroup.prototype, "position", void 0);
81
+ __decorate([
82
+ (0, typeorm_1.OneToMany)(() => productGroupComplement_1.ProductGroupComplement, (productGroupComplement) => productGroupComplement.group_id),
83
+ __metadata("design:type", Array)
84
+ ], ProductGroup.prototype, "groups_complement", void 0);
85
+ exports.ProductGroup = ProductGroup = __decorate([
86
+ (0, typeorm_1.Entity)("product_group", {
87
+ comment: "Grupos para agregar al topping por producto.\r\n\r\nEstos elementos que se agreguen acá estarán visibles para los usuarios en la APP.",
88
+ })
89
+ ], ProductGroup);