test-entity-library-asm 3.9.5 → 3.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CustomRepository.js +21 -109
- package/dist/entities/AuthenticationCredential.js +54 -57
- package/dist/entities/Bank.js +50 -53
- package/dist/entities/BusinessType.js +47 -50
- package/dist/entities/BusinessTypeProduct.js +68 -71
- package/dist/entities/Category.js +148 -151
- package/dist/entities/CategoryDate.js +39 -42
- package/dist/entities/CategorySchedule.js +41 -44
- package/dist/entities/City.js +70 -73
- package/dist/entities/CodeRedemptionHistoryCompany.js +44 -47
- package/dist/entities/CodeRedemptionHistoryUser.js +54 -57
- package/dist/entities/Company.js +169 -172
- package/dist/entities/Configuration.d.ts +1 -1
- package/dist/entities/Configuration.js +25 -26
- package/dist/entities/Country.js +91 -94
- package/dist/entities/Day.js +38 -41
- package/dist/entities/DecorationReserve.js +46 -49
- package/dist/entities/DiscountCodeCompany.js +124 -129
- package/dist/entities/DiscountCodeUser.js +139 -142
- package/dist/entities/Gallery.js +88 -91
- package/dist/entities/Local.js +239 -242
- package/dist/entities/LocalDecorationReserve.js +64 -67
- package/dist/entities/LocalPaymentMethod.js +41 -44
- package/dist/entities/LocalPlan.js +88 -91
- package/dist/entities/LocalQualification.js +51 -54
- package/dist/entities/LocalReserve.js +177 -180
- package/dist/entities/LocalReserveStatus.js +85 -88
- package/dist/entities/LocalTable.js +163 -166
- package/dist/entities/LocalTableReserve.js +22 -25
- package/dist/entities/LocalTableReservePayment.js +156 -159
- package/dist/entities/LocalTableZone.js +84 -87
- package/dist/entities/Master.js +182 -185
- package/dist/entities/MasterNotification.js +96 -99
- package/dist/entities/MasterPermission.js +65 -68
- package/dist/entities/MasterRole.js +83 -86
- package/dist/entities/Partner.js +306 -309
- package/dist/entities/PartnerNotification.js +97 -100
- package/dist/entities/PartnerPlatform.js +66 -69
- package/dist/entities/PartnerPlatformSection.js +74 -79
- package/dist/entities/PartnerPlatformSectionPermission.js +113 -118
- package/dist/entities/PartnerPlatformSectionPermissionAssociate.js +26 -29
- package/dist/entities/PartnerRole.js +93 -96
- package/dist/entities/PartnerSession.js +94 -97
- package/dist/entities/PaymentMethod.js +91 -94
- package/dist/entities/Plan.js +86 -89
- package/dist/entities/PosSystem.js +69 -74
- package/dist/entities/Product.js +219 -222
- package/dist/entities/ProductDate.js +39 -42
- package/dist/entities/ProductGroup.js +76 -79
- package/dist/entities/ProductImage.js +33 -36
- package/dist/entities/ProductIngredient.js +54 -57
- package/dist/entities/ProductSchedule.js +41 -44
- package/dist/entities/ProductTopping.js +47 -50
- package/dist/entities/ReceiptConfig.js +184 -187
- package/dist/entities/Region.js +46 -49
- package/dist/entities/Request.js +152 -155
- package/dist/entities/RequestInvoice.js +125 -128
- package/dist/entities/RequestInvoiceCategory.js +34 -37
- package/dist/entities/RequestLocal.js +164 -169
- package/dist/entities/RequestLocalHistory.js +61 -64
- package/dist/entities/RequestLocalPayment.js +154 -157
- package/dist/entities/RequestLocalTable.js +34 -37
- package/dist/entities/RequestPrint.js +60 -63
- package/dist/entities/RequestProduct.js +58 -61
- package/dist/entities/RequestProductGroupComplement.js +51 -56
- package/dist/entities/ServiceDiscountsPlan.js +30 -33
- package/dist/entities/ServicePlan.js +84 -87
- package/dist/entities/Square.js +130 -133
- package/dist/entities/ToppingImage.js +56 -59
- package/dist/entities/TypeMeasureIngredient.js +45 -48
- package/dist/entities/User.js +234 -237
- package/dist/entities/UserAddress.js +114 -117
- package/dist/entities/UserPaymentMethod.js +118 -121
- package/dist/entities/VerificationCode.js +60 -63
- package/dist/entities/VerifyLocal.js +142 -145
- package/dist/entities/productGroupComplement.js +117 -120
- package/dist/filters/DiscountsCodeCompanyInformation.js +153 -202
- package/dist/filters/DiscountsCodeUserInformation.js +173 -220
- package/dist/filters/LocalReservesInformation.js +35 -81
- package/dist/filters/LocalsCompanyInformation.js +169 -218
- package/dist/filters/LocalsCompanyInformationForTheTable.js +157 -203
- package/dist/filters/VerifyLocalsInformation.js +131 -179
- package/dist/index.js +55 -130
- package/dist/transformers/dateTransformer.js +10 -13
- package/dist/transformers/jsonEncryptionTransformer.d.ts +2 -0
- package/dist/transformers/jsonEncryptionTransformer.js +72 -0
- package/dist/transformers/jsonTransformer.js +2 -2
- package/dist/utils.js +3 -3
- package/dist/views/DiscountsCodeUser.js +120 -123
- package/dist/views/LocalReserves.js +280 -283
- package/dist/views/LocalTableZonesFilter.js +76 -79
- package/dist/views/LocalsCompany.js +172 -175
- package/dist/views/LocalsCompanyInformationForTheMap.js +276 -279
- package/dist/views/LocalsCompanyInformationForTheTable.js +384 -387
- package/dist/views/MasterNotifications.js +132 -135
- package/dist/views/PartnerNotifications.js +104 -107
- package/dist/views/Partners.js +140 -143
- package/dist/views/VerifyLocals.js +152 -155
- package/dist/views/ViewLocalsCompanies.js +100 -103
- package/package.json +3 -2
- package/src/entities/Configuration.ts +3 -1
- package/src/transformers/jsonEncryptionTransformer.ts +78 -0
- package/tsconfig.json +7 -3
|
@@ -10,121 +10,118 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.UserAddress = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
], UserAddress.prototype, "id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.ManyToOne)(function () { return User_1.User; }, function (user) { return user.addresses; }, {
|
|
29
|
-
onDelete: "CASCADE",
|
|
30
|
-
onUpdate: "NO ACTION",
|
|
31
|
-
}),
|
|
32
|
-
(0, typeorm_1.JoinColumn)({ name: "user" }),
|
|
33
|
-
__metadata("design:type", User_1.User)
|
|
34
|
-
], UserAddress.prototype, "user", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.ManyToOne)(function () { return City_1.City; }, function (city) { return city.user_addresses; }, {
|
|
37
|
-
onDelete: "RESTRICT",
|
|
38
|
-
onUpdate: "NO ACTION",
|
|
39
|
-
}),
|
|
40
|
-
(0, typeorm_1.JoinColumn)({ name: "city" }),
|
|
41
|
-
__metadata("design:type", City_1.City)
|
|
42
|
-
], UserAddress.prototype, "city", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, typeorm_1.Column)({ length: 120, type: "varchar", comment: "Dirección." }),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], UserAddress.prototype, "address", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, typeorm_1.Column)({
|
|
49
|
-
type: "decimal",
|
|
50
|
-
precision: 10,
|
|
51
|
-
scale: 8,
|
|
52
|
-
comment: "Latitud de la dirección.",
|
|
53
|
-
}),
|
|
54
|
-
__metadata("design:type", Number)
|
|
55
|
-
], UserAddress.prototype, "latitude", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, typeorm_1.Column)({
|
|
58
|
-
type: "decimal",
|
|
59
|
-
precision: 10,
|
|
60
|
-
scale: 8,
|
|
61
|
-
comment: "Longitud de la dirección.",
|
|
62
|
-
}),
|
|
63
|
-
__metadata("design:type", Number)
|
|
64
|
-
], UserAddress.prototype, "longitude", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, typeorm_1.Column)({
|
|
67
|
-
type: "varchar",
|
|
68
|
-
length: 400,
|
|
69
|
-
nullable: true,
|
|
70
|
-
default: null,
|
|
71
|
-
comment: "Detalles de la dirección, si es una casa, un conjunto, el apartamento.",
|
|
72
|
-
}),
|
|
73
|
-
__metadata("design:type", Object)
|
|
74
|
-
], UserAddress.prototype, "details", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, typeorm_1.Column)({
|
|
77
|
-
length: 20,
|
|
78
|
-
type: "varchar",
|
|
79
|
-
comment: "Tipo de ubicación:\r\n1. Casa.\r\n2. Oficina.\r\n3. Pareja.\r\n4. Otro.\r\n\r\nEsto me agrega un campo de tipo texto con el tag.",
|
|
80
|
-
}),
|
|
81
|
-
__metadata("design:type", String)
|
|
82
|
-
], UserAddress.prototype, "tag", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, typeorm_1.Column)({
|
|
85
|
-
type: "int",
|
|
86
|
-
width: 1,
|
|
87
|
-
comment: "Campo que me dice si:\r\n1. Personal: Lo recibo yo.\r\n2. Portería: Lo recibe la portería.",
|
|
88
|
-
}),
|
|
89
|
-
__metadata("design:type", Number)
|
|
90
|
-
], UserAddress.prototype, "delivery_details", void 0);
|
|
91
|
-
__decorate([
|
|
92
|
-
(0, typeorm_1.Column)({
|
|
93
|
-
length: 400,
|
|
94
|
-
type: "varchar",
|
|
95
|
-
nullable: true,
|
|
96
|
-
default: null,
|
|
97
|
-
comment: "Campo para agregar una descripción más detallada de cómo llegar, o donde es la ubicación.",
|
|
98
|
-
}),
|
|
99
|
-
__metadata("design:type", String)
|
|
100
|
-
], UserAddress.prototype, "description", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
(0, typeorm_1.Column)({
|
|
103
|
-
comment: "Columna para saber el el registro se eliminó o no:\r\n0. No eliminado.\r\n1. Eliminado.",
|
|
104
|
-
default: 0,
|
|
105
|
-
type: "int",
|
|
106
|
-
width: 1,
|
|
107
|
-
}),
|
|
108
|
-
__metadata("design:type", Number)
|
|
109
|
-
], UserAddress.prototype, "selected", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
(0, typeorm_1.Column)({
|
|
112
|
-
comment: "CColumna para saber sí la dirección está seleccionada por defecto:\r\n1. Por defecto.\r\n0. No está por defecto.",
|
|
113
|
-
default: 0,
|
|
114
|
-
type: "int",
|
|
115
|
-
width: 1,
|
|
116
|
-
}),
|
|
117
|
-
__metadata("design:type", Number)
|
|
118
|
-
], UserAddress.prototype, "deleted", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
(0, typeorm_1.OneToMany)(function () { return __1.Request; }, function (request) { return request.address; }),
|
|
121
|
-
__metadata("design:type", Array)
|
|
122
|
-
], UserAddress.prototype, "requests", void 0);
|
|
123
|
-
UserAddress = __decorate([
|
|
124
|
-
(0, typeorm_1.Entity)("user_address", {
|
|
125
|
-
comment: "Tabla creada para agregar las direcciones del usuario.\r\n\r\nEsta tabla es util para cuando se tenga la opción de domicilios.",
|
|
126
|
-
})
|
|
127
|
-
], UserAddress);
|
|
128
|
-
return UserAddress;
|
|
129
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
const City_1 = require("./City");
|
|
16
|
+
const User_1 = require("./User");
|
|
17
|
+
let UserAddress = class UserAddress {
|
|
18
|
+
};
|
|
130
19
|
exports.UserAddress = UserAddress;
|
|
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
|
+
], UserAddress.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.ManyToOne)(() => User_1.User, (user) => user.addresses, {
|
|
29
|
+
onDelete: "CASCADE",
|
|
30
|
+
onUpdate: "NO ACTION",
|
|
31
|
+
}),
|
|
32
|
+
(0, typeorm_1.JoinColumn)({ name: "user" }),
|
|
33
|
+
__metadata("design:type", User_1.User)
|
|
34
|
+
], UserAddress.prototype, "user", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.ManyToOne)(() => City_1.City, (city) => city.user_addresses, {
|
|
37
|
+
onDelete: "RESTRICT",
|
|
38
|
+
onUpdate: "NO ACTION",
|
|
39
|
+
}),
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: "city" }),
|
|
41
|
+
__metadata("design:type", City_1.City)
|
|
42
|
+
], UserAddress.prototype, "city", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ length: 120, type: "varchar", comment: "Dirección." }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], UserAddress.prototype, "address", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({
|
|
49
|
+
type: "decimal",
|
|
50
|
+
precision: 10,
|
|
51
|
+
scale: 8,
|
|
52
|
+
comment: "Latitud de la dirección.",
|
|
53
|
+
}),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], UserAddress.prototype, "latitude", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({
|
|
58
|
+
type: "decimal",
|
|
59
|
+
precision: 10,
|
|
60
|
+
scale: 8,
|
|
61
|
+
comment: "Longitud de la dirección.",
|
|
62
|
+
}),
|
|
63
|
+
__metadata("design:type", Number)
|
|
64
|
+
], UserAddress.prototype, "longitude", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({
|
|
67
|
+
type: "varchar",
|
|
68
|
+
length: 400,
|
|
69
|
+
nullable: true,
|
|
70
|
+
default: null,
|
|
71
|
+
comment: "Detalles de la dirección, si es una casa, un conjunto, el apartamento.",
|
|
72
|
+
}),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], UserAddress.prototype, "details", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({
|
|
77
|
+
length: 20,
|
|
78
|
+
type: "varchar",
|
|
79
|
+
comment: "Tipo de ubicación:\r\n1. Casa.\r\n2. Oficina.\r\n3. Pareja.\r\n4. Otro.\r\n\r\nEsto me agrega un campo de tipo texto con el tag.",
|
|
80
|
+
}),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], UserAddress.prototype, "tag", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({
|
|
85
|
+
type: "int",
|
|
86
|
+
width: 1,
|
|
87
|
+
comment: "Campo que me dice si:\r\n1. Personal: Lo recibo yo.\r\n2. Portería: Lo recibe la portería.",
|
|
88
|
+
}),
|
|
89
|
+
__metadata("design:type", Number)
|
|
90
|
+
], UserAddress.prototype, "delivery_details", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({
|
|
93
|
+
length: 400,
|
|
94
|
+
type: "varchar",
|
|
95
|
+
nullable: true,
|
|
96
|
+
default: null,
|
|
97
|
+
comment: "Campo para agregar una descripción más detallada de cómo llegar, o donde es la ubicación.",
|
|
98
|
+
}),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], UserAddress.prototype, "description", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.Column)({
|
|
103
|
+
comment: "Columna para saber el el registro se eliminó o no:\r\n0. No eliminado.\r\n1. Eliminado.",
|
|
104
|
+
default: 0,
|
|
105
|
+
type: "int",
|
|
106
|
+
width: 1,
|
|
107
|
+
}),
|
|
108
|
+
__metadata("design:type", Number)
|
|
109
|
+
], UserAddress.prototype, "selected", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, typeorm_1.Column)({
|
|
112
|
+
comment: "CColumna para saber sí la dirección está seleccionada por defecto:\r\n1. Por defecto.\r\n0. No está por defecto.",
|
|
113
|
+
default: 0,
|
|
114
|
+
type: "int",
|
|
115
|
+
width: 1,
|
|
116
|
+
}),
|
|
117
|
+
__metadata("design:type", Number)
|
|
118
|
+
], UserAddress.prototype, "deleted", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, typeorm_1.OneToMany)(() => __1.Request, (request) => request.address),
|
|
121
|
+
__metadata("design:type", Array)
|
|
122
|
+
], UserAddress.prototype, "requests", void 0);
|
|
123
|
+
exports.UserAddress = UserAddress = __decorate([
|
|
124
|
+
(0, typeorm_1.Entity)("user_address", {
|
|
125
|
+
comment: "Tabla creada para agregar las direcciones del usuario.\r\n\r\nEsta tabla es util para cuando se tenga la opción de domicilios.",
|
|
126
|
+
})
|
|
127
|
+
], UserAddress);
|
|
@@ -10,125 +10,122 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.UserPaymentMethod = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
], UserPaymentMethod.prototype, "id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.ManyToOne)(function () { return User_1.User; }, function (user) { return user.payment_methods; }, {
|
|
29
|
-
onDelete: "NO ACTION",
|
|
30
|
-
onUpdate: "NO ACTION",
|
|
31
|
-
}),
|
|
32
|
-
(0, typeorm_1.JoinColumn)({ name: "user" }),
|
|
33
|
-
__metadata("design:type", User_1.User)
|
|
34
|
-
], UserPaymentMethod.prototype, "user", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({
|
|
37
|
-
length: 255,
|
|
38
|
-
type: "varchar",
|
|
39
|
-
comment: "Token devuelto por la pasarela de pagos que estemos usando.",
|
|
40
|
-
}),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], UserPaymentMethod.prototype, "card_token", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, typeorm_1.Column)({
|
|
45
|
-
length: 50,
|
|
46
|
-
type: "varchar",
|
|
47
|
-
comment: "Ej. Visa, MasterCard, Amex...",
|
|
48
|
-
}),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], UserPaymentMethod.prototype, "card_network", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, typeorm_1.Column)({
|
|
53
|
-
length: 50,
|
|
54
|
-
type: "varchar",
|
|
55
|
-
comment: "Ej. Crédito, Débito, Prepago...",
|
|
56
|
-
}),
|
|
57
|
-
__metadata("design:type", String)
|
|
58
|
-
], UserPaymentMethod.prototype, "card_type", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, typeorm_1.Column)({
|
|
61
|
-
length: 4,
|
|
62
|
-
type: "varchar",
|
|
63
|
-
comment: "Últimos 4 dígitos de la tarjeta/método de pago.",
|
|
64
|
-
}),
|
|
65
|
-
__metadata("design:type", String)
|
|
66
|
-
], UserPaymentMethod.prototype, "last_four_digits", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, typeorm_1.Column)({
|
|
69
|
-
length: 2,
|
|
70
|
-
type: "varchar",
|
|
71
|
-
comment: "Mes de expiración de la tarjeta/método de pago.",
|
|
72
|
-
}),
|
|
73
|
-
__metadata("design:type", String)
|
|
74
|
-
], UserPaymentMethod.prototype, "expiration_month", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, typeorm_1.Column)({
|
|
77
|
-
length: 2,
|
|
78
|
-
type: "varchar",
|
|
79
|
-
comment: "Año de expiración de la tarjeta/método de pago.",
|
|
80
|
-
}),
|
|
81
|
-
__metadata("design:type", String)
|
|
82
|
-
], UserPaymentMethod.prototype, "expiration_year", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, typeorm_1.Column)({
|
|
85
|
-
default: 1,
|
|
86
|
-
type: "int",
|
|
87
|
-
width: 1,
|
|
88
|
-
comment: "Me indica sí la tarjeta/método de pago está o no activa.\r\n1: Activa.\r\n0: Inactiva.",
|
|
89
|
-
}),
|
|
90
|
-
__metadata("design:type", Number)
|
|
91
|
-
], UserPaymentMethod.prototype, "status", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, typeorm_1.Column)({
|
|
94
|
-
default: 0,
|
|
95
|
-
type: "int",
|
|
96
|
-
width: 1,
|
|
97
|
-
comment: "Me indica sí la tarjeta/método de pago está o no eliminada.\r\n0: No eliminado.\r\n1: Eliminado.",
|
|
98
|
-
}),
|
|
99
|
-
__metadata("design:type", Number)
|
|
100
|
-
], UserPaymentMethod.prototype, "deleted", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
(0, typeorm_1.Column)({
|
|
103
|
-
type: "datetime",
|
|
104
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
105
|
-
comment: "Fecha de creación del registro.",
|
|
106
|
-
}),
|
|
107
|
-
__metadata("design:type", Date)
|
|
108
|
-
], UserPaymentMethod.prototype, "created", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
(0, typeorm_1.Column)({
|
|
111
|
-
type: "datetime",
|
|
112
|
-
nullable: true,
|
|
113
|
-
default: null,
|
|
114
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
115
|
-
comment: "Fecha de actualización del registro.",
|
|
116
|
-
}),
|
|
117
|
-
__metadata("design:type", Object)
|
|
118
|
-
], UserPaymentMethod.prototype, "updated", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
(0, typeorm_1.OneToMany)(function () { return __1.RequestLocalPayment; }, function (requestLocalPayment) { return requestLocalPayment.card; }),
|
|
121
|
-
__metadata("design:type", Array)
|
|
122
|
-
], UserPaymentMethod.prototype, "cards", void 0);
|
|
123
|
-
__decorate([
|
|
124
|
-
(0, typeorm_1.OneToMany)(function () { return __1.LocalTableReservePayment; }, function (localTableReservePayment) { return localTableReservePayment.card; }),
|
|
125
|
-
__metadata("design:type", Array)
|
|
126
|
-
], UserPaymentMethod.prototype, "local_table_reserve_payments", void 0);
|
|
127
|
-
UserPaymentMethod = __decorate([
|
|
128
|
-
(0, typeorm_1.Entity)("user_payment_method", {
|
|
129
|
-
comment: "Tabla creada para almacenar la información de las tarjetas.",
|
|
130
|
-
})
|
|
131
|
-
], UserPaymentMethod);
|
|
132
|
-
return UserPaymentMethod;
|
|
133
|
-
}());
|
|
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 UserPaymentMethod = class UserPaymentMethod {
|
|
18
|
+
};
|
|
134
19
|
exports.UserPaymentMethod = UserPaymentMethod;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
22
|
+
type: "int",
|
|
23
|
+
comment: "ID único de cada registro.",
|
|
24
|
+
}),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], UserPaymentMethod.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.ManyToOne)(() => User_1.User, (user) => user.payment_methods, {
|
|
29
|
+
onDelete: "NO ACTION",
|
|
30
|
+
onUpdate: "NO ACTION",
|
|
31
|
+
}),
|
|
32
|
+
(0, typeorm_1.JoinColumn)({ name: "user" }),
|
|
33
|
+
__metadata("design:type", User_1.User)
|
|
34
|
+
], UserPaymentMethod.prototype, "user", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({
|
|
37
|
+
length: 255,
|
|
38
|
+
type: "varchar",
|
|
39
|
+
comment: "Token devuelto por la pasarela de pagos que estemos usando.",
|
|
40
|
+
}),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], UserPaymentMethod.prototype, "card_token", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({
|
|
45
|
+
length: 50,
|
|
46
|
+
type: "varchar",
|
|
47
|
+
comment: "Ej. Visa, MasterCard, Amex...",
|
|
48
|
+
}),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], UserPaymentMethod.prototype, "card_network", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({
|
|
53
|
+
length: 50,
|
|
54
|
+
type: "varchar",
|
|
55
|
+
comment: "Ej. Crédito, Débito, Prepago...",
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], UserPaymentMethod.prototype, "card_type", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({
|
|
61
|
+
length: 4,
|
|
62
|
+
type: "varchar",
|
|
63
|
+
comment: "Últimos 4 dígitos de la tarjeta/método de pago.",
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], UserPaymentMethod.prototype, "last_four_digits", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({
|
|
69
|
+
length: 2,
|
|
70
|
+
type: "varchar",
|
|
71
|
+
comment: "Mes de expiración de la tarjeta/método de pago.",
|
|
72
|
+
}),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], UserPaymentMethod.prototype, "expiration_month", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({
|
|
77
|
+
length: 2,
|
|
78
|
+
type: "varchar",
|
|
79
|
+
comment: "Año de expiración de la tarjeta/método de pago.",
|
|
80
|
+
}),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], UserPaymentMethod.prototype, "expiration_year", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({
|
|
85
|
+
default: 1,
|
|
86
|
+
type: "int",
|
|
87
|
+
width: 1,
|
|
88
|
+
comment: "Me indica sí la tarjeta/método de pago está o no activa.\r\n1: Activa.\r\n0: Inactiva.",
|
|
89
|
+
}),
|
|
90
|
+
__metadata("design:type", Number)
|
|
91
|
+
], UserPaymentMethod.prototype, "status", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.Column)({
|
|
94
|
+
default: 0,
|
|
95
|
+
type: "int",
|
|
96
|
+
width: 1,
|
|
97
|
+
comment: "Me indica sí la tarjeta/método de pago está o no eliminada.\r\n0: No eliminado.\r\n1: Eliminado.",
|
|
98
|
+
}),
|
|
99
|
+
__metadata("design:type", Number)
|
|
100
|
+
], UserPaymentMethod.prototype, "deleted", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.Column)({
|
|
103
|
+
type: "datetime",
|
|
104
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
105
|
+
comment: "Fecha de creación del registro.",
|
|
106
|
+
}),
|
|
107
|
+
__metadata("design:type", Date)
|
|
108
|
+
], UserPaymentMethod.prototype, "created", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.Column)({
|
|
111
|
+
type: "datetime",
|
|
112
|
+
nullable: true,
|
|
113
|
+
default: null,
|
|
114
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
115
|
+
comment: "Fecha de actualización del registro.",
|
|
116
|
+
}),
|
|
117
|
+
__metadata("design:type", Object)
|
|
118
|
+
], UserPaymentMethod.prototype, "updated", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, typeorm_1.OneToMany)(() => __1.RequestLocalPayment, (requestLocalPayment) => requestLocalPayment.card),
|
|
121
|
+
__metadata("design:type", Array)
|
|
122
|
+
], UserPaymentMethod.prototype, "cards", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, typeorm_1.OneToMany)(() => __1.LocalTableReservePayment, (localTableReservePayment) => localTableReservePayment.card),
|
|
125
|
+
__metadata("design:type", Array)
|
|
126
|
+
], UserPaymentMethod.prototype, "local_table_reserve_payments", void 0);
|
|
127
|
+
exports.UserPaymentMethod = UserPaymentMethod = __decorate([
|
|
128
|
+
(0, typeorm_1.Entity)("user_payment_method", {
|
|
129
|
+
comment: "Tabla creada para almacenar la información de las tarjetas.",
|
|
130
|
+
})
|
|
131
|
+
], UserPaymentMethod);
|
|
@@ -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.VerificationCode = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
-
type: "int",
|
|
21
|
-
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
|
-
}),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], VerificationCode.prototype, "id", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({
|
|
27
|
-
length: 100,
|
|
28
|
-
type: "varchar",
|
|
29
|
-
comment: "Correo electrónico al que se le envía el código de verificación.",
|
|
30
|
-
nullable: true,
|
|
31
|
-
default: null,
|
|
32
|
-
}),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], VerificationCode.prototype, "email", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({
|
|
37
|
-
length: 12,
|
|
38
|
-
type: "varchar",
|
|
39
|
-
comment: "Número de teléfono al que se le envía el código de verificación.",
|
|
40
|
-
nullable: true,
|
|
41
|
-
default: null,
|
|
42
|
-
}),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], VerificationCode.prototype, "phone", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({
|
|
47
|
-
length: 5,
|
|
48
|
-
type: "varchar",
|
|
49
|
-
comment: "Código de verificación que se le envía al usuario.",
|
|
50
|
-
}),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], VerificationCode.prototype, "code", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)({
|
|
55
|
-
type: "datetime",
|
|
56
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
57
|
-
comment: "Fecha de expiración del código de verificación.",
|
|
58
|
-
}),
|
|
59
|
-
__metadata("design:type", Date)
|
|
60
|
-
], VerificationCode.prototype, "expiration", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, typeorm_1.Column)({
|
|
63
|
-
type: "datetime",
|
|
64
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
65
|
-
comment: "Fecha de creación del código de verificación.",
|
|
66
|
-
}),
|
|
67
|
-
__metadata("design:type", Date)
|
|
68
|
-
], VerificationCode.prototype, "created", void 0);
|
|
69
|
-
VerificationCode = __decorate([
|
|
70
|
-
(0, typeorm_1.Entity)("verification_code", {
|
|
71
|
-
comment: "Acá se van a guardar los códigos que se envíen para crear cuentas, verificar correos, números de teléfono entre otros.",
|
|
72
|
-
})
|
|
73
|
-
], VerificationCode);
|
|
74
|
-
return VerificationCode;
|
|
75
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const dateTransformer_1 = require("../transformers/dateTransformer");
|
|
15
|
+
let VerificationCode = class VerificationCode {
|
|
16
|
+
};
|
|
76
17
|
exports.VerificationCode = VerificationCode;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
+
type: "int",
|
|
21
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], VerificationCode.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({
|
|
27
|
+
length: 100,
|
|
28
|
+
type: "varchar",
|
|
29
|
+
comment: "Correo electrónico al que se le envía el código de verificación.",
|
|
30
|
+
nullable: true,
|
|
31
|
+
default: null,
|
|
32
|
+
}),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], VerificationCode.prototype, "email", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({
|
|
37
|
+
length: 12,
|
|
38
|
+
type: "varchar",
|
|
39
|
+
comment: "Número de teléfono al que se le envía el código de verificación.",
|
|
40
|
+
nullable: true,
|
|
41
|
+
default: null,
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], VerificationCode.prototype, "phone", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({
|
|
47
|
+
length: 5,
|
|
48
|
+
type: "varchar",
|
|
49
|
+
comment: "Código de verificación que se le envía al usuario.",
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], VerificationCode.prototype, "code", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({
|
|
55
|
+
type: "datetime",
|
|
56
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
57
|
+
comment: "Fecha de expiración del código de verificación.",
|
|
58
|
+
}),
|
|
59
|
+
__metadata("design:type", Date)
|
|
60
|
+
], VerificationCode.prototype, "expiration", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({
|
|
63
|
+
type: "datetime",
|
|
64
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
65
|
+
comment: "Fecha de creación del código de verificación.",
|
|
66
|
+
}),
|
|
67
|
+
__metadata("design:type", Date)
|
|
68
|
+
], VerificationCode.prototype, "created", void 0);
|
|
69
|
+
exports.VerificationCode = VerificationCode = __decorate([
|
|
70
|
+
(0, typeorm_1.Entity)("verification_code", {
|
|
71
|
+
comment: "Acá se van a guardar los códigos que se envíen para crear cuentas, verificar correos, números de teléfono entre otros.",
|
|
72
|
+
})
|
|
73
|
+
], VerificationCode);
|