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,146 +10,143 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DiscountCodeUser = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
25
|
-
type: "int",
|
|
26
|
-
comment: "Número de identificación (ID) único de cada registro.",
|
|
27
|
-
}),
|
|
28
|
-
__metadata("design:type", Number)
|
|
29
|
-
], DiscountCodeUser.prototype, "id", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.ManyToOne)(function () { return Company_1.Company; }, function (company) { return company.discount_code_users; }, {
|
|
32
|
-
onDelete: "CASCADE",
|
|
33
|
-
onUpdate: "NO ACTION",
|
|
34
|
-
}),
|
|
35
|
-
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
36
|
-
__metadata("design:type", Company_1.Company)
|
|
37
|
-
], DiscountCodeUser.prototype, "company", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.Local; }, function (local) { return local.discount_code_locals; }, {
|
|
40
|
-
onDelete: "CASCADE",
|
|
41
|
-
onUpdate: "NO ACTION",
|
|
42
|
-
nullable: true,
|
|
43
|
-
}),
|
|
44
|
-
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
45
|
-
__metadata("design:type", Object)
|
|
46
|
-
], DiscountCodeUser.prototype, "local", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, typeorm_1.Column)({
|
|
49
|
-
length: 10,
|
|
50
|
-
type: "varchar",
|
|
51
|
-
comment: "Código del descuento para compartirlo.",
|
|
52
|
-
}),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], DiscountCodeUser.prototype, "code", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, typeorm_1.Column)({ length: 10, type: "varchar", comment: "Descuento que se aplica." }),
|
|
57
|
-
__metadata("design:type", String)
|
|
58
|
-
], DiscountCodeUser.prototype, "discount", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, typeorm_1.Column)({
|
|
61
|
-
type: "int",
|
|
62
|
-
width: 1,
|
|
63
|
-
comment: "Campo para el tipo de descuento: \r\n1. Porcentaje.\r\n2. Valor en moneda.",
|
|
64
|
-
}),
|
|
65
|
-
__metadata("design:type", Number)
|
|
66
|
-
], DiscountCodeUser.prototype, "type", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, typeorm_1.Column)({
|
|
69
|
-
default: 1,
|
|
70
|
-
type: "int",
|
|
71
|
-
width: 1,
|
|
72
|
-
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 que ir a buscar a la tabla code_redemption_history_user",
|
|
73
|
-
}),
|
|
74
|
-
__metadata("design:type", Number)
|
|
75
|
-
], DiscountCodeUser.prototype, "single_use", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, typeorm_1.Column)({
|
|
78
|
-
nullable: true,
|
|
79
|
-
default: null,
|
|
80
|
-
type: "int",
|
|
81
|
-
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.",
|
|
82
|
-
}),
|
|
83
|
-
__metadata("design:type", Object)
|
|
84
|
-
], DiscountCodeUser.prototype, "use_limit", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
(0, typeorm_1.Column)({
|
|
87
|
-
type: "datetime",
|
|
88
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
89
|
-
comment: "Fecha de creación del registro.",
|
|
90
|
-
}),
|
|
91
|
-
__metadata("design:type", Date)
|
|
92
|
-
], DiscountCodeUser.prototype, "created", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, typeorm_1.Column)({
|
|
95
|
-
type: "date",
|
|
96
|
-
comment: "Fecha inicial del descuento.",
|
|
97
|
-
}),
|
|
98
|
-
__metadata("design:type", Date)
|
|
99
|
-
], DiscountCodeUser.prototype, "start", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
(0, typeorm_1.Column)({
|
|
102
|
-
type: "date",
|
|
103
|
-
nullable: true,
|
|
104
|
-
default: null,
|
|
105
|
-
comment: "Fecha de expiración del registro.",
|
|
106
|
-
}),
|
|
107
|
-
__metadata("design:type", Object)
|
|
108
|
-
], DiscountCodeUser.prototype, "expiration", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
(0, typeorm_1.Column)({
|
|
111
|
-
type: "text",
|
|
112
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
113
|
-
nullable: true,
|
|
114
|
-
default: null,
|
|
115
|
-
comment: "Columna de tipos JSON para agregar en un arreglo los días que se pueden repetir el descuento.",
|
|
116
|
-
}),
|
|
117
|
-
__metadata("design:type", Object)
|
|
118
|
-
], DiscountCodeUser.prototype, "repeat_days", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
(0, typeorm_1.ManyToOne)(function () { return Partner_1.Partner; }, function (partner) { return partner.discount_code_partners; }, {
|
|
121
|
-
onDelete: "CASCADE",
|
|
122
|
-
onUpdate: "NO ACTION",
|
|
123
|
-
}),
|
|
124
|
-
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
125
|
-
__metadata("design:type", Partner_1.Partner)
|
|
126
|
-
], DiscountCodeUser.prototype, "updated_by", void 0);
|
|
127
|
-
__decorate([
|
|
128
|
-
(0, typeorm_1.Column)({
|
|
129
|
-
type: "datetime",
|
|
130
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
131
|
-
comment: "Fecha de actualización.",
|
|
132
|
-
}),
|
|
133
|
-
__metadata("design:type", Date)
|
|
134
|
-
], DiscountCodeUser.prototype, "updated", void 0);
|
|
135
|
-
__decorate([
|
|
136
|
-
(0, typeorm_1.Column)({
|
|
137
|
-
default: 1,
|
|
138
|
-
type: "int",
|
|
139
|
-
width: 1,
|
|
140
|
-
comment: "Estado del registro, es decir: \n 1. Activo: Es visible en la plataforma. \n 0. Inactivo: No será visible en la plataforma.",
|
|
141
|
-
}),
|
|
142
|
-
__metadata("design:type", Number)
|
|
143
|
-
], DiscountCodeUser.prototype, "status", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
(0, typeorm_1.OneToMany)(function () { return CodeRedemptionHistoryUser_1.CodeRedemptionHistoryUser; }, function (codeRedemptionHistoryUser) { return codeRedemptionHistoryUser.discount_code_user; }),
|
|
146
|
-
__metadata("design:type", Array)
|
|
147
|
-
], DiscountCodeUser.prototype, "code_redemptions_history_users", void 0);
|
|
148
|
-
DiscountCodeUser = __decorate([
|
|
149
|
-
(0, typeorm_1.Entity)("discount_code_user", {
|
|
150
|
-
comment: "Códigos de descuento para los usuarios.",
|
|
151
|
-
})
|
|
152
|
-
], DiscountCodeUser);
|
|
153
|
-
return DiscountCodeUser;
|
|
154
|
-
}());
|
|
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 CodeRedemptionHistoryUser_1 = require("./CodeRedemptionHistoryUser");
|
|
18
|
+
const Company_1 = require("./Company");
|
|
19
|
+
const Partner_1 = require("./Partner");
|
|
20
|
+
let DiscountCodeUser = class DiscountCodeUser {
|
|
21
|
+
};
|
|
155
22
|
exports.DiscountCodeUser = DiscountCodeUser;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
25
|
+
type: "int",
|
|
26
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
27
|
+
}),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], DiscountCodeUser.prototype, "id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.ManyToOne)(() => Company_1.Company, (company) => company.discount_code_users, {
|
|
32
|
+
onDelete: "CASCADE",
|
|
33
|
+
onUpdate: "NO ACTION",
|
|
34
|
+
}),
|
|
35
|
+
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
36
|
+
__metadata("design:type", Company_1.Company)
|
|
37
|
+
], DiscountCodeUser.prototype, "company", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.ManyToOne)(() => __1.Local, (local) => local.discount_code_locals, {
|
|
40
|
+
onDelete: "CASCADE",
|
|
41
|
+
onUpdate: "NO ACTION",
|
|
42
|
+
nullable: true,
|
|
43
|
+
}),
|
|
44
|
+
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], DiscountCodeUser.prototype, "local", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({
|
|
49
|
+
length: 10,
|
|
50
|
+
type: "varchar",
|
|
51
|
+
comment: "Código del descuento para compartirlo.",
|
|
52
|
+
}),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], DiscountCodeUser.prototype, "code", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ length: 10, type: "varchar", comment: "Descuento que se aplica." }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], DiscountCodeUser.prototype, "discount", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({
|
|
61
|
+
type: "int",
|
|
62
|
+
width: 1,
|
|
63
|
+
comment: "Campo para el tipo de descuento: \r\n1. Porcentaje.\r\n2. Valor en moneda.",
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:type", Number)
|
|
66
|
+
], DiscountCodeUser.prototype, "type", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({
|
|
69
|
+
default: 1,
|
|
70
|
+
type: "int",
|
|
71
|
+
width: 1,
|
|
72
|
+
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 que ir a buscar a la tabla code_redemption_history_user",
|
|
73
|
+
}),
|
|
74
|
+
__metadata("design:type", Number)
|
|
75
|
+
], DiscountCodeUser.prototype, "single_use", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({
|
|
78
|
+
nullable: true,
|
|
79
|
+
default: null,
|
|
80
|
+
type: "int",
|
|
81
|
+
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.",
|
|
82
|
+
}),
|
|
83
|
+
__metadata("design:type", Object)
|
|
84
|
+
], DiscountCodeUser.prototype, "use_limit", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({
|
|
87
|
+
type: "datetime",
|
|
88
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
89
|
+
comment: "Fecha de creación del registro.",
|
|
90
|
+
}),
|
|
91
|
+
__metadata("design:type", Date)
|
|
92
|
+
], DiscountCodeUser.prototype, "created", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({
|
|
95
|
+
type: "date",
|
|
96
|
+
comment: "Fecha inicial del descuento.",
|
|
97
|
+
}),
|
|
98
|
+
__metadata("design:type", Date)
|
|
99
|
+
], DiscountCodeUser.prototype, "start", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({
|
|
102
|
+
type: "date",
|
|
103
|
+
nullable: true,
|
|
104
|
+
default: null,
|
|
105
|
+
comment: "Fecha de expiración del registro.",
|
|
106
|
+
}),
|
|
107
|
+
__metadata("design:type", Object)
|
|
108
|
+
], DiscountCodeUser.prototype, "expiration", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.Column)({
|
|
111
|
+
type: "text",
|
|
112
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
113
|
+
nullable: true,
|
|
114
|
+
default: null,
|
|
115
|
+
comment: "Columna de tipos JSON para agregar en un arreglo los días que se pueden repetir el descuento.",
|
|
116
|
+
}),
|
|
117
|
+
__metadata("design:type", Object)
|
|
118
|
+
], DiscountCodeUser.prototype, "repeat_days", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, typeorm_1.ManyToOne)(() => Partner_1.Partner, (partner) => partner.discount_code_partners, {
|
|
121
|
+
onDelete: "CASCADE",
|
|
122
|
+
onUpdate: "NO ACTION",
|
|
123
|
+
}),
|
|
124
|
+
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
125
|
+
__metadata("design:type", Partner_1.Partner)
|
|
126
|
+
], DiscountCodeUser.prototype, "updated_by", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, typeorm_1.Column)({
|
|
129
|
+
type: "datetime",
|
|
130
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
131
|
+
comment: "Fecha de actualización.",
|
|
132
|
+
}),
|
|
133
|
+
__metadata("design:type", Date)
|
|
134
|
+
], DiscountCodeUser.prototype, "updated", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, typeorm_1.Column)({
|
|
137
|
+
default: 1,
|
|
138
|
+
type: "int",
|
|
139
|
+
width: 1,
|
|
140
|
+
comment: "Estado del registro, es decir: \n 1. Activo: Es visible en la plataforma. \n 0. Inactivo: No será visible en la plataforma.",
|
|
141
|
+
}),
|
|
142
|
+
__metadata("design:type", Number)
|
|
143
|
+
], DiscountCodeUser.prototype, "status", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, typeorm_1.OneToMany)(() => CodeRedemptionHistoryUser_1.CodeRedemptionHistoryUser, (codeRedemptionHistoryUser) => codeRedemptionHistoryUser.discount_code_user),
|
|
146
|
+
__metadata("design:type", Array)
|
|
147
|
+
], DiscountCodeUser.prototype, "code_redemptions_history_users", void 0);
|
|
148
|
+
exports.DiscountCodeUser = DiscountCodeUser = __decorate([
|
|
149
|
+
(0, typeorm_1.Entity)("discount_code_user", {
|
|
150
|
+
comment: "Códigos de descuento para los usuarios.",
|
|
151
|
+
})
|
|
152
|
+
], DiscountCodeUser);
|
package/dist/entities/Gallery.js
CHANGED
|
@@ -10,95 +10,92 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Gallery = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
-
type: "int",
|
|
22
|
-
comment: "ID único de cada registro.",
|
|
23
|
-
}),
|
|
24
|
-
__metadata("design:type", Number)
|
|
25
|
-
], Gallery.prototype, "id", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.Local; }, function (local) { return local.galleries; }, {
|
|
28
|
-
onDelete: "CASCADE",
|
|
29
|
-
onUpdate: "NO ACTION",
|
|
30
|
-
nullable: true,
|
|
31
|
-
}),
|
|
32
|
-
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
33
|
-
__metadata("design:type", Object)
|
|
34
|
-
], Gallery.prototype, "local", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({
|
|
37
|
-
type: "varchar",
|
|
38
|
-
length: 255,
|
|
39
|
-
unique: true,
|
|
40
|
-
comment: "ID de la imagen.",
|
|
41
|
-
}),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], Gallery.prototype, "public_id", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({
|
|
46
|
-
type: "varchar",
|
|
47
|
-
length: 1024,
|
|
48
|
-
comment: "Url de la imagen.",
|
|
49
|
-
}),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], Gallery.prototype, "image_url", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, typeorm_1.Column)({
|
|
54
|
-
type: "datetime",
|
|
55
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
56
|
-
comment: "Fecha de creación de la imagen.",
|
|
57
|
-
}),
|
|
58
|
-
__metadata("design:type", Date)
|
|
59
|
-
], Gallery.prototype, "created", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.galleries; }, {
|
|
62
|
-
onDelete: "NO ACTION",
|
|
63
|
-
onUpdate: "NO ACTION",
|
|
64
|
-
}),
|
|
65
|
-
(0, typeorm_1.JoinColumn)({ name: "created_by" }),
|
|
66
|
-
__metadata("design:type", __1.Partner)
|
|
67
|
-
], Gallery.prototype, "created_by", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, typeorm_1.Column)({
|
|
70
|
-
default: 1,
|
|
71
|
-
type: "int",
|
|
72
|
-
width: 1,
|
|
73
|
-
comment: "Estado en el que se encuentra la imagen:\r\n0: Inactivo.\r\n1: Activo.",
|
|
74
|
-
}),
|
|
75
|
-
__metadata("design:type", Number)
|
|
76
|
-
], Gallery.prototype, "status", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
(0, typeorm_1.ManyToMany)(function () { return __1.Product; }, function (product) { return product.product_images; }),
|
|
79
|
-
(0, typeorm_1.JoinTable)({
|
|
80
|
-
name: "product_image",
|
|
81
|
-
joinColumn: {
|
|
82
|
-
name: "image",
|
|
83
|
-
referencedColumnName: "id",
|
|
84
|
-
},
|
|
85
|
-
inverseJoinColumn: {
|
|
86
|
-
name: "product",
|
|
87
|
-
referencedColumnName: "id",
|
|
88
|
-
},
|
|
89
|
-
}),
|
|
90
|
-
__metadata("design:type", Array)
|
|
91
|
-
], Gallery.prototype, "products_images", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, typeorm_1.OneToMany)(function () { return __1.ProductImage; }, function (productImage) { return productImage.image; }),
|
|
94
|
-
__metadata("design:type", Array)
|
|
95
|
-
], Gallery.prototype, "product_images", void 0);
|
|
96
|
-
Gallery = __decorate([
|
|
97
|
-
(0, typeorm_1.Entity)({
|
|
98
|
-
name: "gallery",
|
|
99
|
-
comment: "Galería de imágenes qué se usan para los productos.",
|
|
100
|
-
})
|
|
101
|
-
], Gallery);
|
|
102
|
-
return Gallery;
|
|
103
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
const dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
let Gallery = class Gallery {
|
|
17
|
+
};
|
|
104
18
|
exports.Gallery = Gallery;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
+
type: "int",
|
|
22
|
+
comment: "ID único de cada registro.",
|
|
23
|
+
}),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], Gallery.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.ManyToOne)(() => __1.Local, (local) => local.galleries, {
|
|
28
|
+
onDelete: "CASCADE",
|
|
29
|
+
onUpdate: "NO ACTION",
|
|
30
|
+
nullable: true,
|
|
31
|
+
}),
|
|
32
|
+
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], Gallery.prototype, "local", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({
|
|
37
|
+
type: "varchar",
|
|
38
|
+
length: 255,
|
|
39
|
+
unique: true,
|
|
40
|
+
comment: "ID de la imagen.",
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Gallery.prototype, "public_id", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({
|
|
46
|
+
type: "varchar",
|
|
47
|
+
length: 1024,
|
|
48
|
+
comment: "Url de la imagen.",
|
|
49
|
+
}),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], Gallery.prototype, "image_url", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({
|
|
54
|
+
type: "datetime",
|
|
55
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
56
|
+
comment: "Fecha de creación de la imagen.",
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", Date)
|
|
59
|
+
], Gallery.prototype, "created", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.ManyToOne)(() => __1.Partner, (partner) => partner.galleries, {
|
|
62
|
+
onDelete: "NO ACTION",
|
|
63
|
+
onUpdate: "NO ACTION",
|
|
64
|
+
}),
|
|
65
|
+
(0, typeorm_1.JoinColumn)({ name: "created_by" }),
|
|
66
|
+
__metadata("design:type", __1.Partner)
|
|
67
|
+
], Gallery.prototype, "created_by", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({
|
|
70
|
+
default: 1,
|
|
71
|
+
type: "int",
|
|
72
|
+
width: 1,
|
|
73
|
+
comment: "Estado en el que se encuentra la imagen:\r\n0: Inactivo.\r\n1: Activo.",
|
|
74
|
+
}),
|
|
75
|
+
__metadata("design:type", Number)
|
|
76
|
+
], Gallery.prototype, "status", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.ManyToMany)(() => __1.Product, (product) => product.product_images),
|
|
79
|
+
(0, typeorm_1.JoinTable)({
|
|
80
|
+
name: "product_image",
|
|
81
|
+
joinColumn: {
|
|
82
|
+
name: "image",
|
|
83
|
+
referencedColumnName: "id",
|
|
84
|
+
},
|
|
85
|
+
inverseJoinColumn: {
|
|
86
|
+
name: "product",
|
|
87
|
+
referencedColumnName: "id",
|
|
88
|
+
},
|
|
89
|
+
}),
|
|
90
|
+
__metadata("design:type", Array)
|
|
91
|
+
], Gallery.prototype, "products_images", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.OneToMany)(() => __1.ProductImage, (productImage) => productImage.image),
|
|
94
|
+
__metadata("design:type", Array)
|
|
95
|
+
], Gallery.prototype, "product_images", void 0);
|
|
96
|
+
exports.Gallery = Gallery = __decorate([
|
|
97
|
+
(0, typeorm_1.Entity)({
|
|
98
|
+
name: "gallery",
|
|
99
|
+
comment: "Galería de imágenes qué se usan para los productos.",
|
|
100
|
+
})
|
|
101
|
+
], Gallery);
|