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
package/dist/entities/Country.js
CHANGED
|
@@ -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.Country = 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
|
-
], Country.prototype, "id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({ length: 10, type: "varchar", comment: "Código del país." }),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], Country.prototype, "code", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, typeorm_1.Column)({ length: 50, type: "varchar", comment: "Nombre del país." }),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], Country.prototype, "name", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({
|
|
37
|
-
length: 10,
|
|
38
|
-
type: "varchar",
|
|
39
|
-
comment: "Usamos esta columna para saber la moneda del país y sugerírsela al usuario o al local.",
|
|
40
|
-
}),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], Country.prototype, "currency", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, typeorm_1.Column)({
|
|
45
|
-
length: 10,
|
|
46
|
-
type: "varchar",
|
|
47
|
-
comment: "Prefijo para los números de teléfono.",
|
|
48
|
-
}),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], Country.prototype, "prefix", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, typeorm_1.Column)({
|
|
53
|
-
type: "varchar",
|
|
54
|
-
length: 15,
|
|
55
|
-
comment: "Estructura que tiene el teléfono en ese país.",
|
|
56
|
-
}),
|
|
57
|
-
__metadata("design:type", String)
|
|
58
|
-
], Country.prototype, "structure_phone", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, typeorm_1.Column)({
|
|
61
|
-
type: "longtext",
|
|
62
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
63
|
-
comment: "Esta columna de tipo JSON nos sirve para agregar toda la información que se necesita a nivel de información legal de la empresa que se registre, ya que para cada país cambia la información.",
|
|
64
|
-
}),
|
|
65
|
-
__metadata("design:type", Object)
|
|
66
|
-
], Country.prototype, "legal_information", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, typeorm_1.Column)({
|
|
69
|
-
type: "longtext",
|
|
70
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
71
|
-
comment: "Columna de tipo JSON para almacenar la información que se necesita para la información del representante legal de la empresa.",
|
|
72
|
-
}),
|
|
73
|
-
__metadata("design:type", Object)
|
|
74
|
-
], Country.prototype, "legal_agent", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, typeorm_1.Column)({
|
|
77
|
-
type: "longtext",
|
|
78
|
-
nullable: true,
|
|
79
|
-
default: null,
|
|
80
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
81
|
-
comment: "Columna de tipo JSON para almacenar información adicional sobre el país.",
|
|
82
|
-
}),
|
|
83
|
-
__metadata("design:type", Object)
|
|
84
|
-
], Country.prototype, "details", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
(0, typeorm_1.Column)({
|
|
87
|
-
default: 1,
|
|
88
|
-
type: "int",
|
|
89
|
-
width: 1,
|
|
90
|
-
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
91
|
-
}),
|
|
92
|
-
__metadata("design:type", Number)
|
|
93
|
-
], Country.prototype, "status", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, typeorm_1.OneToMany)(function () { return Region_1.Region; }, function (region) { return region.country; }),
|
|
96
|
-
__metadata("design:type", Array)
|
|
97
|
-
], Country.prototype, "regions", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, typeorm_1.OneToMany)(function () { return __1.Bank; }, function (bank) { return bank.country; }),
|
|
100
|
-
__metadata("design:type", Array)
|
|
101
|
-
], Country.prototype, "banks", void 0);
|
|
102
|
-
Country = __decorate([
|
|
103
|
-
(0, typeorm_1.Entity)({ comment: "Países donde está disponible la plataforma." })
|
|
104
|
-
], Country);
|
|
105
|
-
return Country;
|
|
106
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
const jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
16
|
+
const Region_1 = require("./Region");
|
|
17
|
+
let Country = class Country {
|
|
18
|
+
};
|
|
107
19
|
exports.Country = Country;
|
|
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
|
+
], Country.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ length: 10, type: "varchar", comment: "Código del país." }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], Country.prototype, "code", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ length: 50, type: "varchar", comment: "Nombre del país." }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], Country.prototype, "name", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({
|
|
37
|
+
length: 10,
|
|
38
|
+
type: "varchar",
|
|
39
|
+
comment: "Usamos esta columna para saber la moneda del país y sugerírsela al usuario o al local.",
|
|
40
|
+
}),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], Country.prototype, "currency", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({
|
|
45
|
+
length: 10,
|
|
46
|
+
type: "varchar",
|
|
47
|
+
comment: "Prefijo para los números de teléfono.",
|
|
48
|
+
}),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], Country.prototype, "prefix", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({
|
|
53
|
+
type: "varchar",
|
|
54
|
+
length: 15,
|
|
55
|
+
comment: "Estructura que tiene el teléfono en ese país.",
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], Country.prototype, "structure_phone", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({
|
|
61
|
+
type: "longtext",
|
|
62
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
63
|
+
comment: "Esta columna de tipo JSON nos sirve para agregar toda la información que se necesita a nivel de información legal de la empresa que se registre, ya que para cada país cambia la información.",
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], Country.prototype, "legal_information", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({
|
|
69
|
+
type: "longtext",
|
|
70
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
71
|
+
comment: "Columna de tipo JSON para almacenar la información que se necesita para la información del representante legal de la empresa.",
|
|
72
|
+
}),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], Country.prototype, "legal_agent", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({
|
|
77
|
+
type: "longtext",
|
|
78
|
+
nullable: true,
|
|
79
|
+
default: null,
|
|
80
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
81
|
+
comment: "Columna de tipo JSON para almacenar información adicional sobre el país.",
|
|
82
|
+
}),
|
|
83
|
+
__metadata("design:type", Object)
|
|
84
|
+
], Country.prototype, "details", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({
|
|
87
|
+
default: 1,
|
|
88
|
+
type: "int",
|
|
89
|
+
width: 1,
|
|
90
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
91
|
+
}),
|
|
92
|
+
__metadata("design:type", Number)
|
|
93
|
+
], Country.prototype, "status", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, typeorm_1.OneToMany)(() => Region_1.Region, (region) => region.country),
|
|
96
|
+
__metadata("design:type", Array)
|
|
97
|
+
], Country.prototype, "regions", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, typeorm_1.OneToMany)(() => __1.Bank, (bank) => bank.country),
|
|
100
|
+
__metadata("design:type", Array)
|
|
101
|
+
], Country.prototype, "banks", void 0);
|
|
102
|
+
exports.Country = Country = __decorate([
|
|
103
|
+
(0, typeorm_1.Entity)({ comment: "Países donde está disponible la plataforma." })
|
|
104
|
+
], Country);
|
package/dist/entities/Day.js
CHANGED
|
@@ -10,45 +10,42 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Day = 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
|
-
], Day.prototype, "id", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({
|
|
27
|
-
length: 50,
|
|
28
|
-
type: "varchar",
|
|
29
|
-
comment: 'Nombre del día.\r\n\r\nID/KEY de la variable que se encuentra en los archivos "locale" para el multilenguaje.',
|
|
30
|
-
}),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], Day.prototype, "name", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({
|
|
35
|
-
default: 1,
|
|
36
|
-
type: "varchar",
|
|
37
|
-
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
38
|
-
}),
|
|
39
|
-
__metadata("design:type", Number)
|
|
40
|
-
], Day.prototype, "status", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, typeorm_1.OneToMany)(function () { return __1.ScheduleCategory; }, function (scheduleCategory) { return scheduleCategory.day; }),
|
|
43
|
-
__metadata("design:type", Array)
|
|
44
|
-
], Day.prototype, "category_schedules_day", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.OneToMany)(function () { return __1.ProductSchedule; }, function (productSchedule) { return productSchedule.day; }),
|
|
47
|
-
__metadata("design:type", Array)
|
|
48
|
-
], Day.prototype, "product_schedules_day", void 0);
|
|
49
|
-
Day = __decorate([
|
|
50
|
-
(0, typeorm_1.Entity)({ comment: "Días de la semana." })
|
|
51
|
-
], Day);
|
|
52
|
-
return Day;
|
|
53
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
let Day = class Day {
|
|
16
|
+
};
|
|
54
17
|
exports.Day = Day;
|
|
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
|
+
], Day.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({
|
|
27
|
+
length: 50,
|
|
28
|
+
type: "varchar",
|
|
29
|
+
comment: 'Nombre del día.\r\n\r\nID/KEY de la variable que se encuentra en los archivos "locale" para el multilenguaje.',
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], Day.prototype, "name", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({
|
|
35
|
+
default: 1,
|
|
36
|
+
type: "varchar",
|
|
37
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
38
|
+
}),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], Day.prototype, "status", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.OneToMany)(() => __1.ScheduleCategory, (scheduleCategory) => scheduleCategory.day),
|
|
43
|
+
__metadata("design:type", Array)
|
|
44
|
+
], Day.prototype, "category_schedules_day", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.OneToMany)(() => __1.ProductSchedule, (productSchedule) => productSchedule.day),
|
|
47
|
+
__metadata("design:type", Array)
|
|
48
|
+
], Day.prototype, "product_schedules_day", void 0);
|
|
49
|
+
exports.Day = Day = __decorate([
|
|
50
|
+
(0, typeorm_1.Entity)({ comment: "Días de la semana." })
|
|
51
|
+
], Day);
|
|
@@ -10,53 +10,50 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DecorationReserve = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
-
type: "int",
|
|
21
|
-
comment: "Id único de cada registro.",
|
|
22
|
-
}),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], DecorationReserve.prototype, "id", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({
|
|
27
|
-
length: 50,
|
|
28
|
-
type: "varchar",
|
|
29
|
-
comment: "Nombre de la decoración.\r\nEste nombre debe ser claro y preciso.",
|
|
30
|
-
}),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], DecorationReserve.prototype, "name", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({
|
|
35
|
-
length: 200,
|
|
36
|
-
type: "varchar",
|
|
37
|
-
comment: "Comentarios adicionales/observaciones de la decoración.",
|
|
38
|
-
}),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], DecorationReserve.prototype, "details", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)({
|
|
43
|
-
default: 1,
|
|
44
|
-
type: "int",
|
|
45
|
-
width: 1,
|
|
46
|
-
comment: "Estado que se encuentra el registro:\r\n0: Inactivo.\r\n1: Activo.",
|
|
47
|
-
}),
|
|
48
|
-
__metadata("design:type", Number)
|
|
49
|
-
], DecorationReserve.prototype, "status", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.OneToMany)(function () { return __1.LocalDecorationReserve; }, function (localDecorationReserve) { return localDecorationReserve.name; }),
|
|
52
|
-
__metadata("design:type", Array)
|
|
53
|
-
], DecorationReserve.prototype, "local_decorations_reserve", void 0);
|
|
54
|
-
DecorationReserve = __decorate([
|
|
55
|
-
(0, typeorm_1.Entity)({
|
|
56
|
-
comment: "Tipos de decoración qué tiene el software, lo maneja ASM.",
|
|
57
|
-
name: "decoration_reserve",
|
|
58
|
-
})
|
|
59
|
-
], DecorationReserve);
|
|
60
|
-
return DecorationReserve;
|
|
61
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
let DecorationReserve = class DecorationReserve {
|
|
16
|
+
};
|
|
62
17
|
exports.DecorationReserve = DecorationReserve;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
+
type: "int",
|
|
21
|
+
comment: "Id único de cada registro.",
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], DecorationReserve.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({
|
|
27
|
+
length: 50,
|
|
28
|
+
type: "varchar",
|
|
29
|
+
comment: "Nombre de la decoración.\r\nEste nombre debe ser claro y preciso.",
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], DecorationReserve.prototype, "name", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({
|
|
35
|
+
length: 200,
|
|
36
|
+
type: "varchar",
|
|
37
|
+
comment: "Comentarios adicionales/observaciones de la decoración.",
|
|
38
|
+
}),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], DecorationReserve.prototype, "details", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({
|
|
43
|
+
default: 1,
|
|
44
|
+
type: "int",
|
|
45
|
+
width: 1,
|
|
46
|
+
comment: "Estado que se encuentra el registro:\r\n0: Inactivo.\r\n1: Activo.",
|
|
47
|
+
}),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], DecorationReserve.prototype, "status", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.OneToMany)(() => __1.LocalDecorationReserve, (localDecorationReserve) => localDecorationReserve.name),
|
|
52
|
+
__metadata("design:type", Array)
|
|
53
|
+
], DecorationReserve.prototype, "local_decorations_reserve", void 0);
|
|
54
|
+
exports.DecorationReserve = DecorationReserve = __decorate([
|
|
55
|
+
(0, typeorm_1.Entity)({
|
|
56
|
+
comment: "Tipos de decoración qué tiene el software, lo maneja ASM.",
|
|
57
|
+
name: "decoration_reserve",
|
|
58
|
+
})
|
|
59
|
+
], DecorationReserve);
|
|
@@ -10,133 +10,128 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DiscountCodeCompany = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
24
|
-
type: "int",
|
|
25
|
-
comment: "Número de identificación (ID) único de cada registro.",
|
|
26
|
-
}),
|
|
27
|
-
__metadata("design:type", Number)
|
|
28
|
-
], DiscountCodeCompany.prototype, "id", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({
|
|
31
|
-
length: 10,
|
|
32
|
-
type: "varchar",
|
|
33
|
-
comment: "Código de descuento para las empresas (company).",
|
|
34
|
-
}),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], DiscountCodeCompany.prototype, "code", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ length: 10, type: "varchar", comment: "Descuento que se aplica." }),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], DiscountCodeCompany.prototype, "discount", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)({
|
|
43
|
-
default: 1,
|
|
44
|
-
type: "int",
|
|
45
|
-
comment: "Campo para el tipo de descuento:\r\n1. Porcentaje.\r\n2. Valor en moneda.",
|
|
46
|
-
}),
|
|
47
|
-
__metadata("design:type", Number)
|
|
48
|
-
], DiscountCodeCompany.prototype, "type", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, typeorm_1.Column)({
|
|
51
|
-
default: 1,
|
|
52
|
-
type: "int",
|
|
53
|
-
comment: "Con esto validamos si la empresa puede usar el código una vez o varias veces:\r\n1. Una sola vez.\r\n0. Más de una vez.\r\n\r\nCon esto validamos sí tenemos qué ir a buscar a la tabla code_redemption_history_company.",
|
|
54
|
-
}),
|
|
55
|
-
__metadata("design:type", Number)
|
|
56
|
-
], DiscountCodeCompany.prototype, "single_use", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({
|
|
59
|
-
nullable: true,
|
|
60
|
-
type: "int",
|
|
61
|
-
default: null,
|
|
62
|
-
comment: "Validamos sí el descuento se aplica para una cantidad límite de usuarios. Entonces, no debería tener en cuenta la fecha de expiración o, si quiero agregar las 2 condicionales.",
|
|
63
|
-
}),
|
|
64
|
-
__metadata("design:type", Object)
|
|
65
|
-
], DiscountCodeCompany.prototype, "use_limit", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, typeorm_1.Column)({
|
|
68
|
-
type: "datetime",
|
|
69
|
-
comment: "Fecha de creación del registro.",
|
|
70
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
71
|
-
}),
|
|
72
|
-
__metadata("design:type", Date)
|
|
73
|
-
], DiscountCodeCompany.prototype, "created", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, typeorm_1.Column)({
|
|
76
|
-
type: "date",
|
|
77
|
-
comment: "Fecha inicial del descuento.",
|
|
78
|
-
}),
|
|
79
|
-
__metadata("design:type", Date)
|
|
80
|
-
], DiscountCodeCompany.prototype, "start", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
(0, typeorm_1.Column)({
|
|
83
|
-
type: "date",
|
|
84
|
-
nullable: true,
|
|
85
|
-
default: null,
|
|
86
|
-
comment: "Fecha de expiración del registro.",
|
|
87
|
-
}),
|
|
88
|
-
__metadata("design:type", Object)
|
|
89
|
-
], DiscountCodeCompany.prototype, "expiration", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, typeorm_1.Column)({
|
|
92
|
-
type: "text",
|
|
93
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
94
|
-
nullable: true,
|
|
95
|
-
default: null,
|
|
96
|
-
comment: "Columna de tipos JSON para agregar en un arreglo los días que se pueden repetir el descuento.",
|
|
97
|
-
}),
|
|
98
|
-
__metadata("design:type", Object)
|
|
99
|
-
], DiscountCodeCompany.prototype, "repeat_days", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
(0, typeorm_1.Column)({
|
|
102
|
-
type: "datetime",
|
|
103
|
-
comment: "Fecha de actualización.",
|
|
104
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
105
|
-
}),
|
|
106
|
-
__metadata("design:type", Object)
|
|
107
|
-
], DiscountCodeCompany.prototype, "updated", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
(0, typeorm_1.Column)({
|
|
110
|
-
default: 1,
|
|
111
|
-
type: "int",
|
|
112
|
-
width: 1,
|
|
113
|
-
comment: "Estado del registro, es decir: \n 1. Activo: Es visible en la plataforma. \n 0. Inactivo: No será visible en la plataforma.",
|
|
114
|
-
}),
|
|
115
|
-
__metadata("design:type", Number)
|
|
116
|
-
], DiscountCodeCompany.prototype, "status", void 0);
|
|
117
|
-
__decorate([
|
|
118
|
-
(0, typeorm_1.ManyToOne)(function () { return Master_1.Master; }, function (master) { return master.discount_code_companies; }, {
|
|
119
|
-
onDelete: "CASCADE",
|
|
120
|
-
onUpdate: "NO ACTION",
|
|
121
|
-
}),
|
|
122
|
-
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
123
|
-
__metadata("design:type", Master_1.Master)
|
|
124
|
-
], DiscountCodeCompany.prototype, "updated_by", void 0);
|
|
125
|
-
__decorate([
|
|
126
|
-
(0, typeorm_1.OneToMany)(function () { return CodeRedemptionHistoryCompany_1.CodeRedemptionHistoryCompany; }, function (codeRedemptionHistoryCompany) {
|
|
127
|
-
return codeRedemptionHistoryCompany.discount_code_company;
|
|
128
|
-
}),
|
|
129
|
-
__metadata("design:type", Array)
|
|
130
|
-
], DiscountCodeCompany.prototype, "code_redemptions_history_company", void 0);
|
|
131
|
-
__decorate([
|
|
132
|
-
(0, typeorm_1.OneToMany)(function () { return ServiceDiscountsPlan_1.ServiceDiscountsPlan; }, function (serviceDiscountsPlan) { return serviceDiscountsPlan.discount; }),
|
|
133
|
-
__metadata("design:type", Array)
|
|
134
|
-
], DiscountCodeCompany.prototype, "service_discounts_plans", void 0);
|
|
135
|
-
DiscountCodeCompany = __decorate([
|
|
136
|
-
(0, typeorm_1.Entity)("discount_code_company", {
|
|
137
|
-
comment: "Códigos de descuento para las empresas.",
|
|
138
|
-
})
|
|
139
|
-
], DiscountCodeCompany);
|
|
140
|
-
return DiscountCodeCompany;
|
|
141
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const dateTransformer_1 = require("../transformers/dateTransformer");
|
|
15
|
+
const jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
16
|
+
const CodeRedemptionHistoryCompany_1 = require("./CodeRedemptionHistoryCompany");
|
|
17
|
+
const Master_1 = require("./Master");
|
|
18
|
+
const ServiceDiscountsPlan_1 = require("./ServiceDiscountsPlan");
|
|
19
|
+
let DiscountCodeCompany = class DiscountCodeCompany {
|
|
20
|
+
};
|
|
142
21
|
exports.DiscountCodeCompany = DiscountCodeCompany;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
24
|
+
type: "int",
|
|
25
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
26
|
+
}),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], DiscountCodeCompany.prototype, "id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({
|
|
31
|
+
length: 10,
|
|
32
|
+
type: "varchar",
|
|
33
|
+
comment: "Código de descuento para las empresas (company).",
|
|
34
|
+
}),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], DiscountCodeCompany.prototype, "code", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ length: 10, type: "varchar", comment: "Descuento que se aplica." }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], DiscountCodeCompany.prototype, "discount", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({
|
|
43
|
+
default: 1,
|
|
44
|
+
type: "int",
|
|
45
|
+
comment: "Campo para el tipo de descuento:\r\n1. Porcentaje.\r\n2. Valor en moneda.",
|
|
46
|
+
}),
|
|
47
|
+
__metadata("design:type", Number)
|
|
48
|
+
], DiscountCodeCompany.prototype, "type", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({
|
|
51
|
+
default: 1,
|
|
52
|
+
type: "int",
|
|
53
|
+
comment: "Con esto validamos si la empresa puede usar el código una vez o varias veces:\r\n1. Una sola vez.\r\n0. Más de una vez.\r\n\r\nCon esto validamos sí tenemos qué ir a buscar a la tabla code_redemption_history_company.",
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], DiscountCodeCompany.prototype, "single_use", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({
|
|
59
|
+
nullable: true,
|
|
60
|
+
type: "int",
|
|
61
|
+
default: null,
|
|
62
|
+
comment: "Validamos sí el descuento se aplica para una cantidad límite de usuarios. Entonces, no debería tener en cuenta la fecha de expiración o, si quiero agregar las 2 condicionales.",
|
|
63
|
+
}),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], DiscountCodeCompany.prototype, "use_limit", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({
|
|
68
|
+
type: "datetime",
|
|
69
|
+
comment: "Fecha de creación del registro.",
|
|
70
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
71
|
+
}),
|
|
72
|
+
__metadata("design:type", Date)
|
|
73
|
+
], DiscountCodeCompany.prototype, "created", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({
|
|
76
|
+
type: "date",
|
|
77
|
+
comment: "Fecha inicial del descuento.",
|
|
78
|
+
}),
|
|
79
|
+
__metadata("design:type", Date)
|
|
80
|
+
], DiscountCodeCompany.prototype, "start", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)({
|
|
83
|
+
type: "date",
|
|
84
|
+
nullable: true,
|
|
85
|
+
default: null,
|
|
86
|
+
comment: "Fecha de expiración del registro.",
|
|
87
|
+
}),
|
|
88
|
+
__metadata("design:type", Object)
|
|
89
|
+
], DiscountCodeCompany.prototype, "expiration", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, typeorm_1.Column)({
|
|
92
|
+
type: "text",
|
|
93
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
94
|
+
nullable: true,
|
|
95
|
+
default: null,
|
|
96
|
+
comment: "Columna de tipos JSON para agregar en un arreglo los días que se pueden repetir el descuento.",
|
|
97
|
+
}),
|
|
98
|
+
__metadata("design:type", Object)
|
|
99
|
+
], DiscountCodeCompany.prototype, "repeat_days", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({
|
|
102
|
+
type: "datetime",
|
|
103
|
+
comment: "Fecha de actualización.",
|
|
104
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
105
|
+
}),
|
|
106
|
+
__metadata("design:type", Object)
|
|
107
|
+
], DiscountCodeCompany.prototype, "updated", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typeorm_1.Column)({
|
|
110
|
+
default: 1,
|
|
111
|
+
type: "int",
|
|
112
|
+
width: 1,
|
|
113
|
+
comment: "Estado del registro, es decir: \n 1. Activo: Es visible en la plataforma. \n 0. Inactivo: No será visible en la plataforma.",
|
|
114
|
+
}),
|
|
115
|
+
__metadata("design:type", Number)
|
|
116
|
+
], DiscountCodeCompany.prototype, "status", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, typeorm_1.ManyToOne)(() => Master_1.Master, (master) => master.discount_code_companies, {
|
|
119
|
+
onDelete: "CASCADE",
|
|
120
|
+
onUpdate: "NO ACTION",
|
|
121
|
+
}),
|
|
122
|
+
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
123
|
+
__metadata("design:type", Master_1.Master)
|
|
124
|
+
], DiscountCodeCompany.prototype, "updated_by", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, typeorm_1.OneToMany)(() => CodeRedemptionHistoryCompany_1.CodeRedemptionHistoryCompany, (codeRedemptionHistoryCompany) => codeRedemptionHistoryCompany.discount_code_company),
|
|
127
|
+
__metadata("design:type", Array)
|
|
128
|
+
], DiscountCodeCompany.prototype, "code_redemptions_history_company", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, typeorm_1.OneToMany)(() => ServiceDiscountsPlan_1.ServiceDiscountsPlan, (serviceDiscountsPlan) => serviceDiscountsPlan.discount),
|
|
131
|
+
__metadata("design:type", Array)
|
|
132
|
+
], DiscountCodeCompany.prototype, "service_discounts_plans", void 0);
|
|
133
|
+
exports.DiscountCodeCompany = DiscountCodeCompany = __decorate([
|
|
134
|
+
(0, typeorm_1.Entity)("discount_code_company", {
|
|
135
|
+
comment: "Códigos de descuento para las empresas.",
|
|
136
|
+
})
|
|
137
|
+
], DiscountCodeCompany);
|