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.
Files changed (103) 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 +72 -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.js +384 -387
  95. package/dist/views/MasterNotifications.js +132 -135
  96. package/dist/views/PartnerNotifications.js +104 -107
  97. package/dist/views/Partners.js +140 -143
  98. package/dist/views/VerifyLocals.js +152 -155
  99. package/dist/views/ViewLocalsCompanies.js +100 -103
  100. package/package.json +3 -2
  101. package/src/entities/Configuration.ts +3 -1
  102. package/src/transformers/jsonEncryptionTransformer.ts +78 -0
  103. package/tsconfig.json +7 -3
@@ -10,161 +10,158 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RequestLocalPayment = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var __1 = require("..");
15
- var dateTransformer_1 = require("../transformers/dateTransformer");
16
- var RequestLocalPayment = /** @class */ (function () {
17
- function RequestLocalPayment() {
18
- }
19
- __decorate([
20
- (0, typeorm_1.PrimaryGeneratedColumn)({
21
- type: "int",
22
- comment: "ID único de cada registro.",
23
- }),
24
- __metadata("design:type", Number)
25
- ], RequestLocalPayment.prototype, "id", void 0);
26
- __decorate([
27
- (0, typeorm_1.Column)({
28
- length: 40,
29
- type: "varchar",
30
- unique: true,
31
- comment: "Código único de cada pago que se realiza.",
32
- }),
33
- __metadata("design:type", String)
34
- ], RequestLocalPayment.prototype, "code", void 0);
35
- __decorate([
36
- (0, typeorm_1.ManyToOne)(function () { return __1.User; }, function (user) { return user.payments_made; }, {
37
- onDelete: "NO ACTION",
38
- onUpdate: "NO ACTION",
39
- nullable: true,
40
- }),
41
- (0, typeorm_1.JoinColumn)({ name: "user" }),
42
- __metadata("design:type", Object)
43
- ], RequestLocalPayment.prototype, "user", void 0);
44
- __decorate([
45
- (0, typeorm_1.ManyToOne)(function () { return __1.RequestLocal; }, function (requestLocal) { return requestLocal.payments_made; }, {
46
- onDelete: "NO ACTION",
47
- onUpdate: "NO ACTION",
48
- }),
49
- (0, typeorm_1.JoinColumn)({ name: "request_local" }),
50
- __metadata("design:type", __1.RequestLocal)
51
- ], RequestLocalPayment.prototype, "request_local", void 0);
52
- __decorate([
53
- (0, typeorm_1.ManyToOne)(function () { return __1.LocalPaymentMethod; }, function (LocalPaymentMethod) { return LocalPaymentMethod.request_payment_methods; }, {
54
- onDelete: "RESTRICT",
55
- onUpdate: "NO ACTION",
56
- }),
57
- (0, typeorm_1.JoinColumn)({ name: "payment_method" }),
58
- __metadata("design:type", __1.LocalPaymentMethod)
59
- ], RequestLocalPayment.prototype, "payment_method", void 0);
60
- __decorate([
61
- (0, typeorm_1.Column)({
62
- type: "decimal",
63
- precision: 10,
64
- scale: 2,
65
- comment: "Monto que se paga del pedido.",
66
- }),
67
- __metadata("design:type", Number)
68
- ], RequestLocalPayment.prototype, "amount_paid", void 0);
69
- __decorate([
70
- (0, typeorm_1.Column)({
71
- type: "decimal",
72
- precision: 10,
73
- scale: 2,
74
- comment: "Monto restante para pagar.",
75
- }),
76
- __metadata("design:type", Number)
77
- ], RequestLocalPayment.prototype, "remaining_amount", void 0);
78
- __decorate([
79
- (0, typeorm_1.Column)({
80
- type: "varchar",
81
- length: 4,
82
- nullable: true,
83
- default: null,
84
- comment: "Si se paga con tarjeta, entonces se almacenan los últimos 4 dígitos de la tarjeta de crédito/débito con el que se paga.",
85
- }),
86
- __metadata("design:type", Object)
87
- ], RequestLocalPayment.prototype, "card_last_four_digits", void 0);
88
- __decorate([
89
- (0, typeorm_1.Column)({
90
- type: "varchar",
91
- length: 50,
92
- nullable: true,
93
- default: null,
94
- comment: "Si se paga con tarjeta, entonces se guarda el tipo de tarjeta con la que se paga.",
95
- }),
96
- __metadata("design:type", Object)
97
- ], RequestLocalPayment.prototype, "card_type", void 0);
98
- __decorate([
99
- (0, typeorm_1.ManyToOne)(function () { return __1.UserPaymentMethod; }, function (card) { return card.cards; }, {
100
- onDelete: "NO ACTION",
101
- onUpdate: "NO ACTION",
102
- nullable: true,
103
- }),
104
- (0, typeorm_1.JoinColumn)({ name: "card" }),
105
- __metadata("design:type", Object)
106
- ], RequestLocalPayment.prototype, "card", void 0);
107
- __decorate([
108
- (0, typeorm_1.Column)({
109
- type: "varchar",
110
- length: 255,
111
- nullable: true,
112
- default: null,
113
- comment: "Comentarios del pago, si aplica.",
114
- }),
115
- __metadata("design:type", Object)
116
- ], RequestLocalPayment.prototype, "comments", void 0);
117
- __decorate([
118
- (0, typeorm_1.Column)({
119
- type: "int",
120
- width: 1,
121
- comment: "Estado del pago:\r\n1. Aprobado.\r\n2. Rechazado.\r\n3. Pendiente.",
122
- default: 3,
123
- }),
124
- __metadata("design:type", Number)
125
- ], RequestLocalPayment.prototype, "status", void 0);
126
- __decorate([
127
- (0, typeorm_1.Column)({
128
- type: "datetime",
129
- transformer: new dateTransformer_1.DateTransformer(),
130
- comment: "Fecha de creación del registro.",
131
- }),
132
- __metadata("design:type", Date)
133
- ], RequestLocalPayment.prototype, "created", void 0);
134
- __decorate([
135
- (0, typeorm_1.Column)({
136
- type: "datetime",
137
- nullable: true,
138
- default: null,
139
- transformer: new dateTransformer_1.DateTransformer(),
140
- comment: "Fecha de actualización del registro.",
141
- }),
142
- __metadata("design:type", Object)
143
- ], RequestLocalPayment.prototype, "updated", void 0);
144
- __decorate([
145
- (0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.requests_local_payment; }, {
146
- onDelete: "NO ACTION",
147
- onUpdate: "NO ACTION",
148
- nullable: true,
149
- }),
150
- (0, typeorm_1.JoinColumn)({ name: "partner" }),
151
- __metadata("design:type", Object)
152
- ], RequestLocalPayment.prototype, "partner", void 0);
153
- __decorate([
154
- (0, typeorm_1.Column)({
155
- type: "varchar",
156
- length: 45,
157
- nullable: true,
158
- comment: "Dirección ip donde se hace la solicitud del pago.",
159
- }),
160
- __metadata("design:type", Object)
161
- ], RequestLocalPayment.prototype, "user_ip", void 0);
162
- RequestLocalPayment = __decorate([
163
- (0, typeorm_1.Entity)({
164
- comment: "Tabla creada para almacenar y llevar el control del los pagos que se han realizado de los pedidos.",
165
- name: "request_local_payment",
166
- })
167
- ], RequestLocalPayment);
168
- return RequestLocalPayment;
169
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const __1 = require("..");
15
+ const dateTransformer_1 = require("../transformers/dateTransformer");
16
+ let RequestLocalPayment = class RequestLocalPayment {
17
+ };
170
18
  exports.RequestLocalPayment = RequestLocalPayment;
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)({
21
+ type: "int",
22
+ comment: "ID único de cada registro.",
23
+ }),
24
+ __metadata("design:type", Number)
25
+ ], RequestLocalPayment.prototype, "id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)({
28
+ length: 40,
29
+ type: "varchar",
30
+ unique: true,
31
+ comment: "Código único de cada pago que se realiza.",
32
+ }),
33
+ __metadata("design:type", String)
34
+ ], RequestLocalPayment.prototype, "code", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.ManyToOne)(() => __1.User, (user) => user.payments_made, {
37
+ onDelete: "NO ACTION",
38
+ onUpdate: "NO ACTION",
39
+ nullable: true,
40
+ }),
41
+ (0, typeorm_1.JoinColumn)({ name: "user" }),
42
+ __metadata("design:type", Object)
43
+ ], RequestLocalPayment.prototype, "user", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.ManyToOne)(() => __1.RequestLocal, (requestLocal) => requestLocal.payments_made, {
46
+ onDelete: "NO ACTION",
47
+ onUpdate: "NO ACTION",
48
+ }),
49
+ (0, typeorm_1.JoinColumn)({ name: "request_local" }),
50
+ __metadata("design:type", __1.RequestLocal)
51
+ ], RequestLocalPayment.prototype, "request_local", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.ManyToOne)(() => __1.LocalPaymentMethod, (LocalPaymentMethod) => LocalPaymentMethod.request_payment_methods, {
54
+ onDelete: "RESTRICT",
55
+ onUpdate: "NO ACTION",
56
+ }),
57
+ (0, typeorm_1.JoinColumn)({ name: "payment_method" }),
58
+ __metadata("design:type", __1.LocalPaymentMethod)
59
+ ], RequestLocalPayment.prototype, "payment_method", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({
62
+ type: "decimal",
63
+ precision: 10,
64
+ scale: 2,
65
+ comment: "Monto que se paga del pedido.",
66
+ }),
67
+ __metadata("design:type", Number)
68
+ ], RequestLocalPayment.prototype, "amount_paid", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({
71
+ type: "decimal",
72
+ precision: 10,
73
+ scale: 2,
74
+ comment: "Monto restante para pagar.",
75
+ }),
76
+ __metadata("design:type", Number)
77
+ ], RequestLocalPayment.prototype, "remaining_amount", void 0);
78
+ __decorate([
79
+ (0, typeorm_1.Column)({
80
+ type: "varchar",
81
+ length: 4,
82
+ nullable: true,
83
+ default: null,
84
+ comment: "Si se paga con tarjeta, entonces se almacenan los últimos 4 dígitos de la tarjeta de crédito/débito con el que se paga.",
85
+ }),
86
+ __metadata("design:type", Object)
87
+ ], RequestLocalPayment.prototype, "card_last_four_digits", void 0);
88
+ __decorate([
89
+ (0, typeorm_1.Column)({
90
+ type: "varchar",
91
+ length: 50,
92
+ nullable: true,
93
+ default: null,
94
+ comment: "Si se paga con tarjeta, entonces se guarda el tipo de tarjeta con la que se paga.",
95
+ }),
96
+ __metadata("design:type", Object)
97
+ ], RequestLocalPayment.prototype, "card_type", void 0);
98
+ __decorate([
99
+ (0, typeorm_1.ManyToOne)(() => __1.UserPaymentMethod, (card) => card.cards, {
100
+ onDelete: "NO ACTION",
101
+ onUpdate: "NO ACTION",
102
+ nullable: true,
103
+ }),
104
+ (0, typeorm_1.JoinColumn)({ name: "card" }),
105
+ __metadata("design:type", Object)
106
+ ], RequestLocalPayment.prototype, "card", void 0);
107
+ __decorate([
108
+ (0, typeorm_1.Column)({
109
+ type: "varchar",
110
+ length: 255,
111
+ nullable: true,
112
+ default: null,
113
+ comment: "Comentarios del pago, si aplica.",
114
+ }),
115
+ __metadata("design:type", Object)
116
+ ], RequestLocalPayment.prototype, "comments", void 0);
117
+ __decorate([
118
+ (0, typeorm_1.Column)({
119
+ type: "int",
120
+ width: 1,
121
+ comment: "Estado del pago:\r\n1. Aprobado.\r\n2. Rechazado.\r\n3. Pendiente.",
122
+ default: 3,
123
+ }),
124
+ __metadata("design:type", Number)
125
+ ], RequestLocalPayment.prototype, "status", void 0);
126
+ __decorate([
127
+ (0, typeorm_1.Column)({
128
+ type: "datetime",
129
+ transformer: new dateTransformer_1.DateTransformer(),
130
+ comment: "Fecha de creación del registro.",
131
+ }),
132
+ __metadata("design:type", Date)
133
+ ], RequestLocalPayment.prototype, "created", void 0);
134
+ __decorate([
135
+ (0, typeorm_1.Column)({
136
+ type: "datetime",
137
+ nullable: true,
138
+ default: null,
139
+ transformer: new dateTransformer_1.DateTransformer(),
140
+ comment: "Fecha de actualización del registro.",
141
+ }),
142
+ __metadata("design:type", Object)
143
+ ], RequestLocalPayment.prototype, "updated", void 0);
144
+ __decorate([
145
+ (0, typeorm_1.ManyToOne)(() => __1.Partner, (partner) => partner.requests_local_payment, {
146
+ onDelete: "NO ACTION",
147
+ onUpdate: "NO ACTION",
148
+ nullable: true,
149
+ }),
150
+ (0, typeorm_1.JoinColumn)({ name: "partner" }),
151
+ __metadata("design:type", Object)
152
+ ], RequestLocalPayment.prototype, "partner", void 0);
153
+ __decorate([
154
+ (0, typeorm_1.Column)({
155
+ type: "varchar",
156
+ length: 45,
157
+ nullable: true,
158
+ comment: "Dirección ip donde se hace la solicitud del pago.",
159
+ }),
160
+ __metadata("design:type", Object)
161
+ ], RequestLocalPayment.prototype, "user_ip", void 0);
162
+ exports.RequestLocalPayment = RequestLocalPayment = __decorate([
163
+ (0, typeorm_1.Entity)({
164
+ comment: "Tabla creada para almacenar y llevar el control del los pagos que se han realizado de los pedidos.",
165
+ name: "request_local_payment",
166
+ })
167
+ ], RequestLocalPayment);
@@ -10,41 +10,38 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RequestLocalTable = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var RequestLocal_1 = require("./RequestLocal");
15
- var LocalTable_1 = require("./LocalTable");
16
- var RequestLocalTable = /** @class */ (function () {
17
- function RequestLocalTable() {
18
- }
19
- __decorate([
20
- (0, typeorm_1.PrimaryGeneratedColumn)({
21
- type: "int",
22
- comment: "ID único de cada registro.",
23
- }),
24
- __metadata("design:type", Number)
25
- ], RequestLocalTable.prototype, "id", void 0);
26
- __decorate([
27
- (0, typeorm_1.ManyToOne)(function () { return RequestLocal_1.RequestLocal; }, function (requestLocal) { return requestLocal.request_locals_table; }, {
28
- onDelete: "CASCADE",
29
- onUpdate: "NO ACTION",
30
- }),
31
- (0, typeorm_1.JoinColumn)({ name: "request_local" }),
32
- __metadata("design:type", RequestLocal_1.RequestLocal)
33
- ], RequestLocalTable.prototype, "request_local", void 0);
34
- __decorate([
35
- (0, typeorm_1.ManyToOne)(function () { return LocalTable_1.LocalTable; }, function (localTable) { return localTable.request_local_tables; }, {
36
- onDelete: "CASCADE",
37
- onUpdate: "NO ACTION",
38
- }),
39
- (0, typeorm_1.JoinColumn)({ name: "local_table" }),
40
- __metadata("design:type", LocalTable_1.LocalTable)
41
- ], RequestLocalTable.prototype, "local_table", void 0);
42
- RequestLocalTable = __decorate([
43
- (0, typeorm_1.Entity)({
44
- comment: "Relación de la/s mesas y el local del cuál se está pidiendo.",
45
- name: "request_local_table",
46
- })
47
- ], RequestLocalTable);
48
- return RequestLocalTable;
49
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const RequestLocal_1 = require("./RequestLocal");
15
+ const LocalTable_1 = require("./LocalTable");
16
+ let RequestLocalTable = class RequestLocalTable {
17
+ };
50
18
  exports.RequestLocalTable = RequestLocalTable;
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)({
21
+ type: "int",
22
+ comment: "ID único de cada registro.",
23
+ }),
24
+ __metadata("design:type", Number)
25
+ ], RequestLocalTable.prototype, "id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.ManyToOne)(() => RequestLocal_1.RequestLocal, (requestLocal) => requestLocal.request_locals_table, {
28
+ onDelete: "CASCADE",
29
+ onUpdate: "NO ACTION",
30
+ }),
31
+ (0, typeorm_1.JoinColumn)({ name: "request_local" }),
32
+ __metadata("design:type", RequestLocal_1.RequestLocal)
33
+ ], RequestLocalTable.prototype, "request_local", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.ManyToOne)(() => LocalTable_1.LocalTable, (localTable) => localTable.request_local_tables, {
36
+ onDelete: "CASCADE",
37
+ onUpdate: "NO ACTION",
38
+ }),
39
+ (0, typeorm_1.JoinColumn)({ name: "local_table" }),
40
+ __metadata("design:type", LocalTable_1.LocalTable)
41
+ ], RequestLocalTable.prototype, "local_table", void 0);
42
+ exports.RequestLocalTable = RequestLocalTable = __decorate([
43
+ (0, typeorm_1.Entity)({
44
+ comment: "Relación de la/s mesas y el local del cuál se está pidiendo.",
45
+ name: "request_local_table",
46
+ })
47
+ ], RequestLocalTable);
@@ -10,67 +10,64 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RequestPrint = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var __1 = require("..");
15
- var dateTransformer_1 = require("../transformers/dateTransformer");
16
- var Request_1 = require("./Request");
17
- var RequestPrint = /** @class */ (function () {
18
- function RequestPrint() {
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
- ], RequestPrint.prototype, "id", void 0);
27
- __decorate([
28
- (0, typeorm_1.Column)({
29
- length: 20,
30
- unique: true,
31
- type: "varchar",
32
- comment: "Código único de cada registro.",
33
- }),
34
- __metadata("design:type", String)
35
- ], RequestPrint.prototype, "code", void 0);
36
- __decorate([
37
- (0, typeorm_1.ManyToOne)(function () { return Request_1.Request; }, function (request) { return request.request_prints; }, {
38
- onDelete: "CASCADE",
39
- onUpdate: "NO ACTION",
40
- }),
41
- (0, typeorm_1.JoinColumn)({ name: "request" }),
42
- __metadata("design:type", Request_1.Request)
43
- ], RequestPrint.prototype, "request", void 0);
44
- __decorate([
45
- (0, typeorm_1.Column)({
46
- type: "int",
47
- default: 1,
48
- width: 1,
49
- comment: "Tipo de impresión para el pedido:\r\n1. Comanda productos.\r\n2. Comando bebidas.\r\n3. Impresión general del pedido.",
50
- }),
51
- __metadata("design:type", Number)
52
- ], RequestPrint.prototype, "type", void 0);
53
- __decorate([
54
- (0, typeorm_1.Column)({
55
- type: "datetime",
56
- transformer: new dateTransformer_1.DateTransformer(),
57
- comment: "Fecha creación de la impresión.",
58
- }),
59
- __metadata("design:type", Date)
60
- ], RequestPrint.prototype, "created", void 0);
61
- __decorate([
62
- (0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.partner_prints; }, {
63
- onDelete: "CASCADE",
64
- onUpdate: "NO ACTION",
65
- }),
66
- (0, typeorm_1.JoinColumn)({ name: "partner" }),
67
- __metadata("design:type", __1.Partner)
68
- ], RequestPrint.prototype, "partner", void 0);
69
- RequestPrint = __decorate([
70
- (0, typeorm_1.Entity)("request_print", {
71
- comment: "Registro y control de las impresiones de los pedidos.",
72
- })
73
- ], RequestPrint);
74
- return RequestPrint;
75
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const __1 = require("..");
15
+ const dateTransformer_1 = require("../transformers/dateTransformer");
16
+ const Request_1 = require("./Request");
17
+ let RequestPrint = class RequestPrint {
18
+ };
76
19
  exports.RequestPrint = RequestPrint;
20
+ __decorate([
21
+ (0, typeorm_1.PrimaryGeneratedColumn)({
22
+ type: "int",
23
+ comment: "ID único de cada registro.",
24
+ }),
25
+ __metadata("design:type", Number)
26
+ ], RequestPrint.prototype, "id", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)({
29
+ length: 20,
30
+ unique: true,
31
+ type: "varchar",
32
+ comment: "Código único de cada registro.",
33
+ }),
34
+ __metadata("design:type", String)
35
+ ], RequestPrint.prototype, "code", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.ManyToOne)(() => Request_1.Request, (request) => request.request_prints, {
38
+ onDelete: "CASCADE",
39
+ onUpdate: "NO ACTION",
40
+ }),
41
+ (0, typeorm_1.JoinColumn)({ name: "request" }),
42
+ __metadata("design:type", Request_1.Request)
43
+ ], RequestPrint.prototype, "request", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({
46
+ type: "int",
47
+ default: 1,
48
+ width: 1,
49
+ comment: "Tipo de impresión para el pedido:\r\n1. Comanda productos.\r\n2. Comando bebidas.\r\n3. Impresión general del pedido.",
50
+ }),
51
+ __metadata("design:type", Number)
52
+ ], RequestPrint.prototype, "type", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({
55
+ type: "datetime",
56
+ transformer: new dateTransformer_1.DateTransformer(),
57
+ comment: "Fecha creación de la impresión.",
58
+ }),
59
+ __metadata("design:type", Date)
60
+ ], RequestPrint.prototype, "created", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.ManyToOne)(() => __1.Partner, (partner) => partner.partner_prints, {
63
+ onDelete: "CASCADE",
64
+ onUpdate: "NO ACTION",
65
+ }),
66
+ (0, typeorm_1.JoinColumn)({ name: "partner" }),
67
+ __metadata("design:type", __1.Partner)
68
+ ], RequestPrint.prototype, "partner", void 0);
69
+ exports.RequestPrint = RequestPrint = __decorate([
70
+ (0, typeorm_1.Entity)("request_print", {
71
+ comment: "Registro y control de las impresiones de los pedidos.",
72
+ })
73
+ ], RequestPrint);
@@ -10,65 +10,62 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RequestProduct = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var Product_1 = require("./Product");
15
- var RequestLocal_1 = require("./RequestLocal");
16
- var User_1 = require("./User");
17
- var RequestProduct = /** @class */ (function () {
18
- function RequestProduct() {
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
- ], RequestProduct.prototype, "id", void 0);
27
- __decorate([
28
- (0, typeorm_1.ManyToOne)(function () { return RequestLocal_1.RequestLocal; }, function (requestLocal) { return requestLocal.request_products; }, {
29
- onDelete: "CASCADE",
30
- onUpdate: "NO ACTION",
31
- }),
32
- (0, typeorm_1.JoinColumn)({ name: "request" }),
33
- __metadata("design:type", RequestLocal_1.RequestLocal)
34
- ], RequestProduct.prototype, "request", void 0);
35
- __decorate([
36
- (0, typeorm_1.ManyToOne)(function () { return Product_1.Product; }, function (product) { return product.request_products; }, {
37
- onDelete: "CASCADE",
38
- onUpdate: "NO ACTION",
39
- }),
40
- (0, typeorm_1.JoinColumn)({ name: "product" }),
41
- __metadata("design:type", Product_1.Product)
42
- ], RequestProduct.prototype, "product", void 0);
43
- __decorate([
44
- (0, typeorm_1.ManyToOne)(function () { return User_1.User; }, function (user) { return user.request_products; }, {
45
- onDelete: "CASCADE",
46
- onUpdate: "NO ACTION",
47
- nullable: true,
48
- }),
49
- (0, typeorm_1.JoinColumn)({ name: "user" }),
50
- __metadata("design:type", Object)
51
- ], RequestProduct.prototype, "user", void 0);
52
- __decorate([
53
- (0, typeorm_1.Column)({ type: "int", comment: "Cantidad del producto (product)." }),
54
- __metadata("design:type", Number)
55
- ], RequestProduct.prototype, "quantity", void 0);
56
- __decorate([
57
- (0, typeorm_1.Column)({
58
- type: "varchar",
59
- length: 500,
60
- nullable: true,
61
- default: null,
62
- comment: "Comentarios del producto, si hay alguna sugerencia o solicitud.",
63
- }),
64
- __metadata("design:type", String)
65
- ], RequestProduct.prototype, "comments", void 0);
66
- RequestProduct = __decorate([
67
- (0, typeorm_1.Entity)("request_product", {
68
- comment: "Productos que están en el pedido.",
69
- }),
70
- (0, typeorm_1.Unique)("unique_request_product", ["request", "product"])
71
- ], RequestProduct);
72
- return RequestProduct;
73
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const Product_1 = require("./Product");
15
+ const RequestLocal_1 = require("./RequestLocal");
16
+ const User_1 = require("./User");
17
+ let RequestProduct = class RequestProduct {
18
+ };
74
19
  exports.RequestProduct = RequestProduct;
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
+ ], RequestProduct.prototype, "id", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.ManyToOne)(() => RequestLocal_1.RequestLocal, (requestLocal) => requestLocal.request_products, {
29
+ onDelete: "CASCADE",
30
+ onUpdate: "NO ACTION",
31
+ }),
32
+ (0, typeorm_1.JoinColumn)({ name: "request" }),
33
+ __metadata("design:type", RequestLocal_1.RequestLocal)
34
+ ], RequestProduct.prototype, "request", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.ManyToOne)(() => Product_1.Product, (product) => product.request_products, {
37
+ onDelete: "CASCADE",
38
+ onUpdate: "NO ACTION",
39
+ }),
40
+ (0, typeorm_1.JoinColumn)({ name: "product" }),
41
+ __metadata("design:type", Product_1.Product)
42
+ ], RequestProduct.prototype, "product", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.ManyToOne)(() => User_1.User, (user) => user.request_products, {
45
+ onDelete: "CASCADE",
46
+ onUpdate: "NO ACTION",
47
+ nullable: true,
48
+ }),
49
+ (0, typeorm_1.JoinColumn)({ name: "user" }),
50
+ __metadata("design:type", Object)
51
+ ], RequestProduct.prototype, "user", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: "int", comment: "Cantidad del producto (product)." }),
54
+ __metadata("design:type", Number)
55
+ ], RequestProduct.prototype, "quantity", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({
58
+ type: "varchar",
59
+ length: 500,
60
+ nullable: true,
61
+ default: null,
62
+ comment: "Comentarios del producto, si hay alguna sugerencia o solicitud.",
63
+ }),
64
+ __metadata("design:type", String)
65
+ ], RequestProduct.prototype, "comments", void 0);
66
+ exports.RequestProduct = RequestProduct = __decorate([
67
+ (0, typeorm_1.Entity)("request_product", {
68
+ comment: "Productos que están en el pedido.",
69
+ }),
70
+ (0, typeorm_1.Unique)("unique_request_product", ["request", "product"])
71
+ ], RequestProduct);