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.
Files changed (105) hide show
  1. package/dist/CustomRepository.js +21 -109
  2. package/dist/entities/AuthenticationCredential.js +54 -57
  3. package/dist/entities/Bank.js +50 -53
  4. package/dist/entities/BusinessType.js +47 -50
  5. package/dist/entities/BusinessTypeProduct.js +68 -71
  6. package/dist/entities/Category.js +148 -151
  7. package/dist/entities/CategoryDate.js +39 -42
  8. package/dist/entities/CategorySchedule.js +41 -44
  9. package/dist/entities/City.js +70 -73
  10. package/dist/entities/CodeRedemptionHistoryCompany.js +44 -47
  11. package/dist/entities/CodeRedemptionHistoryUser.js +54 -57
  12. package/dist/entities/Company.js +169 -172
  13. package/dist/entities/Configuration.d.ts +1 -1
  14. package/dist/entities/Configuration.js +25 -26
  15. package/dist/entities/Country.js +91 -94
  16. package/dist/entities/Day.js +38 -41
  17. package/dist/entities/DecorationReserve.js +46 -49
  18. package/dist/entities/DiscountCodeCompany.js +124 -129
  19. package/dist/entities/DiscountCodeUser.js +139 -142
  20. package/dist/entities/Gallery.js +88 -91
  21. package/dist/entities/Local.js +239 -242
  22. package/dist/entities/LocalDecorationReserve.js +64 -67
  23. package/dist/entities/LocalPaymentMethod.js +41 -44
  24. package/dist/entities/LocalPlan.js +88 -91
  25. package/dist/entities/LocalQualification.js +51 -54
  26. package/dist/entities/LocalReserve.js +177 -180
  27. package/dist/entities/LocalReserveStatus.js +85 -88
  28. package/dist/entities/LocalTable.js +163 -166
  29. package/dist/entities/LocalTableReserve.js +22 -25
  30. package/dist/entities/LocalTableReservePayment.js +156 -159
  31. package/dist/entities/LocalTableZone.js +84 -87
  32. package/dist/entities/Master.js +182 -185
  33. package/dist/entities/MasterNotification.js +96 -99
  34. package/dist/entities/MasterPermission.js +65 -68
  35. package/dist/entities/MasterRole.js +83 -86
  36. package/dist/entities/Partner.js +306 -309
  37. package/dist/entities/PartnerNotification.js +97 -100
  38. package/dist/entities/PartnerPlatform.js +66 -69
  39. package/dist/entities/PartnerPlatformSection.js +74 -79
  40. package/dist/entities/PartnerPlatformSectionPermission.js +113 -118
  41. package/dist/entities/PartnerPlatformSectionPermissionAssociate.js +26 -29
  42. package/dist/entities/PartnerRole.js +93 -96
  43. package/dist/entities/PartnerSession.js +94 -97
  44. package/dist/entities/PaymentMethod.js +91 -94
  45. package/dist/entities/Plan.js +86 -89
  46. package/dist/entities/PosSystem.js +69 -74
  47. package/dist/entities/Product.js +219 -222
  48. package/dist/entities/ProductDate.js +39 -42
  49. package/dist/entities/ProductGroup.js +76 -79
  50. package/dist/entities/ProductImage.js +33 -36
  51. package/dist/entities/ProductIngredient.js +54 -57
  52. package/dist/entities/ProductSchedule.js +41 -44
  53. package/dist/entities/ProductTopping.js +47 -50
  54. package/dist/entities/ReceiptConfig.js +184 -187
  55. package/dist/entities/Region.js +46 -49
  56. package/dist/entities/Request.js +152 -155
  57. package/dist/entities/RequestInvoice.js +125 -128
  58. package/dist/entities/RequestInvoiceCategory.js +34 -37
  59. package/dist/entities/RequestLocal.js +164 -169
  60. package/dist/entities/RequestLocalHistory.js +61 -64
  61. package/dist/entities/RequestLocalPayment.js +154 -157
  62. package/dist/entities/RequestLocalTable.js +34 -37
  63. package/dist/entities/RequestPrint.js +60 -63
  64. package/dist/entities/RequestProduct.js +58 -61
  65. package/dist/entities/RequestProductGroupComplement.js +51 -56
  66. package/dist/entities/ServiceDiscountsPlan.js +30 -33
  67. package/dist/entities/ServicePlan.js +84 -87
  68. package/dist/entities/Square.js +130 -133
  69. package/dist/entities/ToppingImage.js +56 -59
  70. package/dist/entities/TypeMeasureIngredient.js +45 -48
  71. package/dist/entities/User.js +234 -237
  72. package/dist/entities/UserAddress.js +114 -117
  73. package/dist/entities/UserPaymentMethod.js +118 -121
  74. package/dist/entities/VerificationCode.js +60 -63
  75. package/dist/entities/VerifyLocal.js +142 -145
  76. package/dist/entities/productGroupComplement.js +117 -120
  77. package/dist/filters/DiscountsCodeCompanyInformation.js +153 -202
  78. package/dist/filters/DiscountsCodeUserInformation.js +173 -220
  79. package/dist/filters/LocalReservesInformation.js +35 -81
  80. package/dist/filters/LocalsCompanyInformation.js +169 -218
  81. package/dist/filters/LocalsCompanyInformationForTheTable.js +157 -203
  82. package/dist/filters/VerifyLocalsInformation.js +131 -179
  83. package/dist/index.js +55 -130
  84. package/dist/transformers/dateTransformer.js +10 -13
  85. package/dist/transformers/jsonEncryptionTransformer.d.ts +2 -0
  86. package/dist/transformers/jsonEncryptionTransformer.js +57 -0
  87. package/dist/transformers/jsonTransformer.js +2 -2
  88. package/dist/utils.js +3 -3
  89. package/dist/views/DiscountsCodeUser.js +120 -123
  90. package/dist/views/LocalReserves.js +280 -283
  91. package/dist/views/LocalTableZonesFilter.js +76 -79
  92. package/dist/views/LocalsCompany.js +172 -175
  93. package/dist/views/LocalsCompanyInformationForTheMap.js +276 -279
  94. package/dist/views/LocalsCompanyInformationForTheTable.d.ts +1 -0
  95. package/dist/views/LocalsCompanyInformationForTheTable.js +384 -383
  96. package/dist/views/MasterNotifications.js +132 -135
  97. package/dist/views/PartnerNotifications.js +104 -107
  98. package/dist/views/Partners.js +140 -143
  99. package/dist/views/VerifyLocals.js +152 -155
  100. package/dist/views/ViewLocalsCompanies.js +100 -103
  101. package/package.json +2 -1
  102. package/src/entities/Configuration.ts +3 -1
  103. package/src/transformers/jsonEncryptionTransformer.ts +75 -0
  104. package/src/views/LocalsCompanyInformationForTheTable.ts +3 -0
  105. package/tsconfig.json +7 -3
@@ -10,60 +10,55 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RequestProductGroupComplement = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var productGroupComplement_1 = require("./productGroupComplement");
15
- var RequestLocal_1 = require("./RequestLocal");
16
- var User_1 = require("./User");
17
- var RequestProductGroupComplement = /** @class */ (function () {
18
- function RequestProductGroupComplement() {
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
- ], RequestProductGroupComplement.prototype, "id", void 0);
27
- __decorate([
28
- (0, typeorm_1.ManyToOne)(function () { return RequestLocal_1.RequestLocal; }, function (requestLocal) { return requestLocal.request_product_group_complements; }, {
29
- onDelete: "CASCADE",
30
- onUpdate: "NO ACTION",
31
- }),
32
- (0, typeorm_1.JoinColumn)({ name: "request" }),
33
- __metadata("design:type", RequestLocal_1.RequestLocal)
34
- ], RequestProductGroupComplement.prototype, "request", void 0);
35
- __decorate([
36
- (0, typeorm_1.ManyToOne)(function () { return productGroupComplement_1.ProductGroupComplement; }, function (productGroupComplement) {
37
- return productGroupComplement.request_product_group_complements;
38
- }, {
39
- onDelete: "CASCADE",
40
- onUpdate: "NO ACTION",
41
- }),
42
- (0, typeorm_1.JoinColumn)({ name: "product_group_complement" }),
43
- __metadata("design:type", productGroupComplement_1.ProductGroupComplement)
44
- ], RequestProductGroupComplement.prototype, "product_group_complement", void 0);
45
- __decorate([
46
- (0, typeorm_1.ManyToOne)(function () { return User_1.User; }, function (user) { return user.request_product_group_complements; }, {
47
- onDelete: "CASCADE",
48
- onUpdate: "NO ACTION",
49
- nullable: true,
50
- }),
51
- (0, typeorm_1.JoinColumn)({ name: "user" }),
52
- __metadata("design:type", Object)
53
- ], RequestProductGroupComplement.prototype, "user", void 0);
54
- __decorate([
55
- (0, typeorm_1.Column)({ type: "int", comment: "Cantidad de cada complemento." }),
56
- __metadata("design:type", Number)
57
- ], RequestProductGroupComplement.prototype, "quantity", void 0);
58
- RequestProductGroupComplement = __decorate([
59
- (0, typeorm_1.Entity)("request_product_group_complement", {
60
- comment: "Complementos (toppings) que el usuario va a poder agregar por cada producto.",
61
- }),
62
- (0, typeorm_1.Unique)("unique_request_product_group_complement", [
63
- "request",
64
- "product_group_complement",
65
- ])
66
- ], RequestProductGroupComplement);
67
- return RequestProductGroupComplement;
68
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const productGroupComplement_1 = require("./productGroupComplement");
15
+ const RequestLocal_1 = require("./RequestLocal");
16
+ const User_1 = require("./User");
17
+ let RequestProductGroupComplement = class RequestProductGroupComplement {
18
+ };
69
19
  exports.RequestProductGroupComplement = RequestProductGroupComplement;
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
+ ], RequestProductGroupComplement.prototype, "id", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.ManyToOne)(() => RequestLocal_1.RequestLocal, (requestLocal) => requestLocal.request_product_group_complements, {
29
+ onDelete: "CASCADE",
30
+ onUpdate: "NO ACTION",
31
+ }),
32
+ (0, typeorm_1.JoinColumn)({ name: "request" }),
33
+ __metadata("design:type", RequestLocal_1.RequestLocal)
34
+ ], RequestProductGroupComplement.prototype, "request", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.ManyToOne)(() => productGroupComplement_1.ProductGroupComplement, (productGroupComplement) => productGroupComplement.request_product_group_complements, {
37
+ onDelete: "CASCADE",
38
+ onUpdate: "NO ACTION",
39
+ }),
40
+ (0, typeorm_1.JoinColumn)({ name: "product_group_complement" }),
41
+ __metadata("design:type", productGroupComplement_1.ProductGroupComplement)
42
+ ], RequestProductGroupComplement.prototype, "product_group_complement", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.ManyToOne)(() => User_1.User, (user) => user.request_product_group_complements, {
45
+ onDelete: "CASCADE",
46
+ onUpdate: "NO ACTION",
47
+ nullable: true,
48
+ }),
49
+ (0, typeorm_1.JoinColumn)({ name: "user" }),
50
+ __metadata("design:type", Object)
51
+ ], RequestProductGroupComplement.prototype, "user", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: "int", comment: "Cantidad de cada complemento." }),
54
+ __metadata("design:type", Number)
55
+ ], RequestProductGroupComplement.prototype, "quantity", void 0);
56
+ exports.RequestProductGroupComplement = RequestProductGroupComplement = __decorate([
57
+ (0, typeorm_1.Entity)("request_product_group_complement", {
58
+ comment: "Complementos (toppings) que el usuario va a poder agregar por cada producto.",
59
+ }),
60
+ (0, typeorm_1.Unique)("unique_request_product_group_complement", [
61
+ "request",
62
+ "product_group_complement",
63
+ ])
64
+ ], RequestProductGroupComplement);
@@ -10,37 +10,34 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ServiceDiscountsPlan = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var ServicePlan_1 = require("./ServicePlan");
15
- var DiscountCodeCompany_1 = require("./DiscountCodeCompany");
16
- var ServiceDiscountsPlan = /** @class */ (function () {
17
- function ServiceDiscountsPlan() {
18
- }
19
- __decorate([
20
- (0, typeorm_1.PrimaryGeneratedColumn)(),
21
- __metadata("design:type", Number)
22
- ], ServiceDiscountsPlan.prototype, "id", void 0);
23
- __decorate([
24
- (0, typeorm_1.ManyToOne)(function () { return ServicePlan_1.ServicePlan; }, function (servicePlan) { return servicePlan.service_discounts_plan; }, {
25
- onDelete: 'CASCADE',
26
- onUpdate: 'CASCADE',
27
- }),
28
- (0, typeorm_1.JoinColumn)({ name: 'id_service_plan' }),
29
- __metadata("design:type", Object)
30
- ], ServiceDiscountsPlan.prototype, "servicePlan", void 0);
31
- __decorate([
32
- (0, typeorm_1.ManyToOne)(function () { return DiscountCodeCompany_1.DiscountCodeCompany; }, function (discountCodeCompany) { return discountCodeCompany.discount; }, {
33
- onDelete: 'CASCADE',
34
- onUpdate: 'CASCADE',
35
- }),
36
- (0, typeorm_1.JoinColumn)({ name: 'id_discount' }),
37
- __metadata("design:type", Object)
38
- ], ServiceDiscountsPlan.prototype, "discount", void 0);
39
- ServiceDiscountsPlan = __decorate([
40
- (0, typeorm_1.Entity)('service_discounts_plan', {
41
- comment: 'Entidad que enlaza un plan de servicio con un código de descuento de una empresa',
42
- })
43
- ], ServiceDiscountsPlan);
44
- return ServiceDiscountsPlan;
45
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const ServicePlan_1 = require("./ServicePlan");
15
+ const DiscountCodeCompany_1 = require("./DiscountCodeCompany");
16
+ let ServiceDiscountsPlan = class ServiceDiscountsPlan {
17
+ };
46
18
  exports.ServiceDiscountsPlan = ServiceDiscountsPlan;
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
21
+ __metadata("design:type", Number)
22
+ ], ServiceDiscountsPlan.prototype, "id", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.ManyToOne)(() => ServicePlan_1.ServicePlan, (servicePlan) => servicePlan.service_discounts_plan, {
25
+ onDelete: 'CASCADE',
26
+ onUpdate: 'CASCADE',
27
+ }),
28
+ (0, typeorm_1.JoinColumn)({ name: 'id_service_plan' }),
29
+ __metadata("design:type", Object)
30
+ ], ServiceDiscountsPlan.prototype, "servicePlan", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.ManyToOne)(() => DiscountCodeCompany_1.DiscountCodeCompany, (discountCodeCompany) => discountCodeCompany.discount, {
33
+ onDelete: 'CASCADE',
34
+ onUpdate: 'CASCADE',
35
+ }),
36
+ (0, typeorm_1.JoinColumn)({ name: 'id_discount' }),
37
+ __metadata("design:type", Object)
38
+ ], ServiceDiscountsPlan.prototype, "discount", void 0);
39
+ exports.ServiceDiscountsPlan = ServiceDiscountsPlan = __decorate([
40
+ (0, typeorm_1.Entity)('service_discounts_plan', {
41
+ comment: 'Entidad que enlaza un plan de servicio con un código de descuento de una empresa',
42
+ })
43
+ ], ServiceDiscountsPlan);
@@ -10,91 +10,88 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ServicePlan = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var dateTransformer_1 = require("../transformers/dateTransformer");
15
- var jsonTransformer_1 = require("../transformers/jsonTransformer");
16
- var Master_1 = require("./Master");
17
- var ServiceDiscountsPlan_1 = require("./ServiceDiscountsPlan");
18
- var ServicePlan = /** @class */ (function () {
19
- function ServicePlan() {
20
- }
21
- __decorate([
22
- (0, typeorm_1.PrimaryGeneratedColumn)({ name: "id_service_plan" }),
23
- __metadata("design:type", Number)
24
- ], ServicePlan.prototype, "id_service_plan", void 0);
25
- __decorate([
26
- (0, typeorm_1.Column)({ type: "varchar", length: 100 }),
27
- __metadata("design:type", String)
28
- ], ServicePlan.prototype, "name", void 0);
29
- __decorate([
30
- (0, typeorm_1.Column)({ type: "varchar", length: 100 }),
31
- __metadata("design:type", String)
32
- ], ServicePlan.prototype, "code", void 0);
33
- __decorate([
34
- (0, typeorm_1.Column)({ type: "varchar", length: 450, nullable: true }),
35
- __metadata("design:type", Object)
36
- ], ServicePlan.prototype, "description", void 0);
37
- __decorate([
38
- (0, typeorm_1.Column)({ type: "float", nullable: true }),
39
- __metadata("design:type", Object)
40
- ], ServicePlan.prototype, "price", void 0);
41
- __decorate([
42
- (0, typeorm_1.Column)({ type: "varchar", length: 10, nullable: true }),
43
- __metadata("design:type", Object)
44
- ], ServicePlan.prototype, "currency", void 0);
45
- __decorate([
46
- (0, typeorm_1.Column)({ type: "int", default: 1 }),
47
- __metadata("design:type", Number)
48
- ], ServicePlan.prototype, "status", void 0);
49
- __decorate([
50
- (0, typeorm_1.Column)({ type: "int" }),
51
- __metadata("design:type", Number)
52
- ], ServicePlan.prototype, "type", void 0);
53
- __decorate([
54
- (0, typeorm_1.Column)({ type: "text", nullable: true }),
55
- __metadata("design:type", Object)
56
- ], ServicePlan.prototype, "time_periods", void 0);
57
- __decorate([
58
- (0, typeorm_1.Column)({ type: "float", nullable: true }),
59
- __metadata("design:type", Object)
60
- ], ServicePlan.prototype, "assigned_discount", void 0);
61
- __decorate([
62
- (0, typeorm_1.Column)({ type: "longtext", nullable: true, transformer: jsonTransformer_1.jsonTransformer }),
63
- __metadata("design:type", Object)
64
- ], ServicePlan.prototype, "information_general", void 0);
65
- __decorate([
66
- (0, typeorm_1.Column)({
67
- type: "datetime",
68
- transformer: new dateTransformer_1.DateTransformer(),
69
- comment: "Fecha de creación del registro.",
70
- }),
71
- __metadata("design:type", Date)
72
- ], ServicePlan.prototype, "created", void 0);
73
- __decorate([
74
- (0, typeorm_1.Column)({
75
- type: "datetime",
76
- transformer: new dateTransformer_1.DateTransformer(),
77
- comment: "Fecha de actualización del registro.",
78
- }),
79
- __metadata("design:type", Date)
80
- ], ServicePlan.prototype, "updated", void 0);
81
- __decorate([
82
- (0, typeorm_1.ManyToOne)(function () { return Master_1.Master; }, function (master) { return master.id; }, {
83
- onDelete: "SET NULL",
84
- onUpdate: "CASCADE",
85
- nullable: true,
86
- }),
87
- (0, typeorm_1.JoinColumn)({ name: "updated_by" }),
88
- __metadata("design:type", Object)
89
- ], ServicePlan.prototype, "updated_by", void 0);
90
- __decorate([
91
- (0, typeorm_1.OneToMany)(function () { return ServiceDiscountsPlan_1.ServiceDiscountsPlan; }, function (serviceDiscountsPlan) { return serviceDiscountsPlan.servicePlan; }),
92
- __metadata("design:type", Array)
93
- ], ServicePlan.prototype, "service_discounts_plan", void 0);
94
- ServicePlan = __decorate([
95
- (0, typeorm_1.Entity)("service_plan"),
96
- (0, typeorm_1.Unique)(["code"])
97
- ], ServicePlan);
98
- return ServicePlan;
99
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const dateTransformer_1 = require("../transformers/dateTransformer");
15
+ const jsonTransformer_1 = require("../transformers/jsonTransformer");
16
+ const Master_1 = require("./Master");
17
+ const ServiceDiscountsPlan_1 = require("./ServiceDiscountsPlan");
18
+ let ServicePlan = class ServicePlan {
19
+ };
100
20
  exports.ServicePlan = ServicePlan;
21
+ __decorate([
22
+ (0, typeorm_1.PrimaryGeneratedColumn)({ name: "id_service_plan" }),
23
+ __metadata("design:type", Number)
24
+ ], ServicePlan.prototype, "id_service_plan", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: "varchar", length: 100 }),
27
+ __metadata("design:type", String)
28
+ ], ServicePlan.prototype, "name", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: "varchar", length: 100 }),
31
+ __metadata("design:type", String)
32
+ ], ServicePlan.prototype, "code", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: "varchar", length: 450, nullable: true }),
35
+ __metadata("design:type", Object)
36
+ ], ServicePlan.prototype, "description", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: "float", nullable: true }),
39
+ __metadata("design:type", Object)
40
+ ], ServicePlan.prototype, "price", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: "varchar", length: 10, nullable: true }),
43
+ __metadata("design:type", Object)
44
+ ], ServicePlan.prototype, "currency", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: "int", default: 1 }),
47
+ __metadata("design:type", Number)
48
+ ], ServicePlan.prototype, "status", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: "int" }),
51
+ __metadata("design:type", Number)
52
+ ], ServicePlan.prototype, "type", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: "text", nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], ServicePlan.prototype, "time_periods", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: "float", nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], ServicePlan.prototype, "assigned_discount", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: "longtext", nullable: true, transformer: jsonTransformer_1.jsonTransformer }),
63
+ __metadata("design:type", Object)
64
+ ], ServicePlan.prototype, "information_general", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({
67
+ type: "datetime",
68
+ transformer: new dateTransformer_1.DateTransformer(),
69
+ comment: "Fecha de creación del registro.",
70
+ }),
71
+ __metadata("design:type", Date)
72
+ ], ServicePlan.prototype, "created", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({
75
+ type: "datetime",
76
+ transformer: new dateTransformer_1.DateTransformer(),
77
+ comment: "Fecha de actualización del registro.",
78
+ }),
79
+ __metadata("design:type", Date)
80
+ ], ServicePlan.prototype, "updated", void 0);
81
+ __decorate([
82
+ (0, typeorm_1.ManyToOne)(() => Master_1.Master, (master) => master.id, {
83
+ onDelete: "SET NULL",
84
+ onUpdate: "CASCADE",
85
+ nullable: true,
86
+ }),
87
+ (0, typeorm_1.JoinColumn)({ name: "updated_by" }),
88
+ __metadata("design:type", Object)
89
+ ], ServicePlan.prototype, "updated_by", void 0);
90
+ __decorate([
91
+ (0, typeorm_1.OneToMany)(() => ServiceDiscountsPlan_1.ServiceDiscountsPlan, (serviceDiscountsPlan) => serviceDiscountsPlan.servicePlan),
92
+ __metadata("design:type", Array)
93
+ ], ServicePlan.prototype, "service_discounts_plan", void 0);
94
+ exports.ServicePlan = ServicePlan = __decorate([
95
+ (0, typeorm_1.Entity)("service_plan"),
96
+ (0, typeorm_1.Unique)(["code"])
97
+ ], ServicePlan);
@@ -10,137 +10,134 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Square = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var City_1 = require("./City");
15
- var Local_1 = require("./Local");
16
- var User_1 = require("./User");
17
- var jsonTransformer_1 = require("../transformers/jsonTransformer");
18
- var Square = /** @class */ (function () {
19
- function Square() {
20
- }
21
- __decorate([
22
- (0, typeorm_1.PrimaryColumn)({
23
- type: "int",
24
- comment: "Número de identificación (ID) único de cada registro.",
25
- }),
26
- __metadata("design:type", Number)
27
- ], Square.prototype, "id", void 0);
28
- __decorate([
29
- (0, typeorm_1.Column)({
30
- length: 50,
31
- type: "varchar",
32
- comment: "Nombre del centro comercial/plazoleta.",
33
- }),
34
- __metadata("design:type", String)
35
- ], Square.prototype, "name", void 0);
36
- __decorate([
37
- (0, typeorm_1.ManyToOne)(function () { return City_1.City; }, function (city) { return city.squares; }, {
38
- onDelete: "RESTRICT",
39
- onUpdate: "NO ACTION",
40
- }),
41
- (0, typeorm_1.JoinColumn)({ name: "city" }),
42
- __metadata("design:type", City_1.City)
43
- ], Square.prototype, "city", void 0);
44
- __decorate([
45
- (0, typeorm_1.Column)({
46
- length: 100,
47
- type: "varchar",
48
- comment: "Dirección del centro comercial/plazoleta.",
49
- }),
50
- __metadata("design:type", String)
51
- ], Square.prototype, "address", void 0);
52
- __decorate([
53
- (0, typeorm_1.Column)({
54
- type: "decimal",
55
- precision: 10,
56
- scale: 8,
57
- nullable: true,
58
- default: null,
59
- comment: "Latitud de la plazoleta.",
60
- }),
61
- __metadata("design:type", Number)
62
- ], Square.prototype, "latitude", void 0);
63
- __decorate([
64
- (0, typeorm_1.Column)({
65
- type: "decimal",
66
- precision: 10,
67
- scale: 8,
68
- nullable: true,
69
- default: null,
70
- comment: "Longitud de la plazoleta.",
71
- }),
72
- __metadata("design:type", Number)
73
- ], Square.prototype, "longitude", void 0);
74
- __decorate([
75
- (0, typeorm_1.Column)({
76
- type: "mediumtext",
77
- nullable: true,
78
- default: null,
79
- transformer: jsonTransformer_1.jsonTransformer,
80
- comment: "Campo de tipo JSON por si se llega a necesitar agregar otras columnas para las plazoletas de los centros comerciales.",
81
- }),
82
- __metadata("design:type", Object)
83
- ], Square.prototype, "details", void 0);
84
- __decorate([
85
- (0, typeorm_1.Column)({
86
- type: "int",
87
- comment: "Cantidad máxima de locales para ese del centro comercial/plazoleta.",
88
- }),
89
- __metadata("design:type", Number)
90
- ], Square.prototype, "maximum_number_locals", void 0);
91
- __decorate([
92
- (0, typeorm_1.Column)({
93
- type: "varchar",
94
- length: 50,
95
- nullable: true,
96
- default: null,
97
- comment: "Correo electrónico del centro comercial/plazoleta.",
98
- }),
99
- __metadata("design:type", Object)
100
- ], Square.prototype, "email", void 0);
101
- __decorate([
102
- (0, typeorm_1.Column)({
103
- type: "varchar",
104
- length: 15,
105
- nullable: true,
106
- default: null,
107
- comment: "Número de celular del centro comercial/plazoleta.",
108
- }),
109
- __metadata("design:type", Object)
110
- ], Square.prototype, "phone", void 0);
111
- __decorate([
112
- (0, typeorm_1.Column)({
113
- type: "int",
114
- width: 1,
115
- default: 1,
116
- comment: "Si la plazoleta está o no activa:\r\n1. Activa.\r\n0. Inactiva.",
117
- }),
118
- __metadata("design:type", Number)
119
- ], Square.prototype, "status", void 0);
120
- __decorate([
121
- (0, typeorm_1.OneToMany)(function () { return Local_1.Local; }, function (local) { return local.square; }),
122
- __metadata("design:type", Array)
123
- ], Square.prototype, "locals", void 0);
124
- __decorate([
125
- (0, typeorm_1.ManyToMany)(function () { return User_1.User; }, function (user) { return user.user_favorite_squares; }),
126
- (0, typeorm_1.JoinTable)({
127
- name: "user_favorite_square",
128
- joinColumn: {
129
- name: "square",
130
- referencedColumnName: "id",
131
- },
132
- inverseJoinColumn: {
133
- name: "user",
134
- referencedColumnName: "id",
135
- },
136
- }),
137
- __metadata("design:type", Array)
138
- ], Square.prototype, "users_favorite_square", void 0);
139
- Square = __decorate([
140
- (0, typeorm_1.Entity)({
141
- comment: "Centros comerciales registrados/agregados a la plataforma.\r\n\r\nDel centro comercial es importante saber si tiene una plazoleta de comida.",
142
- })
143
- ], Square);
144
- return Square;
145
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const City_1 = require("./City");
15
+ const Local_1 = require("./Local");
16
+ const User_1 = require("./User");
17
+ const jsonTransformer_1 = require("../transformers/jsonTransformer");
18
+ let Square = class Square {
19
+ };
146
20
  exports.Square = Square;
21
+ __decorate([
22
+ (0, typeorm_1.PrimaryColumn)({
23
+ type: "int",
24
+ comment: "Número de identificación (ID) único de cada registro.",
25
+ }),
26
+ __metadata("design:type", Number)
27
+ ], Square.prototype, "id", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({
30
+ length: 50,
31
+ type: "varchar",
32
+ comment: "Nombre del centro comercial/plazoleta.",
33
+ }),
34
+ __metadata("design:type", String)
35
+ ], Square.prototype, "name", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.ManyToOne)(() => City_1.City, (city) => city.squares, {
38
+ onDelete: "RESTRICT",
39
+ onUpdate: "NO ACTION",
40
+ }),
41
+ (0, typeorm_1.JoinColumn)({ name: "city" }),
42
+ __metadata("design:type", City_1.City)
43
+ ], Square.prototype, "city", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({
46
+ length: 100,
47
+ type: "varchar",
48
+ comment: "Dirección del centro comercial/plazoleta.",
49
+ }),
50
+ __metadata("design:type", String)
51
+ ], Square.prototype, "address", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({
54
+ type: "decimal",
55
+ precision: 10,
56
+ scale: 8,
57
+ nullable: true,
58
+ default: null,
59
+ comment: "Latitud de la plazoleta.",
60
+ }),
61
+ __metadata("design:type", Number)
62
+ ], Square.prototype, "latitude", void 0);
63
+ __decorate([
64
+ (0, typeorm_1.Column)({
65
+ type: "decimal",
66
+ precision: 10,
67
+ scale: 8,
68
+ nullable: true,
69
+ default: null,
70
+ comment: "Longitud de la plazoleta.",
71
+ }),
72
+ __metadata("design:type", Number)
73
+ ], Square.prototype, "longitude", void 0);
74
+ __decorate([
75
+ (0, typeorm_1.Column)({
76
+ type: "mediumtext",
77
+ nullable: true,
78
+ default: null,
79
+ transformer: jsonTransformer_1.jsonTransformer,
80
+ comment: "Campo de tipo JSON por si se llega a necesitar agregar otras columnas para las plazoletas de los centros comerciales.",
81
+ }),
82
+ __metadata("design:type", Object)
83
+ ], Square.prototype, "details", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({
86
+ type: "int",
87
+ comment: "Cantidad máxima de locales para ese del centro comercial/plazoleta.",
88
+ }),
89
+ __metadata("design:type", Number)
90
+ ], Square.prototype, "maximum_number_locals", void 0);
91
+ __decorate([
92
+ (0, typeorm_1.Column)({
93
+ type: "varchar",
94
+ length: 50,
95
+ nullable: true,
96
+ default: null,
97
+ comment: "Correo electrónico del centro comercial/plazoleta.",
98
+ }),
99
+ __metadata("design:type", Object)
100
+ ], Square.prototype, "email", void 0);
101
+ __decorate([
102
+ (0, typeorm_1.Column)({
103
+ type: "varchar",
104
+ length: 15,
105
+ nullable: true,
106
+ default: null,
107
+ comment: "Número de celular del centro comercial/plazoleta.",
108
+ }),
109
+ __metadata("design:type", Object)
110
+ ], Square.prototype, "phone", void 0);
111
+ __decorate([
112
+ (0, typeorm_1.Column)({
113
+ type: "int",
114
+ width: 1,
115
+ default: 1,
116
+ comment: "Si la plazoleta está o no activa:\r\n1. Activa.\r\n0. Inactiva.",
117
+ }),
118
+ __metadata("design:type", Number)
119
+ ], Square.prototype, "status", void 0);
120
+ __decorate([
121
+ (0, typeorm_1.OneToMany)(() => Local_1.Local, (local) => local.square),
122
+ __metadata("design:type", Array)
123
+ ], Square.prototype, "locals", void 0);
124
+ __decorate([
125
+ (0, typeorm_1.ManyToMany)(() => User_1.User, (user) => user.user_favorite_squares),
126
+ (0, typeorm_1.JoinTable)({
127
+ name: "user_favorite_square",
128
+ joinColumn: {
129
+ name: "square",
130
+ referencedColumnName: "id",
131
+ },
132
+ inverseJoinColumn: {
133
+ name: "user",
134
+ referencedColumnName: "id",
135
+ },
136
+ }),
137
+ __metadata("design:type", Array)
138
+ ], Square.prototype, "users_favorite_square", void 0);
139
+ exports.Square = Square = __decorate([
140
+ (0, typeorm_1.Entity)({
141
+ comment: "Centros comerciales registrados/agregados a la plataforma.\r\n\r\nDel centro comercial es importante saber si tiene una plazoleta de comida.",
142
+ })
143
+ ], Square);