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,51 +10,48 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CodeRedemptionHistoryCompany = 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
|
-
], CodeRedemptionHistoryCompany.prototype, "id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.ManyToOne)(function () { return DiscountCodeCompany_1.DiscountCodeCompany; }, function (company) { return company.code_redemptions_history_company; }, { onDelete: "CASCADE", onUpdate: "NO ACTION" }),
|
|
29
|
-
(0, typeorm_1.JoinColumn)({ name: "discount_code_company" }),
|
|
30
|
-
__metadata("design:type", DiscountCodeCompany_1.DiscountCodeCompany)
|
|
31
|
-
], CodeRedemptionHistoryCompany.prototype, "discount_code_company", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, typeorm_1.ManyToOne)(function () { return Company_1.Company; }, function (company) { return company.code_redemption_history_company; }, { onDelete: "CASCADE", onUpdate: "NO ACTION" }),
|
|
34
|
-
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
35
|
-
__metadata("design:type", Company_1.Company)
|
|
36
|
-
], CodeRedemptionHistoryCompany.prototype, "company", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({
|
|
39
|
-
type: "datetime",
|
|
40
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
41
|
-
comment: "Fecha cuando se usó el descuento.",
|
|
42
|
-
}),
|
|
43
|
-
__metadata("design:type", Date)
|
|
44
|
-
], CodeRedemptionHistoryCompany.prototype, "date_used", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({
|
|
47
|
-
length: 10,
|
|
48
|
-
type: "varchar",
|
|
49
|
-
comment: "El valor del descuento aplicado.",
|
|
50
|
-
}),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], CodeRedemptionHistoryCompany.prototype, "discount_applied", void 0);
|
|
53
|
-
CodeRedemptionHistoryCompany = __decorate([
|
|
54
|
-
(0, typeorm_1.Entity)("code_redemption_history_company", {
|
|
55
|
-
comment: "Historial de códigos redimidos por la empresa, si en algún momento cuando una empresa se registre en la plataforma, entonces se le puede dar un descuento o un plan personalizado.",
|
|
56
|
-
})
|
|
57
|
-
], CodeRedemptionHistoryCompany);
|
|
58
|
-
return CodeRedemptionHistoryCompany;
|
|
59
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Company_1 = require("./Company");
|
|
15
|
+
const DiscountCodeCompany_1 = require("./DiscountCodeCompany");
|
|
16
|
+
const dateTransformer_1 = require("../transformers/dateTransformer");
|
|
17
|
+
let CodeRedemptionHistoryCompany = class CodeRedemptionHistoryCompany {
|
|
18
|
+
};
|
|
60
19
|
exports.CodeRedemptionHistoryCompany = CodeRedemptionHistoryCompany;
|
|
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
|
+
], CodeRedemptionHistoryCompany.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.ManyToOne)(() => DiscountCodeCompany_1.DiscountCodeCompany, (company) => company.code_redemptions_history_company, { onDelete: "CASCADE", onUpdate: "NO ACTION" }),
|
|
29
|
+
(0, typeorm_1.JoinColumn)({ name: "discount_code_company" }),
|
|
30
|
+
__metadata("design:type", DiscountCodeCompany_1.DiscountCodeCompany)
|
|
31
|
+
], CodeRedemptionHistoryCompany.prototype, "discount_code_company", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.ManyToOne)(() => Company_1.Company, (company) => company.code_redemption_history_company, { onDelete: "CASCADE", onUpdate: "NO ACTION" }),
|
|
34
|
+
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
35
|
+
__metadata("design:type", Company_1.Company)
|
|
36
|
+
], CodeRedemptionHistoryCompany.prototype, "company", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({
|
|
39
|
+
type: "datetime",
|
|
40
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
41
|
+
comment: "Fecha cuando se usó el descuento.",
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", Date)
|
|
44
|
+
], CodeRedemptionHistoryCompany.prototype, "date_used", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({
|
|
47
|
+
length: 10,
|
|
48
|
+
type: "varchar",
|
|
49
|
+
comment: "El valor del descuento aplicado.",
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], CodeRedemptionHistoryCompany.prototype, "discount_applied", void 0);
|
|
53
|
+
exports.CodeRedemptionHistoryCompany = CodeRedemptionHistoryCompany = __decorate([
|
|
54
|
+
(0, typeorm_1.Entity)("code_redemption_history_company", {
|
|
55
|
+
comment: "Historial de códigos redimidos por la empresa, si en algún momento cuando una empresa se registre en la plataforma, entonces se le puede dar un descuento o un plan personalizado.",
|
|
56
|
+
})
|
|
57
|
+
], CodeRedemptionHistoryCompany);
|
|
@@ -10,61 +10,58 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CodeRedemptionHistoryUser = 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
|
-
], CodeRedemptionHistoryUser.prototype, "id", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, typeorm_1.ManyToOne)(function () { return DiscountCodeUser_1.DiscountCodeUser; }, function (discountCodeUser) { return discountCodeUser.code_redemptions_history_users; }, { onDelete: "CASCADE", onUpdate: "NO ACTION" }),
|
|
30
|
-
(0, typeorm_1.JoinColumn)({ name: "discount_code_user" }),
|
|
31
|
-
__metadata("design:type", DiscountCodeUser_1.DiscountCodeUser)
|
|
32
|
-
], CodeRedemptionHistoryUser.prototype, "discount_code_user", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.ManyToOne)(function () { return User_1.User; }, function (user) { return user.code_redemption_history_users; }, {
|
|
35
|
-
onDelete: "CASCADE",
|
|
36
|
-
onUpdate: "NO ACTION",
|
|
37
|
-
nullable: true,
|
|
38
|
-
}),
|
|
39
|
-
(0, typeorm_1.JoinColumn)({ name: "user" }),
|
|
40
|
-
__metadata("design:type", Object)
|
|
41
|
-
], CodeRedemptionHistoryUser.prototype, "user", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({
|
|
44
|
-
type: "datetime",
|
|
45
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
46
|
-
comment: "Fecha cuando se usó el descuento.",
|
|
47
|
-
}),
|
|
48
|
-
__metadata("design:type", Date)
|
|
49
|
-
], CodeRedemptionHistoryUser.prototype, "date_used", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({
|
|
52
|
-
type: "decimal",
|
|
53
|
-
precision: 10,
|
|
54
|
-
scale: 2,
|
|
55
|
-
comment: "El valor del descuento aplicado.",
|
|
56
|
-
}),
|
|
57
|
-
__metadata("design:type", Number)
|
|
58
|
-
], CodeRedemptionHistoryUser.prototype, "discount_applied", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, typeorm_1.OneToMany)(function () { return RequestLocal_1.RequestLocal; }, function (requestLocal) { return requestLocal.discount_redemption; }),
|
|
61
|
-
__metadata("design:type", Array)
|
|
62
|
-
], CodeRedemptionHistoryUser.prototype, "discount_redemption_request_locals", void 0);
|
|
63
|
-
CodeRedemptionHistoryUser = __decorate([
|
|
64
|
-
(0, typeorm_1.Entity)("code_redemption_history_user", {
|
|
65
|
-
comment: "Historial de los códigos redimidos por los usuarios, es decir, si un local desea agregar un código de descuento para qué los usuarios puedan tener un descuento, entonces acá van a estar los que lo redimieron.",
|
|
66
|
-
})
|
|
67
|
-
], CodeRedemptionHistoryUser);
|
|
68
|
-
return CodeRedemptionHistoryUser;
|
|
69
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const DiscountCodeUser_1 = require("./DiscountCodeUser");
|
|
15
|
+
const User_1 = require("./User");
|
|
16
|
+
const dateTransformer_1 = require("../transformers/dateTransformer");
|
|
17
|
+
const RequestLocal_1 = require("./RequestLocal");
|
|
18
|
+
let CodeRedemptionHistoryUser = class CodeRedemptionHistoryUser {
|
|
19
|
+
};
|
|
70
20
|
exports.CodeRedemptionHistoryUser = CodeRedemptionHistoryUser;
|
|
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
|
+
], CodeRedemptionHistoryUser.prototype, "id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(() => DiscountCodeUser_1.DiscountCodeUser, (discountCodeUser) => discountCodeUser.code_redemptions_history_users, { onDelete: "CASCADE", onUpdate: "NO ACTION" }),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: "discount_code_user" }),
|
|
31
|
+
__metadata("design:type", DiscountCodeUser_1.DiscountCodeUser)
|
|
32
|
+
], CodeRedemptionHistoryUser.prototype, "discount_code_user", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.ManyToOne)(() => User_1.User, (user) => user.code_redemption_history_users, {
|
|
35
|
+
onDelete: "CASCADE",
|
|
36
|
+
onUpdate: "NO ACTION",
|
|
37
|
+
nullable: true,
|
|
38
|
+
}),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: "user" }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], CodeRedemptionHistoryUser.prototype, "user", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({
|
|
44
|
+
type: "datetime",
|
|
45
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
46
|
+
comment: "Fecha cuando se usó el descuento.",
|
|
47
|
+
}),
|
|
48
|
+
__metadata("design:type", Date)
|
|
49
|
+
], CodeRedemptionHistoryUser.prototype, "date_used", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({
|
|
52
|
+
type: "decimal",
|
|
53
|
+
precision: 10,
|
|
54
|
+
scale: 2,
|
|
55
|
+
comment: "El valor del descuento aplicado.",
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], CodeRedemptionHistoryUser.prototype, "discount_applied", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.OneToMany)(() => RequestLocal_1.RequestLocal, (requestLocal) => requestLocal.discount_redemption),
|
|
61
|
+
__metadata("design:type", Array)
|
|
62
|
+
], CodeRedemptionHistoryUser.prototype, "discount_redemption_request_locals", void 0);
|
|
63
|
+
exports.CodeRedemptionHistoryUser = CodeRedemptionHistoryUser = __decorate([
|
|
64
|
+
(0, typeorm_1.Entity)("code_redemption_history_user", {
|
|
65
|
+
comment: "Historial de los códigos redimidos por los usuarios, es decir, si un local desea agregar un código de descuento para qué los usuarios puedan tener un descuento, entonces acá van a estar los que lo redimieron.",
|
|
66
|
+
})
|
|
67
|
+
], CodeRedemptionHistoryUser);
|
package/dist/entities/Company.js
CHANGED
|
@@ -10,176 +10,173 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Company = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
30
|
-
type: "int",
|
|
31
|
-
comment: "Número de identificación (ID) único de cada empresa.",
|
|
32
|
-
}),
|
|
33
|
-
__metadata("design:type", Number)
|
|
34
|
-
], Company.prototype, "id", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({
|
|
37
|
-
length: 30,
|
|
38
|
-
type: "varchar",
|
|
39
|
-
unique: true,
|
|
40
|
-
comment: "Código único de la empresa.",
|
|
41
|
-
}),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], Company.prototype, "code", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({ length: 50, type: "varchar", comment: "Nombre de la empresa." }),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], Company.prototype, "name", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typeorm_1.ManyToOne)(function () { return City_1.City; }, function (city) { return city.companies; }, {
|
|
50
|
-
onDelete: "RESTRICT",
|
|
51
|
-
onUpdate: "NO ACTION",
|
|
52
|
-
}),
|
|
53
|
-
(0, typeorm_1.JoinColumn)({ name: "city" }),
|
|
54
|
-
__metadata("design:type", City_1.City)
|
|
55
|
-
], Company.prototype, "city", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, typeorm_1.ManyToOne)(function () { return Partner_1.Partner; }, function (partner) { return partner.companies; }, {
|
|
58
|
-
onDelete: "CASCADE",
|
|
59
|
-
onUpdate: "NO ACTION",
|
|
60
|
-
}),
|
|
61
|
-
(0, typeorm_1.JoinColumn)({ name: "partner" }),
|
|
62
|
-
__metadata("design:type", Partner_1.Partner)
|
|
63
|
-
], Company.prototype, "partner", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, typeorm_1.Column)({
|
|
66
|
-
type: "longtext",
|
|
67
|
-
nullable: true,
|
|
68
|
-
default: null,
|
|
69
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
70
|
-
comment: "Campo de tipo JSON donde se guarda información necesaria para la empresa.",
|
|
71
|
-
}),
|
|
72
|
-
__metadata("design:type", Object)
|
|
73
|
-
], Company.prototype, "profile", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, typeorm_1.Column)({
|
|
76
|
-
type: "text",
|
|
77
|
-
nullable: true,
|
|
78
|
-
default: null,
|
|
79
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
80
|
-
comment: "Campo de tipo JSON donde se guarda información para guardar el teléfono y el correo electrónico, también los nuevos valores qué tengan esos 2 campos.",
|
|
81
|
-
}),
|
|
82
|
-
__metadata("design:type", Object)
|
|
83
|
-
], Company.prototype, "contact_details", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
(0, typeorm_1.Column)({
|
|
86
|
-
type: "longtext",
|
|
87
|
-
nullable: true,
|
|
88
|
-
default: null,
|
|
89
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
90
|
-
comment: "Información de tipo JSON donde se guarda la información legal de la empresa.",
|
|
91
|
-
}),
|
|
92
|
-
__metadata("design:type", Object)
|
|
93
|
-
], Company.prototype, "legal_information", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, typeorm_1.Column)({
|
|
96
|
-
type: "longtext",
|
|
97
|
-
nullable: true,
|
|
98
|
-
default: null,
|
|
99
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
100
|
-
comment: "Información de tipo JSON donde se guarda la información del representante legal del representante.",
|
|
101
|
-
}),
|
|
102
|
-
__metadata("design:type", Object)
|
|
103
|
-
], Company.prototype, "legal_agent", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
(0, typeorm_1.Column)({
|
|
106
|
-
type: "longtext",
|
|
107
|
-
nullable: true,
|
|
108
|
-
default: null,
|
|
109
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
110
|
-
comment: "Configuración de la empresa.",
|
|
111
|
-
}),
|
|
112
|
-
__metadata("design:type", Object)
|
|
113
|
-
], Company.prototype, "settings", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
(0, typeorm_1.Column)({
|
|
116
|
-
type: "datetime",
|
|
117
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
118
|
-
comment: "Fecha creación de la empresa.",
|
|
119
|
-
}),
|
|
120
|
-
__metadata("design:type", Date)
|
|
121
|
-
], Company.prototype, "created", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
(0, typeorm_1.Column)({
|
|
124
|
-
type: "date",
|
|
125
|
-
nullable: true,
|
|
126
|
-
default: null,
|
|
127
|
-
comment: "Cuándo expira el plan de la empresa.",
|
|
128
|
-
}),
|
|
129
|
-
__metadata("design:type", Object)
|
|
130
|
-
], Company.prototype, "expiration", void 0);
|
|
131
|
-
__decorate([
|
|
132
|
-
(0, typeorm_1.Column)({
|
|
133
|
-
type: "datetime",
|
|
134
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
135
|
-
comment: "Fecha de actualización de la empresa.",
|
|
136
|
-
}),
|
|
137
|
-
__metadata("design:type", Date)
|
|
138
|
-
], Company.prototype, "updated", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
(0, typeorm_1.Column)({
|
|
141
|
-
default: 1,
|
|
142
|
-
comment: "Estado de la empresa, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
143
|
-
}),
|
|
144
|
-
__metadata("design:type", Number)
|
|
145
|
-
], Company.prototype, "status", void 0);
|
|
146
|
-
__decorate([
|
|
147
|
-
(0, typeorm_1.OneToMany)(function () { return Local_1.Local; }, function (local) { return local.company; }),
|
|
148
|
-
__metadata("design:type", Array)
|
|
149
|
-
], Company.prototype, "locals", void 0);
|
|
150
|
-
__decorate([
|
|
151
|
-
(0, typeorm_1.OneToMany)(function () { return CodeRedemptionHistoryCompany_1.CodeRedemptionHistoryCompany; }, function (codeRedemptionHistoryCompany) { return codeRedemptionHistoryCompany.company; }),
|
|
152
|
-
__metadata("design:type", Array)
|
|
153
|
-
], Company.prototype, "code_redemption_history_company", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
(0, typeorm_1.OneToMany)(function () { return DiscountCodeUser_1.DiscountCodeUser; }, function (discountCodeUser) { return discountCodeUser.company; }),
|
|
156
|
-
__metadata("design:type", Array)
|
|
157
|
-
], Company.prototype, "discount_code_users", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
(0, typeorm_1.OneToMany)(function () { return ProductTopping_1.ProductTopping; }, function (productTopping) { return productTopping.company; }),
|
|
160
|
-
__metadata("design:type", Array)
|
|
161
|
-
], Company.prototype, "product_toppings", void 0);
|
|
162
|
-
__decorate([
|
|
163
|
-
(0, typeorm_1.OneToMany)(function () { return Partner_1.Partner; }, function (partner) { return partner.company; }),
|
|
164
|
-
__metadata("design:type", Array)
|
|
165
|
-
], Company.prototype, "partners_company", void 0);
|
|
166
|
-
__decorate([
|
|
167
|
-
(0, typeorm_1.OneToMany)(function () { return PartnerRole_1.PartnerRole; }, function (partnerRole) { return partnerRole.company; }),
|
|
168
|
-
__metadata("design:type", Array)
|
|
169
|
-
], Company.prototype, "roles_company", void 0);
|
|
170
|
-
__decorate([
|
|
171
|
-
(0, typeorm_1.OneToMany)(function () { return Plan_1.Plan; }, function (plan) { return plan.company; }),
|
|
172
|
-
__metadata("design:type", Array)
|
|
173
|
-
], Company.prototype, "plans_company", void 0);
|
|
174
|
-
__decorate([
|
|
175
|
-
(0, typeorm_1.OneToMany)(function () { return __1.ReceiptConfig; }, function (receiptConfig) { return receiptConfig.company; }),
|
|
176
|
-
__metadata("design:type", Array)
|
|
177
|
-
], Company.prototype, "receipts_company_config", void 0);
|
|
178
|
-
Company = __decorate([
|
|
179
|
-
(0, typeorm_1.Entity)({
|
|
180
|
-
comment: "Tabla creada para las empresas de comida rápida que deseen registrarse en la plataforma.",
|
|
181
|
-
})
|
|
182
|
-
], Company);
|
|
183
|
-
return Company;
|
|
184
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const dateTransformer_1 = require("../transformers/dateTransformer");
|
|
15
|
+
const jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
16
|
+
const City_1 = require("./City");
|
|
17
|
+
const CodeRedemptionHistoryCompany_1 = require("./CodeRedemptionHistoryCompany");
|
|
18
|
+
const DiscountCodeUser_1 = require("./DiscountCodeUser");
|
|
19
|
+
const Local_1 = require("./Local");
|
|
20
|
+
const Partner_1 = require("./Partner");
|
|
21
|
+
const PartnerRole_1 = require("./PartnerRole");
|
|
22
|
+
const Plan_1 = require("./Plan");
|
|
23
|
+
const ProductTopping_1 = require("./ProductTopping");
|
|
24
|
+
const __1 = require("..");
|
|
25
|
+
let Company = class Company {
|
|
26
|
+
};
|
|
185
27
|
exports.Company = Company;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
30
|
+
type: "int",
|
|
31
|
+
comment: "Número de identificación (ID) único de cada empresa.",
|
|
32
|
+
}),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], Company.prototype, "id", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({
|
|
37
|
+
length: 30,
|
|
38
|
+
type: "varchar",
|
|
39
|
+
unique: true,
|
|
40
|
+
comment: "Código único de la empresa.",
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Company.prototype, "code", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ length: 50, type: "varchar", comment: "Nombre de la empresa." }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], Company.prototype, "name", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.ManyToOne)(() => City_1.City, (city) => city.companies, {
|
|
50
|
+
onDelete: "RESTRICT",
|
|
51
|
+
onUpdate: "NO ACTION",
|
|
52
|
+
}),
|
|
53
|
+
(0, typeorm_1.JoinColumn)({ name: "city" }),
|
|
54
|
+
__metadata("design:type", City_1.City)
|
|
55
|
+
], Company.prototype, "city", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.ManyToOne)(() => Partner_1.Partner, (partner) => partner.companies, {
|
|
58
|
+
onDelete: "CASCADE",
|
|
59
|
+
onUpdate: "NO ACTION",
|
|
60
|
+
}),
|
|
61
|
+
(0, typeorm_1.JoinColumn)({ name: "partner" }),
|
|
62
|
+
__metadata("design:type", Partner_1.Partner)
|
|
63
|
+
], Company.prototype, "partner", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({
|
|
66
|
+
type: "longtext",
|
|
67
|
+
nullable: true,
|
|
68
|
+
default: null,
|
|
69
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
70
|
+
comment: "Campo de tipo JSON donde se guarda información necesaria para la empresa.",
|
|
71
|
+
}),
|
|
72
|
+
__metadata("design:type", Object)
|
|
73
|
+
], Company.prototype, "profile", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({
|
|
76
|
+
type: "text",
|
|
77
|
+
nullable: true,
|
|
78
|
+
default: null,
|
|
79
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
80
|
+
comment: "Campo de tipo JSON donde se guarda información para guardar el teléfono y el correo electrónico, también los nuevos valores qué tengan esos 2 campos.",
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], Company.prototype, "contact_details", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({
|
|
86
|
+
type: "longtext",
|
|
87
|
+
nullable: true,
|
|
88
|
+
default: null,
|
|
89
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
90
|
+
comment: "Información de tipo JSON donde se guarda la información legal de la empresa.",
|
|
91
|
+
}),
|
|
92
|
+
__metadata("design:type", Object)
|
|
93
|
+
], Company.prototype, "legal_information", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, typeorm_1.Column)({
|
|
96
|
+
type: "longtext",
|
|
97
|
+
nullable: true,
|
|
98
|
+
default: null,
|
|
99
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
100
|
+
comment: "Información de tipo JSON donde se guarda la información del representante legal del representante.",
|
|
101
|
+
}),
|
|
102
|
+
__metadata("design:type", Object)
|
|
103
|
+
], Company.prototype, "legal_agent", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, typeorm_1.Column)({
|
|
106
|
+
type: "longtext",
|
|
107
|
+
nullable: true,
|
|
108
|
+
default: null,
|
|
109
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
110
|
+
comment: "Configuración de la empresa.",
|
|
111
|
+
}),
|
|
112
|
+
__metadata("design:type", Object)
|
|
113
|
+
], Company.prototype, "settings", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, typeorm_1.Column)({
|
|
116
|
+
type: "datetime",
|
|
117
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
118
|
+
comment: "Fecha creación de la empresa.",
|
|
119
|
+
}),
|
|
120
|
+
__metadata("design:type", Date)
|
|
121
|
+
], Company.prototype, "created", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, typeorm_1.Column)({
|
|
124
|
+
type: "date",
|
|
125
|
+
nullable: true,
|
|
126
|
+
default: null,
|
|
127
|
+
comment: "Cuándo expira el plan de la empresa.",
|
|
128
|
+
}),
|
|
129
|
+
__metadata("design:type", Object)
|
|
130
|
+
], Company.prototype, "expiration", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, typeorm_1.Column)({
|
|
133
|
+
type: "datetime",
|
|
134
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
135
|
+
comment: "Fecha de actualización de la empresa.",
|
|
136
|
+
}),
|
|
137
|
+
__metadata("design:type", Date)
|
|
138
|
+
], Company.prototype, "updated", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, typeorm_1.Column)({
|
|
141
|
+
default: 1,
|
|
142
|
+
comment: "Estado de la empresa, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
143
|
+
}),
|
|
144
|
+
__metadata("design:type", Number)
|
|
145
|
+
], Company.prototype, "status", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, typeorm_1.OneToMany)(() => Local_1.Local, (local) => local.company),
|
|
148
|
+
__metadata("design:type", Array)
|
|
149
|
+
], Company.prototype, "locals", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, typeorm_1.OneToMany)(() => CodeRedemptionHistoryCompany_1.CodeRedemptionHistoryCompany, (codeRedemptionHistoryCompany) => codeRedemptionHistoryCompany.company),
|
|
152
|
+
__metadata("design:type", Array)
|
|
153
|
+
], Company.prototype, "code_redemption_history_company", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
(0, typeorm_1.OneToMany)(() => DiscountCodeUser_1.DiscountCodeUser, (discountCodeUser) => discountCodeUser.company),
|
|
156
|
+
__metadata("design:type", Array)
|
|
157
|
+
], Company.prototype, "discount_code_users", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
(0, typeorm_1.OneToMany)(() => ProductTopping_1.ProductTopping, (productTopping) => productTopping.company),
|
|
160
|
+
__metadata("design:type", Array)
|
|
161
|
+
], Company.prototype, "product_toppings", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
(0, typeorm_1.OneToMany)(() => Partner_1.Partner, (partner) => partner.company),
|
|
164
|
+
__metadata("design:type", Array)
|
|
165
|
+
], Company.prototype, "partners_company", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, typeorm_1.OneToMany)(() => PartnerRole_1.PartnerRole, (partnerRole) => partnerRole.company),
|
|
168
|
+
__metadata("design:type", Array)
|
|
169
|
+
], Company.prototype, "roles_company", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
(0, typeorm_1.OneToMany)(() => Plan_1.Plan, (plan) => plan.company),
|
|
172
|
+
__metadata("design:type", Array)
|
|
173
|
+
], Company.prototype, "plans_company", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, typeorm_1.OneToMany)(() => __1.ReceiptConfig, (receiptConfig) => receiptConfig.company),
|
|
176
|
+
__metadata("design:type", Array)
|
|
177
|
+
], Company.prototype, "receipts_company_config", void 0);
|
|
178
|
+
exports.Company = Company = __decorate([
|
|
179
|
+
(0, typeorm_1.Entity)({
|
|
180
|
+
comment: "Tabla creada para las empresas de comida rápida que deseen registrarse en la plataforma.",
|
|
181
|
+
})
|
|
182
|
+
], Company);
|
|
@@ -10,30 +10,29 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Configuration = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, typeorm_1.PrimaryColumn)({
|
|
19
|
-
length: 20,
|
|
20
|
-
type: "varchar",
|
|
21
|
-
comment: "Nombre del perfil que se está usando en la aplicación.",
|
|
22
|
-
}),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], Configuration.prototype, "profile", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({
|
|
27
|
-
type: "longtext",
|
|
28
|
-
comment: "Columna de tipo JSON para agregar la información y configuración respecto a la plataforma.",
|
|
29
|
-
}),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], Configuration.prototype, "settings", void 0);
|
|
32
|
-
Configuration = __decorate([
|
|
33
|
-
(0, typeorm_1.Entity)({
|
|
34
|
-
comment: "Esta tabla tiene como fin agregar toda la información de la empresa, logos, urls de documentación, nombres, urls de las páginas... \n\n Esto se se guarda como un string de tipo JSON para que sea fácil almacenarlo y generar nuevos campos si es necesario.",
|
|
35
|
-
})
|
|
36
|
-
], Configuration);
|
|
37
|
-
return Configuration;
|
|
38
|
-
}());
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const jsonEncryptionTransformer_1 = require("../transformers/jsonEncryptionTransformer");
|
|
15
|
+
let Configuration = class Configuration {
|
|
16
|
+
};
|
|
39
17
|
exports.Configuration = Configuration;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryColumn)({
|
|
20
|
+
length: 20,
|
|
21
|
+
type: "varchar",
|
|
22
|
+
comment: "Nombre del perfil que se está usando en la aplicación.",
|
|
23
|
+
}),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], Configuration.prototype, "profile", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({
|
|
28
|
+
type: "longtext",
|
|
29
|
+
transformer: jsonEncryptionTransformer_1.JsonEncryptionTransformer,
|
|
30
|
+
comment: "Columna de tipo JSON para agregar la información y configuración respecto a la plataforma.",
|
|
31
|
+
}),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], Configuration.prototype, "settings", void 0);
|
|
34
|
+
exports.Configuration = Configuration = __decorate([
|
|
35
|
+
(0, typeorm_1.Entity)({
|
|
36
|
+
comment: "Esta tabla tiene como fin agregar toda la información de la empresa, logos, urls de documentación, nombres, urls de las páginas... \n\n Esto se se guarda como un string de tipo JSON para que sea fácil almacenarlo y generar nuevos campos si es necesario.",
|
|
37
|
+
})
|
|
38
|
+
], Configuration);
|