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,159 +10,156 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Request = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var __1 = require("..");
15
- var dateTransformer_1 = require("../transformers/dateTransformer");
16
- var User_1 = require("./User");
17
- var Request = /** @class */ (function () {
18
- function Request() {
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
- ], Request.prototype, "id", void 0);
27
- __decorate([
28
- (0, typeorm_1.Column)({
29
- length: 50,
30
- unique: true,
31
- type: "varchar",
32
- comment: "Código único de cada pedido.\r\nEste código servirá para filtrar por pedidos en la plataforma terminal, y si se va a pagar en efectivo, entonces puede dictar ese número o generar un código QR para leer y traer la información.",
33
- }),
34
- __metadata("design:type", String)
35
- ], Request.prototype, "code", void 0);
36
- __decorate([
37
- (0, typeorm_1.ManyToOne)(function () { return User_1.User; }, function (user) { return user.requests; }, {
38
- nullable: true,
39
- onDelete: "SET NULL",
40
- onUpdate: "NO ACTION",
41
- }),
42
- (0, typeorm_1.JoinColumn)({ name: "user" }),
43
- __metadata("design:type", Object)
44
- ], Request.prototype, "user", void 0);
45
- __decorate([
46
- (0, typeorm_1.ManyToOne)(function () { return __1.UserAddress; }, function (userAddress) { return userAddress.requests; }, {
47
- nullable: true,
48
- onDelete: "NO ACTION",
49
- onUpdate: "NO ACTION",
50
- }),
51
- (0, typeorm_1.JoinColumn)({ name: "address" }),
52
- __metadata("design:type", Object)
53
- ], Request.prototype, "address", void 0);
54
- __decorate([
55
- (0, typeorm_1.Column)({
56
- length: 15,
57
- type: "varchar",
58
- nullable: true,
59
- default: null,
60
- comment: "Contacto del usuario que recibe el pedido. Este campo es cuando el order_type es tipo 3 y no hay información de las direcciones de entrega del usuario",
61
- }),
62
- __metadata("design:type", Object)
63
- ], Request.prototype, "delivery_phone", void 0);
64
- __decorate([
65
- (0, typeorm_1.Column)({
66
- length: 200,
67
- type: "varchar",
68
- nullable: true,
69
- default: null,
70
- comment: "Observaciones de la entrega del pedido. Este campo es cuando el order_type es tipo 3 y no hay información de las direcciones de entrega del usuario",
71
- }),
72
- __metadata("design:type", Object)
73
- ], Request.prototype, "delivery_comments", void 0);
74
- __decorate([
75
- (0, typeorm_1.Column)({
76
- length: 150,
77
- type: "varchar",
78
- nullable: true,
79
- default: null,
80
- comment: "Dirección donde se va a entregar el pedido. Este campo es cuando el order_type es tipo 3 y no hay información de las direcciones de entrega del usuario",
81
- }),
82
- __metadata("design:type", Object)
83
- ], Request.prototype, "delivery_address", void 0);
84
- __decorate([
85
- (0, typeorm_1.Column)({
86
- default: 1,
87
- type: "int",
88
- width: 1,
89
- comment: "Este campo hace referencia a si el tipo es:\r\n\r\n1. Individual: Un solo usuario ordena y paga.\r\n\r\n2. Grupal: El usuario principal puede agregar a otros colaboradores para realizar un pedido grupal (a tener en cuenta que el usuario principal es el único que puede realizar el pago del pedido).",
90
- }),
91
- __metadata("design:type", Number)
92
- ], Request.prototype, "order_mode", void 0);
93
- __decorate([
94
- (0, typeorm_1.Column)({
95
- default: 1,
96
- type: "int",
97
- width: 1,
98
- comment: "Puedo saber si el pedido es para:\r\n1. Comer en el establecimiento.\r\n2. Recoger para llevar.\r\n3. Para llevar.",
99
- }),
100
- __metadata("design:type", Number)
101
- ], Request.prototype, "order_type", void 0);
102
- __decorate([
103
- (0, typeorm_1.Column)({
104
- type: "decimal",
105
- precision: 10,
106
- scale: 2,
107
- comment: "Costo total del pedido, aquí toca tener en cuenta los productos (request_product) que se agreguen al pedido (request) y los complementos (request_product_group_complement).",
108
- }),
109
- __metadata("design:type", Number)
110
- ], Request.prototype, "order_cost", void 0);
111
- __decorate([
112
- (0, typeorm_1.Column)({
113
- default: 0,
114
- type: "int",
115
- width: 1,
116
- comment: "Estado en el que se encuentra un pedido.\r\n0. En proceso: El usuario está agregando los productos del/los local/es.\r\n1. Creado: El usuario ya creó el pedido con los prductos en los/el local/es especificado/s.\r\n2. Cancelado: El usuario canceló el pedido, esto sólo se permite si aún no está pago el pedido.\r\n3. Rechazado: Si un local canceló el pedido por x circustancias. Cabe resaltar que si el pedido fue solicitado a más de un local, el estado 3 sólo se agregaría al pedido si todos los locales cancelaron (Se tiene un estado para cada local en la tabla request_local) -> Aún no se sabe si este estado va.\r\n4. Finalizado: El pedido fue entregado y también pagado. Si el pedido se realizó en varios locales, entonces sólo se pasará a Finalizado, cuando todos los locales a los que se le hizo el pedido están pagos y con los productos entregados.",
117
- }),
118
- __metadata("design:type", Number)
119
- ], Request.prototype, "status", void 0);
120
- __decorate([
121
- (0, typeorm_1.Column)({
122
- type: "datetime",
123
- transformer: new dateTransformer_1.DateTransformer(),
124
- comment: "Fecha en la que el cliente final crea el pedido.",
125
- }),
126
- __metadata("design:type", Date)
127
- ], Request.prototype, "created", void 0);
128
- __decorate([
129
- (0, typeorm_1.Column)({
130
- type: "datetime",
131
- transformer: new dateTransformer_1.DateTransformer(),
132
- nullable: true,
133
- default: null,
134
- comment: "Fecha en la que el cliente final hace la última actualización del pedido.",
135
- }),
136
- __metadata("design:type", Object)
137
- ], Request.prototype, "updated", void 0);
138
- __decorate([
139
- (0, typeorm_1.OneToMany)(function () { return __1.RequestLocal; }, function (requestLocal) { return requestLocal.request; }),
140
- __metadata("design:type", Array)
141
- ], Request.prototype, "requests_local", void 0);
142
- __decorate([
143
- (0, typeorm_1.ManyToMany)(function () { return User_1.User; }, function (user) { return user.requests_group; }),
144
- (0, typeorm_1.JoinTable)({
145
- name: "request_group",
146
- joinColumn: {
147
- name: "request",
148
- referencedColumnName: "id",
149
- },
150
- inverseJoinColumn: {
151
- name: "user",
152
- referencedColumnName: "id",
153
- },
154
- }),
155
- __metadata("design:type", Array)
156
- ], Request.prototype, "requests_group", void 0);
157
- __decorate([
158
- (0, typeorm_1.OneToMany)(function () { return __1.RequestPrint; }, function (requestPrint) { return requestPrint.request; }),
159
- __metadata("design:type", Array)
160
- ], Request.prototype, "request_prints", void 0);
161
- Request = __decorate([
162
- (0, typeorm_1.Entity)({
163
- comment: "Tabla para agregar los pedidos realizados através de la plataforma.",
164
- })
165
- ], Request);
166
- return Request;
167
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const __1 = require("..");
15
+ const dateTransformer_1 = require("../transformers/dateTransformer");
16
+ const User_1 = require("./User");
17
+ let Request = class Request {
18
+ };
168
19
  exports.Request = Request;
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
+ ], Request.prototype, "id", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)({
29
+ length: 50,
30
+ unique: true,
31
+ type: "varchar",
32
+ comment: "Código único de cada pedido.\r\nEste código servirá para filtrar por pedidos en la plataforma terminal, y si se va a pagar en efectivo, entonces puede dictar ese número o generar un código QR para leer y traer la información.",
33
+ }),
34
+ __metadata("design:type", String)
35
+ ], Request.prototype, "code", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.ManyToOne)(() => User_1.User, (user) => user.requests, {
38
+ nullable: true,
39
+ onDelete: "SET NULL",
40
+ onUpdate: "NO ACTION",
41
+ }),
42
+ (0, typeorm_1.JoinColumn)({ name: "user" }),
43
+ __metadata("design:type", Object)
44
+ ], Request.prototype, "user", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.ManyToOne)(() => __1.UserAddress, (userAddress) => userAddress.requests, {
47
+ nullable: true,
48
+ onDelete: "NO ACTION",
49
+ onUpdate: "NO ACTION",
50
+ }),
51
+ (0, typeorm_1.JoinColumn)({ name: "address" }),
52
+ __metadata("design:type", Object)
53
+ ], Request.prototype, "address", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.Column)({
56
+ length: 15,
57
+ type: "varchar",
58
+ nullable: true,
59
+ default: null,
60
+ comment: "Contacto del usuario que recibe el pedido. Este campo es cuando el order_type es tipo 3 y no hay información de las direcciones de entrega del usuario",
61
+ }),
62
+ __metadata("design:type", Object)
63
+ ], Request.prototype, "delivery_phone", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)({
66
+ length: 200,
67
+ type: "varchar",
68
+ nullable: true,
69
+ default: null,
70
+ comment: "Observaciones de la entrega del pedido. Este campo es cuando el order_type es tipo 3 y no hay información de las direcciones de entrega del usuario",
71
+ }),
72
+ __metadata("design:type", Object)
73
+ ], Request.prototype, "delivery_comments", void 0);
74
+ __decorate([
75
+ (0, typeorm_1.Column)({
76
+ length: 150,
77
+ type: "varchar",
78
+ nullable: true,
79
+ default: null,
80
+ comment: "Dirección donde se va a entregar el pedido. Este campo es cuando el order_type es tipo 3 y no hay información de las direcciones de entrega del usuario",
81
+ }),
82
+ __metadata("design:type", Object)
83
+ ], Request.prototype, "delivery_address", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({
86
+ default: 1,
87
+ type: "int",
88
+ width: 1,
89
+ comment: "Este campo hace referencia a si el tipo es:\r\n\r\n1. Individual: Un solo usuario ordena y paga.\r\n\r\n2. Grupal: El usuario principal puede agregar a otros colaboradores para realizar un pedido grupal (a tener en cuenta que el usuario principal es el único que puede realizar el pago del pedido).",
90
+ }),
91
+ __metadata("design:type", Number)
92
+ ], Request.prototype, "order_mode", void 0);
93
+ __decorate([
94
+ (0, typeorm_1.Column)({
95
+ default: 1,
96
+ type: "int",
97
+ width: 1,
98
+ comment: "Puedo saber si el pedido es para:\r\n1. Comer en el establecimiento.\r\n2. Recoger para llevar.\r\n3. Para llevar.",
99
+ }),
100
+ __metadata("design:type", Number)
101
+ ], Request.prototype, "order_type", void 0);
102
+ __decorate([
103
+ (0, typeorm_1.Column)({
104
+ type: "decimal",
105
+ precision: 10,
106
+ scale: 2,
107
+ comment: "Costo total del pedido, aquí toca tener en cuenta los productos (request_product) que se agreguen al pedido (request) y los complementos (request_product_group_complement).",
108
+ }),
109
+ __metadata("design:type", Number)
110
+ ], Request.prototype, "order_cost", void 0);
111
+ __decorate([
112
+ (0, typeorm_1.Column)({
113
+ default: 0,
114
+ type: "int",
115
+ width: 1,
116
+ comment: "Estado en el que se encuentra un pedido.\r\n0. En proceso: El usuario está agregando los productos del/los local/es.\r\n1. Creado: El usuario ya creó el pedido con los prductos en los/el local/es especificado/s.\r\n2. Cancelado: El usuario canceló el pedido, esto sólo se permite si aún no está pago el pedido.\r\n3. Rechazado: Si un local canceló el pedido por x circustancias. Cabe resaltar que si el pedido fue solicitado a más de un local, el estado 3 sólo se agregaría al pedido si todos los locales cancelaron (Se tiene un estado para cada local en la tabla request_local) -> Aún no se sabe si este estado va.\r\n4. Finalizado: El pedido fue entregado y también pagado. Si el pedido se realizó en varios locales, entonces sólo se pasará a Finalizado, cuando todos los locales a los que se le hizo el pedido están pagos y con los productos entregados.",
117
+ }),
118
+ __metadata("design:type", Number)
119
+ ], Request.prototype, "status", void 0);
120
+ __decorate([
121
+ (0, typeorm_1.Column)({
122
+ type: "datetime",
123
+ transformer: new dateTransformer_1.DateTransformer(),
124
+ comment: "Fecha en la que el cliente final crea el pedido.",
125
+ }),
126
+ __metadata("design:type", Date)
127
+ ], Request.prototype, "created", void 0);
128
+ __decorate([
129
+ (0, typeorm_1.Column)({
130
+ type: "datetime",
131
+ transformer: new dateTransformer_1.DateTransformer(),
132
+ nullable: true,
133
+ default: null,
134
+ comment: "Fecha en la que el cliente final hace la última actualización del pedido.",
135
+ }),
136
+ __metadata("design:type", Object)
137
+ ], Request.prototype, "updated", void 0);
138
+ __decorate([
139
+ (0, typeorm_1.OneToMany)(() => __1.RequestLocal, (requestLocal) => requestLocal.request),
140
+ __metadata("design:type", Array)
141
+ ], Request.prototype, "requests_local", void 0);
142
+ __decorate([
143
+ (0, typeorm_1.ManyToMany)(() => User_1.User, (user) => user.requests_group),
144
+ (0, typeorm_1.JoinTable)({
145
+ name: "request_group",
146
+ joinColumn: {
147
+ name: "request",
148
+ referencedColumnName: "id",
149
+ },
150
+ inverseJoinColumn: {
151
+ name: "user",
152
+ referencedColumnName: "id",
153
+ },
154
+ }),
155
+ __metadata("design:type", Array)
156
+ ], Request.prototype, "requests_group", void 0);
157
+ __decorate([
158
+ (0, typeorm_1.OneToMany)(() => __1.RequestPrint, (requestPrint) => requestPrint.request),
159
+ __metadata("design:type", Array)
160
+ ], Request.prototype, "request_prints", void 0);
161
+ exports.Request = Request = __decorate([
162
+ (0, typeorm_1.Entity)({
163
+ comment: "Tabla para agregar los pedidos realizados através de la plataforma.",
164
+ })
165
+ ], Request);
@@ -10,132 +10,129 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RequestInvoice = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var dateTransformer_1 = require("../transformers/dateTransformer");
15
- var Local_1 = require("./Local");
16
- var Partner_1 = require("./Partner");
17
- var RequestInvoiceCategory_1 = require("./RequestInvoiceCategory");
18
- var RequestInvoice = /** @class */ (function () {
19
- function RequestInvoice() {
20
- }
21
- __decorate([
22
- (0, typeorm_1.PrimaryGeneratedColumn)({
23
- type: "int",
24
- comment: "Id único de cada registro.",
25
- }),
26
- __metadata("design:type", Number)
27
- ], RequestInvoice.prototype, "id", void 0);
28
- __decorate([
29
- (0, typeorm_1.Column)({
30
- length: 10,
31
- unique: true,
32
- type: "varchar",
33
- comment: "Código único de cada registro.",
34
- }),
35
- __metadata("design:type", String)
36
- ], RequestInvoice.prototype, "code", void 0);
37
- __decorate([
38
- (0, typeorm_1.ManyToOne)(function () { return Local_1.Local; }, function (local) { return local.request_invoices; }, {
39
- onDelete: "CASCADE",
40
- onUpdate: "NO ACTION",
41
- }),
42
- (0, typeorm_1.JoinColumn)({ name: "local" }),
43
- __metadata("design:type", Local_1.Local)
44
- ], RequestInvoice.prototype, "local", void 0);
45
- __decorate([
46
- (0, typeorm_1.Column)({ length: 50, type: "varchar", comment: "Nombre del registro." }),
47
- __metadata("design:type", String)
48
- ], RequestInvoice.prototype, "name", void 0);
49
- __decorate([
50
- (0, typeorm_1.Column)({
51
- length: 300,
52
- nullable: true,
53
- default: null,
54
- type: "varchar",
55
- comment: "Nombre del registro.",
56
- }),
57
- __metadata("design:type", Object)
58
- ], RequestInvoice.prototype, "description", void 0);
59
- __decorate([
60
- (0, typeorm_1.Column)({
61
- length: 100,
62
- type: "varchar",
63
- unique: true,
64
- comment: "Atajo de teclado para cada registro, cada atajo de teclado debe ser único.",
65
- }),
66
- __metadata("design:type", String)
67
- ], RequestInvoice.prototype, "keyboard_shortcut", void 0);
68
- __decorate([
69
- (0, typeorm_1.Column)({
70
- length: 20,
71
- type: "varchar",
72
- comment: "Estados donde se va a mostrar la factura, esto se guarda como una cadena de números (estado) separado por , '1,3,5,6'.",
73
- }),
74
- __metadata("design:type", String)
75
- ], RequestInvoice.prototype, "request_status", void 0);
76
- __decorate([
77
- (0, typeorm_1.Column)({
78
- default: 1,
79
- type: "int",
80
- width: 1,
81
- comment: "Tipos de impresión:\r\n1. Factura general del pedido: Esta factura debería mostrar todo lo que tiene el pedido, productos, fecha, orden, usuario si lo hay...\r\n2. Factura tipo comanda: Acá sólo se muestra la información de la mesa, quién es el mesero (Si el mesero atendió) y los productos con sus comentarios.",
82
- }),
83
- __metadata("design:type", Number)
84
- ], RequestInvoice.prototype, "print_type", void 0);
85
- __decorate([
86
- (0, typeorm_1.Column)({
87
- default: 1,
88
- type: "int",
89
- comment: "Cantidad de veces qué se va a imprimir cada registro, por defecto es 1.",
90
- }),
91
- __metadata("design:type", Number)
92
- ], RequestInvoice.prototype, "print_quantity", void 0);
93
- __decorate([
94
- (0, typeorm_1.Column)({
95
- type: "datetime",
96
- transformer: new dateTransformer_1.DateTransformer(),
97
- comment: "Fecha de creación del registro.",
98
- }),
99
- __metadata("design:type", Date)
100
- ], RequestInvoice.prototype, "created", void 0);
101
- __decorate([
102
- (0, typeorm_1.Column)({
103
- type: "datetime",
104
- transformer: new dateTransformer_1.DateTransformer(),
105
- nullable: true,
106
- default: null,
107
- comment: "Fecha de actualización del registro.",
108
- }),
109
- __metadata("design:type", Object)
110
- ], RequestInvoice.prototype, "updated", void 0);
111
- __decorate([
112
- (0, typeorm_1.ManyToOne)(function () { return Partner_1.Partner; }, function (partner) { return partner.request_invoices; }, {
113
- onDelete: "RESTRICT",
114
- onUpdate: "NO ACTION",
115
- nullable: true,
116
- }),
117
- (0, typeorm_1.JoinColumn)({ name: "updated_by" }),
118
- __metadata("design:type", Object)
119
- ], RequestInvoice.prototype, "updated_by", 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\n0: Inactivo.\r\n1: Activo.",
126
- }),
127
- __metadata("design:type", Number)
128
- ], RequestInvoice.prototype, "status", void 0);
129
- __decorate([
130
- (0, typeorm_1.OneToMany)(function () { return RequestInvoiceCategory_1.RequestInvoiceCategory; }, function (requestInvoiceCategory) { return requestInvoiceCategory.request_invoice; }),
131
- __metadata("design:type", Array)
132
- ], RequestInvoice.prototype, "request_invoice_categories", void 0);
133
- RequestInvoice = __decorate([
134
- (0, typeorm_1.Entity)({
135
- comment: "Facturas que se agregan para imprimir en los pedidos.",
136
- name: "request_invoice",
137
- })
138
- ], RequestInvoice);
139
- return RequestInvoice;
140
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const dateTransformer_1 = require("../transformers/dateTransformer");
15
+ const Local_1 = require("./Local");
16
+ const Partner_1 = require("./Partner");
17
+ const RequestInvoiceCategory_1 = require("./RequestInvoiceCategory");
18
+ let RequestInvoice = class RequestInvoice {
19
+ };
141
20
  exports.RequestInvoice = RequestInvoice;
21
+ __decorate([
22
+ (0, typeorm_1.PrimaryGeneratedColumn)({
23
+ type: "int",
24
+ comment: "Id único de cada registro.",
25
+ }),
26
+ __metadata("design:type", Number)
27
+ ], RequestInvoice.prototype, "id", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({
30
+ length: 10,
31
+ unique: true,
32
+ type: "varchar",
33
+ comment: "Código único de cada registro.",
34
+ }),
35
+ __metadata("design:type", String)
36
+ ], RequestInvoice.prototype, "code", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.ManyToOne)(() => Local_1.Local, (local) => local.request_invoices, {
39
+ onDelete: "CASCADE",
40
+ onUpdate: "NO ACTION",
41
+ }),
42
+ (0, typeorm_1.JoinColumn)({ name: "local" }),
43
+ __metadata("design:type", Local_1.Local)
44
+ ], RequestInvoice.prototype, "local", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ length: 50, type: "varchar", comment: "Nombre del registro." }),
47
+ __metadata("design:type", String)
48
+ ], RequestInvoice.prototype, "name", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({
51
+ length: 300,
52
+ nullable: true,
53
+ default: null,
54
+ type: "varchar",
55
+ comment: "Nombre del registro.",
56
+ }),
57
+ __metadata("design:type", Object)
58
+ ], RequestInvoice.prototype, "description", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({
61
+ length: 100,
62
+ type: "varchar",
63
+ unique: true,
64
+ comment: "Atajo de teclado para cada registro, cada atajo de teclado debe ser único.",
65
+ }),
66
+ __metadata("design:type", String)
67
+ ], RequestInvoice.prototype, "keyboard_shortcut", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({
70
+ length: 20,
71
+ type: "varchar",
72
+ comment: "Estados donde se va a mostrar la factura, esto se guarda como una cadena de números (estado) separado por , '1,3,5,6'.",
73
+ }),
74
+ __metadata("design:type", String)
75
+ ], RequestInvoice.prototype, "request_status", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)({
78
+ default: 1,
79
+ type: "int",
80
+ width: 1,
81
+ comment: "Tipos de impresión:\r\n1. Factura general del pedido: Esta factura debería mostrar todo lo que tiene el pedido, productos, fecha, orden, usuario si lo hay...\r\n2. Factura tipo comanda: Acá sólo se muestra la información de la mesa, quién es el mesero (Si el mesero atendió) y los productos con sus comentarios.",
82
+ }),
83
+ __metadata("design:type", Number)
84
+ ], RequestInvoice.prototype, "print_type", void 0);
85
+ __decorate([
86
+ (0, typeorm_1.Column)({
87
+ default: 1,
88
+ type: "int",
89
+ comment: "Cantidad de veces qué se va a imprimir cada registro, por defecto es 1.",
90
+ }),
91
+ __metadata("design:type", Number)
92
+ ], RequestInvoice.prototype, "print_quantity", void 0);
93
+ __decorate([
94
+ (0, typeorm_1.Column)({
95
+ type: "datetime",
96
+ transformer: new dateTransformer_1.DateTransformer(),
97
+ comment: "Fecha de creación del registro.",
98
+ }),
99
+ __metadata("design:type", Date)
100
+ ], RequestInvoice.prototype, "created", void 0);
101
+ __decorate([
102
+ (0, typeorm_1.Column)({
103
+ type: "datetime",
104
+ transformer: new dateTransformer_1.DateTransformer(),
105
+ nullable: true,
106
+ default: null,
107
+ comment: "Fecha de actualización del registro.",
108
+ }),
109
+ __metadata("design:type", Object)
110
+ ], RequestInvoice.prototype, "updated", void 0);
111
+ __decorate([
112
+ (0, typeorm_1.ManyToOne)(() => Partner_1.Partner, (partner) => partner.request_invoices, {
113
+ onDelete: "RESTRICT",
114
+ onUpdate: "NO ACTION",
115
+ nullable: true,
116
+ }),
117
+ (0, typeorm_1.JoinColumn)({ name: "updated_by" }),
118
+ __metadata("design:type", Object)
119
+ ], RequestInvoice.prototype, "updated_by", 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\n0: Inactivo.\r\n1: Activo.",
126
+ }),
127
+ __metadata("design:type", Number)
128
+ ], RequestInvoice.prototype, "status", void 0);
129
+ __decorate([
130
+ (0, typeorm_1.OneToMany)(() => RequestInvoiceCategory_1.RequestInvoiceCategory, (requestInvoiceCategory) => requestInvoiceCategory.request_invoice),
131
+ __metadata("design:type", Array)
132
+ ], RequestInvoice.prototype, "request_invoice_categories", void 0);
133
+ exports.RequestInvoice = RequestInvoice = __decorate([
134
+ (0, typeorm_1.Entity)({
135
+ comment: "Facturas que se agregan para imprimir en los pedidos.",
136
+ name: "request_invoice",
137
+ })
138
+ ], RequestInvoice);
@@ -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.RequestInvoiceCategory = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var RequestInvoice_1 = require("./RequestInvoice");
15
- var Category_1 = require("./Category");
16
- var RequestInvoiceCategory = /** @class */ (function () {
17
- function RequestInvoiceCategory() {
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
- ], RequestInvoiceCategory.prototype, "id", void 0);
26
- __decorate([
27
- (0, typeorm_1.ManyToOne)(function () { return RequestInvoice_1.RequestInvoice; }, function (requestInvoice) { return requestInvoice.request_invoice_categories; }, {
28
- onDelete: "CASCADE",
29
- onUpdate: "NO ACTION",
30
- }),
31
- (0, typeorm_1.JoinColumn)({ name: "request_invoice" }),
32
- __metadata("design:type", RequestInvoice_1.RequestInvoice)
33
- ], RequestInvoiceCategory.prototype, "request_invoice", void 0);
34
- __decorate([
35
- (0, typeorm_1.ManyToOne)(function () { return Category_1.Category; }, function (category) { return category.request_invoice_categories; }, {
36
- onDelete: "CASCADE",
37
- onUpdate: "NO ACTION",
38
- }),
39
- (0, typeorm_1.JoinColumn)({ name: "category" }),
40
- __metadata("design:type", Category_1.Category)
41
- ], RequestInvoiceCategory.prototype, "category", void 0);
42
- RequestInvoiceCategory = __decorate([
43
- (0, typeorm_1.Entity)({
44
- comment: "Facturas que se agregan para imprimir en los pedidos.",
45
- name: "request_invoice_category",
46
- })
47
- ], RequestInvoiceCategory);
48
- return RequestInvoiceCategory;
49
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const RequestInvoice_1 = require("./RequestInvoice");
15
+ const Category_1 = require("./Category");
16
+ let RequestInvoiceCategory = class RequestInvoiceCategory {
17
+ };
50
18
  exports.RequestInvoiceCategory = RequestInvoiceCategory;
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)({
21
+ type: "int",
22
+ comment: "Id único de cada registro.",
23
+ }),
24
+ __metadata("design:type", Number)
25
+ ], RequestInvoiceCategory.prototype, "id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.ManyToOne)(() => RequestInvoice_1.RequestInvoice, (requestInvoice) => requestInvoice.request_invoice_categories, {
28
+ onDelete: "CASCADE",
29
+ onUpdate: "NO ACTION",
30
+ }),
31
+ (0, typeorm_1.JoinColumn)({ name: "request_invoice" }),
32
+ __metadata("design:type", RequestInvoice_1.RequestInvoice)
33
+ ], RequestInvoiceCategory.prototype, "request_invoice", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.ManyToOne)(() => Category_1.Category, (category) => category.request_invoice_categories, {
36
+ onDelete: "CASCADE",
37
+ onUpdate: "NO ACTION",
38
+ }),
39
+ (0, typeorm_1.JoinColumn)({ name: "category" }),
40
+ __metadata("design:type", Category_1.Category)
41
+ ], RequestInvoiceCategory.prototype, "category", void 0);
42
+ exports.RequestInvoiceCategory = RequestInvoiceCategory = __decorate([
43
+ (0, typeorm_1.Entity)({
44
+ comment: "Facturas que se agregan para imprimir en los pedidos.",
45
+ name: "request_invoice_category",
46
+ })
47
+ ], RequestInvoiceCategory);