test-entity-library-asm 3.9.4 → 3.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CustomRepository.js +21 -109
- package/dist/entities/AuthenticationCredential.js +54 -57
- package/dist/entities/Bank.js +50 -53
- package/dist/entities/BusinessType.js +47 -50
- package/dist/entities/BusinessTypeProduct.js +68 -71
- package/dist/entities/Category.js +148 -151
- package/dist/entities/CategoryDate.js +39 -42
- package/dist/entities/CategorySchedule.js +41 -44
- package/dist/entities/City.js +70 -73
- package/dist/entities/CodeRedemptionHistoryCompany.js +44 -47
- package/dist/entities/CodeRedemptionHistoryUser.js +54 -57
- package/dist/entities/Company.js +169 -172
- package/dist/entities/Configuration.d.ts +1 -1
- package/dist/entities/Configuration.js +25 -26
- package/dist/entities/Country.js +91 -94
- package/dist/entities/Day.js +38 -41
- package/dist/entities/DecorationReserve.js +46 -49
- package/dist/entities/DiscountCodeCompany.js +124 -129
- package/dist/entities/DiscountCodeUser.js +139 -142
- package/dist/entities/Gallery.js +88 -91
- package/dist/entities/Local.js +239 -242
- package/dist/entities/LocalDecorationReserve.js +64 -67
- package/dist/entities/LocalPaymentMethod.js +41 -44
- package/dist/entities/LocalPlan.js +88 -91
- package/dist/entities/LocalQualification.js +51 -54
- package/dist/entities/LocalReserve.js +177 -180
- package/dist/entities/LocalReserveStatus.js +85 -88
- package/dist/entities/LocalTable.js +163 -166
- package/dist/entities/LocalTableReserve.js +22 -25
- package/dist/entities/LocalTableReservePayment.js +156 -159
- package/dist/entities/LocalTableZone.js +84 -87
- package/dist/entities/Master.js +182 -185
- package/dist/entities/MasterNotification.js +96 -99
- package/dist/entities/MasterPermission.js +65 -68
- package/dist/entities/MasterRole.js +83 -86
- package/dist/entities/Partner.js +306 -309
- package/dist/entities/PartnerNotification.js +97 -100
- package/dist/entities/PartnerPlatform.js +66 -69
- package/dist/entities/PartnerPlatformSection.js +74 -79
- package/dist/entities/PartnerPlatformSectionPermission.js +113 -118
- package/dist/entities/PartnerPlatformSectionPermissionAssociate.js +26 -29
- package/dist/entities/PartnerRole.js +93 -96
- package/dist/entities/PartnerSession.js +94 -97
- package/dist/entities/PaymentMethod.js +91 -94
- package/dist/entities/Plan.js +86 -89
- package/dist/entities/PosSystem.js +69 -74
- package/dist/entities/Product.js +219 -222
- package/dist/entities/ProductDate.js +39 -42
- package/dist/entities/ProductGroup.js +76 -79
- package/dist/entities/ProductImage.js +33 -36
- package/dist/entities/ProductIngredient.js +54 -57
- package/dist/entities/ProductSchedule.js +41 -44
- package/dist/entities/ProductTopping.js +47 -50
- package/dist/entities/ReceiptConfig.js +184 -187
- package/dist/entities/Region.js +46 -49
- package/dist/entities/Request.js +152 -155
- package/dist/entities/RequestInvoice.js +125 -128
- package/dist/entities/RequestInvoiceCategory.js +34 -37
- package/dist/entities/RequestLocal.js +164 -169
- package/dist/entities/RequestLocalHistory.js +61 -64
- package/dist/entities/RequestLocalPayment.js +154 -157
- package/dist/entities/RequestLocalTable.js +34 -37
- package/dist/entities/RequestPrint.js +60 -63
- package/dist/entities/RequestProduct.js +58 -61
- package/dist/entities/RequestProductGroupComplement.js +51 -56
- package/dist/entities/ServiceDiscountsPlan.js +30 -33
- package/dist/entities/ServicePlan.js +84 -87
- package/dist/entities/Square.js +130 -133
- package/dist/entities/ToppingImage.js +56 -59
- package/dist/entities/TypeMeasureIngredient.js +45 -48
- package/dist/entities/User.js +234 -237
- package/dist/entities/UserAddress.js +114 -117
- package/dist/entities/UserPaymentMethod.js +118 -121
- package/dist/entities/VerificationCode.js +60 -63
- package/dist/entities/VerifyLocal.js +142 -145
- package/dist/entities/productGroupComplement.js +117 -120
- package/dist/filters/DiscountsCodeCompanyInformation.js +153 -202
- package/dist/filters/DiscountsCodeUserInformation.js +173 -220
- package/dist/filters/LocalReservesInformation.js +35 -81
- package/dist/filters/LocalsCompanyInformation.js +169 -218
- package/dist/filters/LocalsCompanyInformationForTheTable.js +157 -203
- package/dist/filters/VerifyLocalsInformation.js +131 -179
- package/dist/index.js +55 -130
- package/dist/transformers/dateTransformer.js +10 -13
- package/dist/transformers/jsonEncryptionTransformer.d.ts +2 -0
- package/dist/transformers/jsonEncryptionTransformer.js +57 -0
- package/dist/transformers/jsonTransformer.js +2 -2
- package/dist/utils.js +3 -3
- package/dist/views/DiscountsCodeUser.js +120 -123
- package/dist/views/LocalReserves.js +280 -283
- package/dist/views/LocalTableZonesFilter.js +76 -79
- package/dist/views/LocalsCompany.js +172 -175
- package/dist/views/LocalsCompanyInformationForTheMap.js +276 -279
- package/dist/views/LocalsCompanyInformationForTheTable.d.ts +1 -0
- package/dist/views/LocalsCompanyInformationForTheTable.js +384 -383
- package/dist/views/MasterNotifications.js +132 -135
- package/dist/views/PartnerNotifications.js +104 -107
- package/dist/views/Partners.js +140 -143
- package/dist/views/VerifyLocals.js +152 -155
- package/dist/views/ViewLocalsCompanies.js +100 -103
- package/package.json +2 -1
- package/src/entities/Configuration.ts +3 -1
- package/src/transformers/jsonEncryptionTransformer.ts +75 -0
- package/src/views/LocalsCompanyInformationForTheTable.ts +3 -0
- package/tsconfig.json +7 -3
|
@@ -10,98 +10,95 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PaymentMethod = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, typeorm_1.PrimaryColumn)({
|
|
23
|
-
type: "int",
|
|
24
|
-
comment: "Número de identificación (ID) único de cada registro.",
|
|
25
|
-
}),
|
|
26
|
-
__metadata("design:type", Number)
|
|
27
|
-
], PaymentMethod.prototype, "id", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, typeorm_1.Column)({
|
|
30
|
-
length: 50,
|
|
31
|
-
type: "varchar",
|
|
32
|
-
comment: "Nombre del estado, este campo debe tener el id/key de cada lenguaje. \r\n\r\nVer la carpeta locales del proyecto frontend para ver el id de cada tipo de elemento.",
|
|
33
|
-
}),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], PaymentMethod.prototype, "name", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)({
|
|
38
|
-
length: 50,
|
|
39
|
-
nullable: true,
|
|
40
|
-
default: null,
|
|
41
|
-
type: "varchar",
|
|
42
|
-
comment: "Descripción del estado, este campo debe tener el id/key de cada lenguaje. \r\n\r\nVer la carpeta locales del proyecto frontend para ver el id de cada tipo de elemento.",
|
|
43
|
-
}),
|
|
44
|
-
__metadata("design:type", Object)
|
|
45
|
-
], PaymentMethod.prototype, "description", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({
|
|
48
|
-
type: "longtext",
|
|
49
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
50
|
-
nullable: true,
|
|
51
|
-
default: null,
|
|
52
|
-
comment: "Campo de tipo JSON donde se pueden agregar columnas u otros elementos que sean necesarios.",
|
|
53
|
-
}),
|
|
54
|
-
__metadata("design:type", Object)
|
|
55
|
-
], PaymentMethod.prototype, "settings", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, typeorm_1.Column)({
|
|
58
|
-
type: "datetime",
|
|
59
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
60
|
-
comment: "Fecha de creación del registro.",
|
|
61
|
-
}),
|
|
62
|
-
__metadata("design:type", Date)
|
|
63
|
-
], PaymentMethod.prototype, "created", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, typeorm_1.Column)({
|
|
66
|
-
default: 1,
|
|
67
|
-
type: "int",
|
|
68
|
-
width: 1,
|
|
69
|
-
comment: "Valida si el estado es visible para mostrar al cliente (local/company): \r\n1. Activo. \r\n0. Inactivo.",
|
|
70
|
-
}),
|
|
71
|
-
__metadata("design:type", Number)
|
|
72
|
-
], PaymentMethod.prototype, "status", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, typeorm_1.ManyToMany)(function () { return Local_1.Local; }, function (local) { return local.payment_methods; }),
|
|
75
|
-
(0, typeorm_1.JoinTable)({
|
|
76
|
-
name: "local_payment_method",
|
|
77
|
-
joinColumn: {
|
|
78
|
-
name: "payment_method",
|
|
79
|
-
referencedColumnName: "id",
|
|
80
|
-
},
|
|
81
|
-
inverseJoinColumn: {
|
|
82
|
-
name: "local",
|
|
83
|
-
referencedColumnName: "id",
|
|
84
|
-
},
|
|
85
|
-
}),
|
|
86
|
-
__metadata("design:type", Array)
|
|
87
|
-
], PaymentMethod.prototype, "locals", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, typeorm_1.OneToMany)(function () { return __1.RequestLocalPayment; }, function (requestLocalPayment) { return requestLocalPayment.payment_method; }),
|
|
90
|
-
__metadata("design:type", Array)
|
|
91
|
-
], PaymentMethod.prototype, "payment_methods", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, typeorm_1.OneToMany)(function () { return __1.LocalTableReservePayment; }, function (localTableReservePayment) { return localTableReservePayment.payment_method; }),
|
|
94
|
-
__metadata("design:type", Array)
|
|
95
|
-
], PaymentMethod.prototype, "local_table_reserve_payments", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
(0, typeorm_1.OneToMany)(function () { return __1.LocalPaymentMethod; }, function (localPaymentMethod) { return localPaymentMethod.payment_method; }),
|
|
98
|
-
__metadata("design:type", Array)
|
|
99
|
-
], PaymentMethod.prototype, "payments_method", void 0);
|
|
100
|
-
PaymentMethod = __decorate([
|
|
101
|
-
(0, typeorm_1.Entity)("payment_method", {
|
|
102
|
-
comment: "Métodos de pago qué la plataforma tendrá disponible, estos serán visibles cuando un cliente (local) desee agregarlos para que se vean en los pedidos.",
|
|
103
|
-
})
|
|
104
|
-
], PaymentMethod);
|
|
105
|
-
return PaymentMethod;
|
|
106
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
const dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
const Local_1 = require("./Local");
|
|
17
|
+
const jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
18
|
+
let PaymentMethod = class PaymentMethod {
|
|
19
|
+
};
|
|
107
20
|
exports.PaymentMethod = PaymentMethod;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryColumn)({
|
|
23
|
+
type: "int",
|
|
24
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
25
|
+
}),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], PaymentMethod.prototype, "id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({
|
|
30
|
+
length: 50,
|
|
31
|
+
type: "varchar",
|
|
32
|
+
comment: "Nombre del estado, este campo debe tener el id/key de cada lenguaje. \r\n\r\nVer la carpeta locales del proyecto frontend para ver el id de cada tipo de elemento.",
|
|
33
|
+
}),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], PaymentMethod.prototype, "name", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({
|
|
38
|
+
length: 50,
|
|
39
|
+
nullable: true,
|
|
40
|
+
default: null,
|
|
41
|
+
type: "varchar",
|
|
42
|
+
comment: "Descripción del estado, este campo debe tener el id/key de cada lenguaje. \r\n\r\nVer la carpeta locales del proyecto frontend para ver el id de cada tipo de elemento.",
|
|
43
|
+
}),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], PaymentMethod.prototype, "description", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({
|
|
48
|
+
type: "longtext",
|
|
49
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
50
|
+
nullable: true,
|
|
51
|
+
default: null,
|
|
52
|
+
comment: "Campo de tipo JSON donde se pueden agregar columnas u otros elementos que sean necesarios.",
|
|
53
|
+
}),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], PaymentMethod.prototype, "settings", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({
|
|
58
|
+
type: "datetime",
|
|
59
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
60
|
+
comment: "Fecha de creación del registro.",
|
|
61
|
+
}),
|
|
62
|
+
__metadata("design:type", Date)
|
|
63
|
+
], PaymentMethod.prototype, "created", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({
|
|
66
|
+
default: 1,
|
|
67
|
+
type: "int",
|
|
68
|
+
width: 1,
|
|
69
|
+
comment: "Valida si el estado es visible para mostrar al cliente (local/company): \r\n1. Activo. \r\n0. Inactivo.",
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", Number)
|
|
72
|
+
], PaymentMethod.prototype, "status", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.ManyToMany)(() => Local_1.Local, (local) => local.payment_methods),
|
|
75
|
+
(0, typeorm_1.JoinTable)({
|
|
76
|
+
name: "local_payment_method",
|
|
77
|
+
joinColumn: {
|
|
78
|
+
name: "payment_method",
|
|
79
|
+
referencedColumnName: "id",
|
|
80
|
+
},
|
|
81
|
+
inverseJoinColumn: {
|
|
82
|
+
name: "local",
|
|
83
|
+
referencedColumnName: "id",
|
|
84
|
+
},
|
|
85
|
+
}),
|
|
86
|
+
__metadata("design:type", Array)
|
|
87
|
+
], PaymentMethod.prototype, "locals", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.OneToMany)(() => __1.RequestLocalPayment, (requestLocalPayment) => requestLocalPayment.payment_method),
|
|
90
|
+
__metadata("design:type", Array)
|
|
91
|
+
], PaymentMethod.prototype, "payment_methods", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.OneToMany)(() => __1.LocalTableReservePayment, (localTableReservePayment) => localTableReservePayment.payment_method),
|
|
94
|
+
__metadata("design:type", Array)
|
|
95
|
+
], PaymentMethod.prototype, "local_table_reserve_payments", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.OneToMany)(() => __1.LocalPaymentMethod, (localPaymentMethod) => localPaymentMethod.payment_method),
|
|
98
|
+
__metadata("design:type", Array)
|
|
99
|
+
], PaymentMethod.prototype, "payments_method", void 0);
|
|
100
|
+
exports.PaymentMethod = PaymentMethod = __decorate([
|
|
101
|
+
(0, typeorm_1.Entity)("payment_method", {
|
|
102
|
+
comment: "Métodos de pago qué la plataforma tendrá disponible, estos serán visibles cuando un cliente (local) desee agregarlos para que se vean en los pedidos.",
|
|
103
|
+
})
|
|
104
|
+
], PaymentMethod);
|
package/dist/entities/Plan.js
CHANGED
|
@@ -10,93 +10,90 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Plan = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
23
|
-
type: "int",
|
|
24
|
-
comment: "Número de identificación (ID) único de cada registro.",
|
|
25
|
-
}),
|
|
26
|
-
__metadata("design:type", Number)
|
|
27
|
-
], Plan.prototype, "id", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, typeorm_1.Column)({
|
|
30
|
-
length: 20,
|
|
31
|
-
type: "varchar",
|
|
32
|
-
unique: true,
|
|
33
|
-
comment: "Código del plan.",
|
|
34
|
-
}),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], Plan.prototype, "code", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.ManyToOne)(function () { return Company_1.Company; }, function (company) { return company.plans_company; }, {
|
|
39
|
-
onDelete: "CASCADE",
|
|
40
|
-
onUpdate: "NO ACTION",
|
|
41
|
-
}),
|
|
42
|
-
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
43
|
-
__metadata("design:type", Company_1.Company)
|
|
44
|
-
], Plan.prototype, "company", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({
|
|
47
|
-
length: 50,
|
|
48
|
-
type: "varchar",
|
|
49
|
-
comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.",
|
|
50
|
-
}),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], Plan.prototype, "name", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)({
|
|
55
|
-
type: "mediumtext",
|
|
56
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
57
|
-
nullable: true,
|
|
58
|
-
default: null,
|
|
59
|
-
comment: "Campo de tipo JSON donde se guarda información necesaria para el plan",
|
|
60
|
-
}),
|
|
61
|
-
__metadata("design:type", Object)
|
|
62
|
-
], Plan.prototype, "description", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, typeorm_1.Column)({
|
|
65
|
-
type: "int",
|
|
66
|
-
comment: "Cantidad de locales a los que está el plan.",
|
|
67
|
-
}),
|
|
68
|
-
__metadata("design:type", Number)
|
|
69
|
-
], Plan.prototype, "quantity_locals", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, typeorm_1.Column)({
|
|
72
|
-
type: "datetime",
|
|
73
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
74
|
-
comment: "Fecha de creación del registro.",
|
|
75
|
-
}),
|
|
76
|
-
__metadata("design:type", Date)
|
|
77
|
-
], Plan.prototype, "created", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, typeorm_1.Column)({ type: "date", comment: "Fecha de expiración del registro." }),
|
|
80
|
-
__metadata("design:type", Date)
|
|
81
|
-
], Plan.prototype, "expiration", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, typeorm_1.Column)({
|
|
84
|
-
default: 1,
|
|
85
|
-
type: "int",
|
|
86
|
-
width: 1,
|
|
87
|
-
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
88
|
-
}),
|
|
89
|
-
__metadata("design:type", Number)
|
|
90
|
-
], Plan.prototype, "status", void 0);
|
|
91
|
-
__decorate([
|
|
92
|
-
(0, typeorm_1.OneToMany)(function () { return __1.LocalPlan; }, function (localPlan) { return localPlan.plan; }),
|
|
93
|
-
__metadata("design:type", Array)
|
|
94
|
-
], Plan.prototype, "local_plans", void 0);
|
|
95
|
-
Plan = __decorate([
|
|
96
|
-
(0, typeorm_1.Entity)({
|
|
97
|
-
comment: "Planes que tendrá la plataforma para las empresas (company)",
|
|
98
|
-
})
|
|
99
|
-
], Plan);
|
|
100
|
-
return Plan;
|
|
101
|
-
}());
|
|
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 Company_1 = require("./Company");
|
|
18
|
+
let Plan = class Plan {
|
|
19
|
+
};
|
|
102
20
|
exports.Plan = Plan;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
23
|
+
type: "int",
|
|
24
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
25
|
+
}),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], Plan.prototype, "id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({
|
|
30
|
+
length: 20,
|
|
31
|
+
type: "varchar",
|
|
32
|
+
unique: true,
|
|
33
|
+
comment: "Código del plan.",
|
|
34
|
+
}),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], Plan.prototype, "code", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.ManyToOne)(() => Company_1.Company, (company) => company.plans_company, {
|
|
39
|
+
onDelete: "CASCADE",
|
|
40
|
+
onUpdate: "NO ACTION",
|
|
41
|
+
}),
|
|
42
|
+
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
43
|
+
__metadata("design:type", Company_1.Company)
|
|
44
|
+
], Plan.prototype, "company", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({
|
|
47
|
+
length: 50,
|
|
48
|
+
type: "varchar",
|
|
49
|
+
comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.",
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], Plan.prototype, "name", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({
|
|
55
|
+
type: "mediumtext",
|
|
56
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
57
|
+
nullable: true,
|
|
58
|
+
default: null,
|
|
59
|
+
comment: "Campo de tipo JSON donde se guarda información necesaria para el plan",
|
|
60
|
+
}),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], Plan.prototype, "description", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({
|
|
65
|
+
type: "int",
|
|
66
|
+
comment: "Cantidad de locales a los que está el plan.",
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], Plan.prototype, "quantity_locals", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({
|
|
72
|
+
type: "datetime",
|
|
73
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
74
|
+
comment: "Fecha de creación del registro.",
|
|
75
|
+
}),
|
|
76
|
+
__metadata("design:type", Date)
|
|
77
|
+
], Plan.prototype, "created", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ type: "date", comment: "Fecha de expiración del registro." }),
|
|
80
|
+
__metadata("design:type", Date)
|
|
81
|
+
], Plan.prototype, "expiration", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({
|
|
84
|
+
default: 1,
|
|
85
|
+
type: "int",
|
|
86
|
+
width: 1,
|
|
87
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
88
|
+
}),
|
|
89
|
+
__metadata("design:type", Number)
|
|
90
|
+
], Plan.prototype, "status", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.OneToMany)(() => __1.LocalPlan, (localPlan) => localPlan.plan),
|
|
93
|
+
__metadata("design:type", Array)
|
|
94
|
+
], Plan.prototype, "local_plans", void 0);
|
|
95
|
+
exports.Plan = Plan = __decorate([
|
|
96
|
+
(0, typeorm_1.Entity)({
|
|
97
|
+
comment: "Planes que tendrá la plataforma para las empresas (company)",
|
|
98
|
+
})
|
|
99
|
+
], Plan);
|
|
@@ -10,78 +10,73 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PosSystem = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
-
type: "int",
|
|
22
|
-
comment: "Número de identificación (ID) único de cada registro.",
|
|
23
|
-
}),
|
|
24
|
-
__metadata("design:type", Number)
|
|
25
|
-
], PosSystem.prototype, "id", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typeorm_1.Column)({ length: 50, type: "varchar", comment: "Nombre del registro." }),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
-
], PosSystem.prototype, "name", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.Column)({
|
|
32
|
-
length: 300,
|
|
33
|
-
type: "varchar",
|
|
34
|
-
nullable: true,
|
|
35
|
-
default: null,
|
|
36
|
-
comment: "Descripción del registro.",
|
|
37
|
-
}),
|
|
38
|
-
__metadata("design:type", Object)
|
|
39
|
-
], PosSystem.prototype, "description", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({
|
|
42
|
-
type: "text",
|
|
43
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
44
|
-
comment: 'Esto será un JSON, donde va a tener información de lo que necesita para poder una petición hacia el sistema POS para traer los productos, es decir:\r\n\r\n1. type: Tipo de endpoint que tiene los productos (GET o POST)\r\n\r\n2. endpoint_name: Este es un string que será la url de la solicitud para traerse los productos que hay en el sistema POS.\r\n\r\n3. query_parameters: Este un objeto donde se van a guardar los clave valor de cada item qué necesitemos, es decir:\r\n{"productId": "product_id"...}\r\n{"ProductId: "product_id"...}\r\n{"productid": "product_id"...}\r\n\r\nEntonces, con este elemento se puede saber el parámetro que nosotros (asumano) usamos, y el parámetro que necesita el api (POS).\r\n',
|
|
45
|
-
}),
|
|
46
|
-
__metadata("design:type", Object)
|
|
47
|
-
], PosSystem.prototype, "endpoint_products", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typeorm_1.Column)({
|
|
50
|
-
type: "text",
|
|
51
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
52
|
-
comment: 'Esto será un JSON, donde va a tener información de lo que necesita para poder una petición hacia el sistema POS para realizar un pedido, es decir:\r\n\r\n1. type: Tipo de endpoint que tiene los pedidos (GET o POST) (Acá todos los desarrolladores deberían usar POST, ya que es una creación, pero hay casos en que no los usan, toca validar).\r\n\r\n2. endpoint_name: Este es un string que será la url de la solicitud para crear un pedido en el sistema POS.\r\n\r\n3. query_parameters: Este un objeto donde se van a guardar los clave valor de cada item qué necesitemos, es decir:\r\n{"productId": "product_id"...}\r\n{"ProductId: "product_id"...}\r\n{"productid": "product_id"...}\r\n\r\nEntonces, con este elemento se puede saber el parámetro que nosotros (asumano) usamos, y el parámetro que necesita el api (POS) para poder crear el pedido.\r\n',
|
|
53
|
-
}),
|
|
54
|
-
__metadata("design:type", Object)
|
|
55
|
-
], PosSystem.prototype, "endpoint_order", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.AuthenticationCredential; }, function (authenticationCredential) {
|
|
58
|
-
return authenticationCredential.authenticationCredentials;
|
|
59
|
-
}, {
|
|
60
|
-
onDelete: "RESTRICT",
|
|
61
|
-
onUpdate: "NO ACTION",
|
|
62
|
-
}),
|
|
63
|
-
(0, typeorm_1.JoinColumn)({ name: "authentication_credentials" }),
|
|
64
|
-
__metadata("design:type", __1.AuthenticationCredential)
|
|
65
|
-
], PosSystem.prototype, "authentication_credentials", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, typeorm_1.Column)({
|
|
68
|
-
default: 1,
|
|
69
|
-
type: "int",
|
|
70
|
-
width: 1,
|
|
71
|
-
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
72
|
-
}),
|
|
73
|
-
__metadata("design:type", Number)
|
|
74
|
-
], PosSystem.prototype, "status", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, typeorm_1.OneToMany)(function () { return __1.Local; }, function (local) { return local.pos_system; }),
|
|
77
|
-
__metadata("design:type", Array)
|
|
78
|
-
], PosSystem.prototype, "locals_pos_system", void 0);
|
|
79
|
-
PosSystem = __decorate([
|
|
80
|
-
(0, typeorm_1.Entity)({
|
|
81
|
-
name: "pos_system",
|
|
82
|
-
comment: "Tabla creada para almacenar los sistemas POS que se quieran enlazar con nuestro sistema y así tener una integración más completa.",
|
|
83
|
-
})
|
|
84
|
-
], PosSystem);
|
|
85
|
-
return PosSystem;
|
|
86
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
const jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
16
|
+
let PosSystem = class PosSystem {
|
|
17
|
+
};
|
|
87
18
|
exports.PosSystem = PosSystem;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
+
type: "int",
|
|
22
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
23
|
+
}),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], PosSystem.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ length: 50, type: "varchar", comment: "Nombre del registro." }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], PosSystem.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({
|
|
32
|
+
length: 300,
|
|
33
|
+
type: "varchar",
|
|
34
|
+
nullable: true,
|
|
35
|
+
default: null,
|
|
36
|
+
comment: "Descripción del registro.",
|
|
37
|
+
}),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], PosSystem.prototype, "description", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({
|
|
42
|
+
type: "text",
|
|
43
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
44
|
+
comment: 'Esto será un JSON, donde va a tener información de lo que necesita para poder una petición hacia el sistema POS para traer los productos, es decir:\r\n\r\n1. type: Tipo de endpoint que tiene los productos (GET o POST)\r\n\r\n2. endpoint_name: Este es un string que será la url de la solicitud para traerse los productos que hay en el sistema POS.\r\n\r\n3. query_parameters: Este un objeto donde se van a guardar los clave valor de cada item qué necesitemos, es decir:\r\n{"productId": "product_id"...}\r\n{"ProductId: "product_id"...}\r\n{"productid": "product_id"...}\r\n\r\nEntonces, con este elemento se puede saber el parámetro que nosotros (asumano) usamos, y el parámetro que necesita el api (POS).\r\n',
|
|
45
|
+
}),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], PosSystem.prototype, "endpoint_products", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({
|
|
50
|
+
type: "text",
|
|
51
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
52
|
+
comment: 'Esto será un JSON, donde va a tener información de lo que necesita para poder una petición hacia el sistema POS para realizar un pedido, es decir:\r\n\r\n1. type: Tipo de endpoint que tiene los pedidos (GET o POST) (Acá todos los desarrolladores deberían usar POST, ya que es una creación, pero hay casos en que no los usan, toca validar).\r\n\r\n2. endpoint_name: Este es un string que será la url de la solicitud para crear un pedido en el sistema POS.\r\n\r\n3. query_parameters: Este un objeto donde se van a guardar los clave valor de cada item qué necesitemos, es decir:\r\n{"productId": "product_id"...}\r\n{"ProductId: "product_id"...}\r\n{"productid": "product_id"...}\r\n\r\nEntonces, con este elemento se puede saber el parámetro que nosotros (asumano) usamos, y el parámetro que necesita el api (POS) para poder crear el pedido.\r\n',
|
|
53
|
+
}),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], PosSystem.prototype, "endpoint_order", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.ManyToOne)(() => __1.AuthenticationCredential, (authenticationCredential) => authenticationCredential.authenticationCredentials, {
|
|
58
|
+
onDelete: "RESTRICT",
|
|
59
|
+
onUpdate: "NO ACTION",
|
|
60
|
+
}),
|
|
61
|
+
(0, typeorm_1.JoinColumn)({ name: "authentication_credentials" }),
|
|
62
|
+
__metadata("design:type", __1.AuthenticationCredential)
|
|
63
|
+
], PosSystem.prototype, "authentication_credentials", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({
|
|
66
|
+
default: 1,
|
|
67
|
+
type: "int",
|
|
68
|
+
width: 1,
|
|
69
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", Number)
|
|
72
|
+
], PosSystem.prototype, "status", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.OneToMany)(() => __1.Local, (local) => local.pos_system),
|
|
75
|
+
__metadata("design:type", Array)
|
|
76
|
+
], PosSystem.prototype, "locals_pos_system", void 0);
|
|
77
|
+
exports.PosSystem = PosSystem = __decorate([
|
|
78
|
+
(0, typeorm_1.Entity)({
|
|
79
|
+
name: "pos_system",
|
|
80
|
+
comment: "Tabla creada para almacenar los sistemas POS que se quieran enlazar con nuestro sistema y así tener una integración más completa.",
|
|
81
|
+
})
|
|
82
|
+
], PosSystem);
|