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
@@ -1,114 +1,26 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
- return new (P || (P = Promise))(function (resolve, reject) {
20
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
- step((generator = generator.apply(thisArg, _arguments || [])).next());
24
- });
25
- };
26
- var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
- function verb(n) { return function (v) { return step([n, v]); }; }
30
- function step(op) {
31
- if (f) throw new TypeError("Generator is already executing.");
32
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
- if (y = 0, t) op = [op[0] & 2, t.value];
35
- switch (op[0]) {
36
- case 0: case 1: t = op; break;
37
- case 4: _.label++; return { value: op[1], done: false };
38
- case 5: _.label++; y = op[1]; op = [0]; continue;
39
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
- default:
41
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
- if (t[2]) _.ops.pop();
46
- _.trys.pop(); continue;
47
- }
48
- op = body.call(thisArg, _);
49
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
- }
52
- };
53
2
  Object.defineProperty(exports, "__esModule", { value: true });
54
3
  exports.CustomRepository = void 0;
55
- var typeorm_1 = require("typeorm");
56
- var _1 = require(".");
57
- var CustomRepository = /** @class */ (function (_super) {
58
- __extends(CustomRepository, _super);
59
- function CustomRepository(target, dataSource) {
60
- return _super.call(this, target, dataSource.manager) || this;
4
+ const typeorm_1 = require("typeorm");
5
+ const _1 = require(".");
6
+ class CustomRepository extends typeorm_1.Repository {
7
+ constructor(target, dataSource) {
8
+ super(target, dataSource.manager);
9
+ }
10
+ async getDiscountsCodeUserWrapper(params) {
11
+ return await (0, _1.getDiscountsCodeUserInformation)(this, params);
12
+ }
13
+ async getDiscountsCodeCompanyWrapper(params) {
14
+ return await (0, _1.getDiscountsCodeCompanyInformation)(this, params);
15
+ }
16
+ async getLocalsCompanyInformationWrapper(params) {
17
+ return await (0, _1.getLocalsCompanyInformation)(this, params);
18
+ }
19
+ async getVerifyLocalsInformationWrapper(params) {
20
+ return await (0, _1.getVerifyLocalsInformation)(this, params);
21
+ }
22
+ async getLocalReservesInformationWrapper(params) {
23
+ return await (0, _1.getLocalReservesInformation)(this, params);
61
24
  }
62
- CustomRepository.prototype.getDiscountsCodeUserWrapper = function (params) {
63
- return __awaiter(this, void 0, void 0, function () {
64
- return __generator(this, function (_a) {
65
- switch (_a.label) {
66
- case 0: return [4 /*yield*/, (0, _1.getDiscountsCodeUserInformation)(this, params)];
67
- case 1: return [2 /*return*/, _a.sent()];
68
- }
69
- });
70
- });
71
- };
72
- CustomRepository.prototype.getDiscountsCodeCompanyWrapper = function (params) {
73
- return __awaiter(this, void 0, void 0, function () {
74
- return __generator(this, function (_a) {
75
- switch (_a.label) {
76
- case 0: return [4 /*yield*/, (0, _1.getDiscountsCodeCompanyInformation)(this, params)];
77
- case 1: return [2 /*return*/, _a.sent()];
78
- }
79
- });
80
- });
81
- };
82
- CustomRepository.prototype.getLocalsCompanyInformationWrapper = function (params) {
83
- return __awaiter(this, void 0, void 0, function () {
84
- return __generator(this, function (_a) {
85
- switch (_a.label) {
86
- case 0: return [4 /*yield*/, (0, _1.getLocalsCompanyInformation)(this, params)];
87
- case 1: return [2 /*return*/, _a.sent()];
88
- }
89
- });
90
- });
91
- };
92
- CustomRepository.prototype.getVerifyLocalsInformationWrapper = function (params) {
93
- return __awaiter(this, void 0, void 0, function () {
94
- return __generator(this, function (_a) {
95
- switch (_a.label) {
96
- case 0: return [4 /*yield*/, (0, _1.getVerifyLocalsInformation)(this, params)];
97
- case 1: return [2 /*return*/, _a.sent()];
98
- }
99
- });
100
- });
101
- };
102
- CustomRepository.prototype.getLocalReservesInformationWrapper = function (params) {
103
- return __awaiter(this, void 0, void 0, function () {
104
- return __generator(this, function (_a) {
105
- switch (_a.label) {
106
- case 0: return [4 /*yield*/, (0, _1.getLocalReservesInformation)(this, params)];
107
- case 1: return [2 /*return*/, _a.sent()];
108
- }
109
- });
110
- });
111
- };
112
- return CustomRepository;
113
- }(typeorm_1.Repository));
25
+ }
114
26
  exports.CustomRepository = CustomRepository;
@@ -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.AuthenticationCredential = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var __1 = require("..");
15
- var AuthenticationCredential = /** @class */ (function () {
16
- function AuthenticationCredential() {
17
- }
18
- __decorate([
19
- (0, typeorm_1.PrimaryGeneratedColumn)({
20
- type: "int",
21
- comment: "Número de identificación (ID) único de cada registro.",
22
- }),
23
- __metadata("design:type", Number)
24
- ], AuthenticationCredential.prototype, "id", void 0);
25
- __decorate([
26
- (0, typeorm_1.Column)({
27
- length: 30,
28
- type: "varchar",
29
- comment: "Tipo de autenticación que va a tener el sistema:\r\n1. auth_basic: username/email y password para autenticación básica y JWT.\r\n\r\n2. auth_token: client_id y client_secret junto con username y password para OAuth 2.0 Password Grant.\r\n\r\n3. auth_oauth: client_id, redirect_uri, response_type, scope, y state para OAuth 2.0 Authorization Code Grant.\r\n\r\n4. auth_api_key: api_key para autenticación basada en claves API.\r\n\r\nAcá toca tener en cuenta cada tipo para hacer la respectiva autenticación, para esto ver ejemplos y usos de cada uno.",
30
- }),
31
- __metadata("design:type", String)
32
- ], AuthenticationCredential.prototype, "type", void 0);
33
- __decorate([
34
- (0, typeorm_1.Column)({
35
- length: 30,
36
- type: "varchar",
37
- comment: "Nombre del tipo de autenticación.",
38
- }),
39
- __metadata("design:type", String)
40
- ], AuthenticationCredential.prototype, "name", void 0);
41
- __decorate([
42
- (0, typeorm_1.Column)({
43
- length: 200,
44
- type: "varchar",
45
- comment: "Variables que se necesitan separadas por ,\r\nejemplo: username,password....\r\n\r\nEsto se tiene en cuenta para crear los elementos en el frontend y poder guardarlos en la tabla (pos_system -> settings).",
46
- }),
47
- __metadata("design:type", String)
48
- ], AuthenticationCredential.prototype, "variables", void 0);
49
- __decorate([
50
- (0, typeorm_1.Column)({
51
- default: 1,
52
- type: "int",
53
- width: 1,
54
- comment: "Estado del tipo de autenticación:\r\n0: Inactivo.\r\n1: Activo.",
55
- }),
56
- __metadata("design:type", Number)
57
- ], AuthenticationCredential.prototype, "status", void 0);
58
- __decorate([
59
- (0, typeorm_1.OneToMany)(function () { return __1.PosSystem; }, function (posSystem) { return posSystem.authentication_credentials; }),
60
- __metadata("design:type", Array)
61
- ], AuthenticationCredential.prototype, "authenticationCredentials", void 0);
62
- AuthenticationCredential = __decorate([
63
- (0, typeorm_1.Entity)({
64
- name: "authentication_credential",
65
- comment: "Tabla creada para almacenar los tipos de autenticación que van a tener los sistemas POS.",
66
- })
67
- ], AuthenticationCredential);
68
- return AuthenticationCredential;
69
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const __1 = require("..");
15
+ let AuthenticationCredential = class AuthenticationCredential {
16
+ };
70
17
  exports.AuthenticationCredential = AuthenticationCredential;
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)({
20
+ type: "int",
21
+ comment: "Número de identificación (ID) único de cada registro.",
22
+ }),
23
+ __metadata("design:type", Number)
24
+ ], AuthenticationCredential.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({
27
+ length: 30,
28
+ type: "varchar",
29
+ comment: "Tipo de autenticación que va a tener el sistema:\r\n1. auth_basic: username/email y password para autenticación básica y JWT.\r\n\r\n2. auth_token: client_id y client_secret junto con username y password para OAuth 2.0 Password Grant.\r\n\r\n3. auth_oauth: client_id, redirect_uri, response_type, scope, y state para OAuth 2.0 Authorization Code Grant.\r\n\r\n4. auth_api_key: api_key para autenticación basada en claves API.\r\n\r\nAcá toca tener en cuenta cada tipo para hacer la respectiva autenticación, para esto ver ejemplos y usos de cada uno.",
30
+ }),
31
+ __metadata("design:type", String)
32
+ ], AuthenticationCredential.prototype, "type", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({
35
+ length: 30,
36
+ type: "varchar",
37
+ comment: "Nombre del tipo de autenticación.",
38
+ }),
39
+ __metadata("design:type", String)
40
+ ], AuthenticationCredential.prototype, "name", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({
43
+ length: 200,
44
+ type: "varchar",
45
+ comment: "Variables que se necesitan separadas por ,\r\nejemplo: username,password....\r\n\r\nEsto se tiene en cuenta para crear los elementos en el frontend y poder guardarlos en la tabla (pos_system -> settings).",
46
+ }),
47
+ __metadata("design:type", String)
48
+ ], AuthenticationCredential.prototype, "variables", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({
51
+ default: 1,
52
+ type: "int",
53
+ width: 1,
54
+ comment: "Estado del tipo de autenticación:\r\n0: Inactivo.\r\n1: Activo.",
55
+ }),
56
+ __metadata("design:type", Number)
57
+ ], AuthenticationCredential.prototype, "status", void 0);
58
+ __decorate([
59
+ (0, typeorm_1.OneToMany)(() => __1.PosSystem, (posSystem) => posSystem.authentication_credentials),
60
+ __metadata("design:type", Array)
61
+ ], AuthenticationCredential.prototype, "authenticationCredentials", void 0);
62
+ exports.AuthenticationCredential = AuthenticationCredential = __decorate([
63
+ (0, typeorm_1.Entity)({
64
+ name: "authentication_credential",
65
+ comment: "Tabla creada para almacenar los tipos de autenticación que van a tener los sistemas POS.",
66
+ })
67
+ ], AuthenticationCredential);
@@ -10,57 +10,54 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Bank = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var Country_1 = require("./Country");
15
- var Bank = /** @class */ (function () {
16
- function Bank() {
17
- }
18
- __decorate([
19
- (0, typeorm_1.PrimaryGeneratedColumn)({
20
- type: "int",
21
- comment: "Número de identificación (ID) único de cada registro.",
22
- }),
23
- __metadata("design:type", Number)
24
- ], Bank.prototype, "id", void 0);
25
- __decorate([
26
- (0, typeorm_1.Column)({
27
- length: 20,
28
- type: "varchar",
29
- comment: "Código identificador de la entidad bancaria.\r\n\r\nEste código es único y no se puede repetir por país.",
30
- }),
31
- __metadata("design:type", String)
32
- ], Bank.prototype, "code", void 0);
33
- __decorate([
34
- (0, typeorm_1.ManyToOne)(function () { return Country_1.Country; }, function (country) { return country.banks; }, {
35
- onDelete: "RESTRICT",
36
- onUpdate: "NO ACTION",
37
- }),
38
- (0, typeorm_1.JoinColumn)({ name: "country" }),
39
- __metadata("design:type", Country_1.Country)
40
- ], Bank.prototype, "country", void 0);
41
- __decorate([
42
- (0, typeorm_1.Column)({
43
- type: "varchar",
44
- length: 50,
45
- comment: "Nombre de la entidad bancaria.\r\n\r\nEste nombre es el que se mostrará en la plataforma.",
46
- }),
47
- __metadata("design:type", String)
48
- ], Bank.prototype, "name", void 0);
49
- __decorate([
50
- (0, typeorm_1.Column)({
51
- default: 1,
52
- type: "int",
53
- width: 1,
54
- comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
55
- }),
56
- __metadata("design:type", Number)
57
- ], Bank.prototype, "status", void 0);
58
- Bank = __decorate([
59
- (0, typeorm_1.Entity)({
60
- comment: "Tabla creada para guardar los tipos de bancos que hay en la plataforma por país.",
61
- }),
62
- (0, typeorm_1.Unique)("unique_code_per_country", ["code", "country"])
63
- ], Bank);
64
- return Bank;
65
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const Country_1 = require("./Country");
15
+ let Bank = class Bank {
16
+ };
66
17
  exports.Bank = Bank;
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)({
20
+ type: "int",
21
+ comment: "Número de identificación (ID) único de cada registro.",
22
+ }),
23
+ __metadata("design:type", Number)
24
+ ], Bank.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({
27
+ length: 20,
28
+ type: "varchar",
29
+ comment: "Código identificador de la entidad bancaria.\r\n\r\nEste código es único y no se puede repetir por país.",
30
+ }),
31
+ __metadata("design:type", String)
32
+ ], Bank.prototype, "code", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.ManyToOne)(() => Country_1.Country, (country) => country.banks, {
35
+ onDelete: "RESTRICT",
36
+ onUpdate: "NO ACTION",
37
+ }),
38
+ (0, typeorm_1.JoinColumn)({ name: "country" }),
39
+ __metadata("design:type", Country_1.Country)
40
+ ], Bank.prototype, "country", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({
43
+ type: "varchar",
44
+ length: 50,
45
+ comment: "Nombre de la entidad bancaria.\r\n\r\nEste nombre es el que se mostrará en la plataforma.",
46
+ }),
47
+ __metadata("design:type", String)
48
+ ], Bank.prototype, "name", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({
51
+ default: 1,
52
+ type: "int",
53
+ width: 1,
54
+ comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
55
+ }),
56
+ __metadata("design:type", Number)
57
+ ], Bank.prototype, "status", void 0);
58
+ exports.Bank = Bank = __decorate([
59
+ (0, typeorm_1.Entity)({
60
+ comment: "Tabla creada para guardar los tipos de bancos que hay en la plataforma por país.",
61
+ }),
62
+ (0, typeorm_1.Unique)("unique_code_per_country", ["code", "country"])
63
+ ], Bank);
@@ -10,54 +10,51 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.BusinessType = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var BusinessTypeProduct_1 = require("./BusinessTypeProduct");
15
- var BusinessType = /** @class */ (function () {
16
- function BusinessType() {
17
- }
18
- __decorate([
19
- (0, typeorm_1.PrimaryGeneratedColumn)({
20
- type: "int",
21
- comment: "Número de identificación (ID) único de cada registro.",
22
- }),
23
- __metadata("design:type", Number)
24
- ], BusinessType.prototype, "id", void 0);
25
- __decorate([
26
- (0, typeorm_1.Column)({
27
- length: 50,
28
- type: "varchar",
29
- comment: "Nombre del tipo de negocio.",
30
- }),
31
- __metadata("design:type", String)
32
- ], BusinessType.prototype, "name", void 0);
33
- __decorate([
34
- (0, typeorm_1.Column)({
35
- type: "text",
36
- nullable: true,
37
- default: null,
38
- comment: "Descripción del tipo de negocio.",
39
- }),
40
- __metadata("design:type", Object)
41
- ], BusinessType.prototype, "description", void 0);
42
- __decorate([
43
- (0, typeorm_1.Column)({
44
- default: 1,
45
- type: "int",
46
- width: 1,
47
- comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
48
- }),
49
- __metadata("design:type", Number)
50
- ], BusinessType.prototype, "status", void 0);
51
- __decorate([
52
- (0, typeorm_1.OneToMany)(function () { return BusinessTypeProduct_1.BusinessTypeProduct; }, function (businessTypeProduct) { return businessTypeProduct.business_type; }),
53
- __metadata("design:type", Array)
54
- ], BusinessType.prototype, "business_types_product", void 0);
55
- BusinessType = __decorate([
56
- (0, typeorm_1.Entity)({
57
- name: "business_type",
58
- comment: "Almacenar los tipos de negocio qué se van a poder agregar en asumano.",
59
- })
60
- ], BusinessType);
61
- return BusinessType;
62
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const BusinessTypeProduct_1 = require("./BusinessTypeProduct");
15
+ let BusinessType = class BusinessType {
16
+ };
63
17
  exports.BusinessType = BusinessType;
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)({
20
+ type: "int",
21
+ comment: "Número de identificación (ID) único de cada registro.",
22
+ }),
23
+ __metadata("design:type", Number)
24
+ ], BusinessType.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({
27
+ length: 50,
28
+ type: "varchar",
29
+ comment: "Nombre del tipo de negocio.",
30
+ }),
31
+ __metadata("design:type", String)
32
+ ], BusinessType.prototype, "name", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({
35
+ type: "text",
36
+ nullable: true,
37
+ default: null,
38
+ comment: "Descripción del tipo de negocio.",
39
+ }),
40
+ __metadata("design:type", Object)
41
+ ], BusinessType.prototype, "description", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({
44
+ default: 1,
45
+ type: "int",
46
+ width: 1,
47
+ comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
48
+ }),
49
+ __metadata("design:type", Number)
50
+ ], BusinessType.prototype, "status", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.OneToMany)(() => BusinessTypeProduct_1.BusinessTypeProduct, (businessTypeProduct) => businessTypeProduct.business_type),
53
+ __metadata("design:type", Array)
54
+ ], BusinessType.prototype, "business_types_product", void 0);
55
+ exports.BusinessType = BusinessType = __decorate([
56
+ (0, typeorm_1.Entity)({
57
+ name: "business_type",
58
+ comment: "Almacenar los tipos de negocio qué se van a poder agregar en asumano.",
59
+ })
60
+ ], BusinessType);
@@ -10,75 +10,72 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.BusinessTypeProduct = void 0;
13
- var typeorm_1 = require("typeorm");
14
- var __1 = require("..");
15
- var BusinessType_1 = require("./BusinessType");
16
- var BusinessTypeProduct = /** @class */ (function () {
17
- function BusinessTypeProduct() {
18
- }
19
- __decorate([
20
- (0, typeorm_1.PrimaryGeneratedColumn)({
21
- type: "int",
22
- comment: "Número de identificación (ID) único de cada registro.",
23
- }),
24
- __metadata("design:type", Number)
25
- ], BusinessTypeProduct.prototype, "id", void 0);
26
- __decorate([
27
- (0, typeorm_1.ManyToOne)(function () { return BusinessType_1.BusinessType; }, function (businessType) { return businessType.business_types_product; }, {
28
- onDelete: "RESTRICT",
29
- onUpdate: "NO ACTION",
30
- nullable: true,
31
- }),
32
- (0, typeorm_1.JoinColumn)({ name: "business_type" }),
33
- __metadata("design:type", Object)
34
- ], BusinessTypeProduct.prototype, "business_type", void 0);
35
- __decorate([
36
- (0, typeorm_1.Column)({
37
- type: "varchar",
38
- length: 40,
39
- comment: "ID de la variable que se encuentra en los archivos `locales` para el multilenguaje.",
40
- }),
41
- __metadata("design:type", String)
42
- ], BusinessTypeProduct.prototype, "name", void 0);
43
- __decorate([
44
- (0, typeorm_1.Column)({
45
- type: "varchar",
46
- length: 500,
47
- nullable: true,
48
- default: null,
49
- comment: "Imagen para el tipo de comida.",
50
- }),
51
- __metadata("design:type", Object)
52
- ], BusinessTypeProduct.prototype, "photo", void 0);
53
- __decorate([
54
- (0, typeorm_1.Column)({
55
- type: "int",
56
- width: 1,
57
- default: 1,
58
- comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
59
- }),
60
- __metadata("design:type", Number)
61
- ], BusinessTypeProduct.prototype, "status", void 0);
62
- __decorate([
63
- (0, typeorm_1.ManyToMany)(function () { return __1.Local; }, function (local) { return local.business_type_products; }),
64
- (0, typeorm_1.JoinTable)({
65
- name: "business_type_product_local",
66
- joinColumn: {
67
- name: "business_type_product",
68
- referencedColumnName: "id",
69
- },
70
- inverseJoinColumn: {
71
- name: "local",
72
- referencedColumnName: "id",
73
- },
74
- }),
75
- __metadata("design:type", Array)
76
- ], BusinessTypeProduct.prototype, "business_type_products", void 0);
77
- BusinessTypeProduct = __decorate([
78
- (0, typeorm_1.Entity)("business_type_product", {
79
- comment: "Tabla para agregar los productos qué el local va tener por el tipo de negocio.",
80
- })
81
- ], BusinessTypeProduct);
82
- return BusinessTypeProduct;
83
- }());
13
+ const typeorm_1 = require("typeorm");
14
+ const __1 = require("..");
15
+ const BusinessType_1 = require("./BusinessType");
16
+ let BusinessTypeProduct = class BusinessTypeProduct {
17
+ };
84
18
  exports.BusinessTypeProduct = BusinessTypeProduct;
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)({
21
+ type: "int",
22
+ comment: "Número de identificación (ID) único de cada registro.",
23
+ }),
24
+ __metadata("design:type", Number)
25
+ ], BusinessTypeProduct.prototype, "id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.ManyToOne)(() => BusinessType_1.BusinessType, (businessType) => businessType.business_types_product, {
28
+ onDelete: "RESTRICT",
29
+ onUpdate: "NO ACTION",
30
+ nullable: true,
31
+ }),
32
+ (0, typeorm_1.JoinColumn)({ name: "business_type" }),
33
+ __metadata("design:type", Object)
34
+ ], BusinessTypeProduct.prototype, "business_type", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({
37
+ type: "varchar",
38
+ length: 40,
39
+ comment: "ID de la variable que se encuentra en los archivos `locales` para el multilenguaje.",
40
+ }),
41
+ __metadata("design:type", String)
42
+ ], BusinessTypeProduct.prototype, "name", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({
45
+ type: "varchar",
46
+ length: 500,
47
+ nullable: true,
48
+ default: null,
49
+ comment: "Imagen para el tipo de comida.",
50
+ }),
51
+ __metadata("design:type", Object)
52
+ ], BusinessTypeProduct.prototype, "photo", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({
55
+ type: "int",
56
+ width: 1,
57
+ default: 1,
58
+ comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
59
+ }),
60
+ __metadata("design:type", Number)
61
+ ], BusinessTypeProduct.prototype, "status", void 0);
62
+ __decorate([
63
+ (0, typeorm_1.ManyToMany)(() => __1.Local, (local) => local.business_type_products),
64
+ (0, typeorm_1.JoinTable)({
65
+ name: "business_type_product_local",
66
+ joinColumn: {
67
+ name: "business_type_product",
68
+ referencedColumnName: "id",
69
+ },
70
+ inverseJoinColumn: {
71
+ name: "local",
72
+ referencedColumnName: "id",
73
+ },
74
+ }),
75
+ __metadata("design:type", Array)
76
+ ], BusinessTypeProduct.prototype, "business_type_products", void 0);
77
+ exports.BusinessTypeProduct = BusinessTypeProduct = __decorate([
78
+ (0, typeorm_1.Entity)("business_type_product", {
79
+ comment: "Tabla para agregar los productos qué el local va tener por el tipo de negocio.",
80
+ })
81
+ ], BusinessTypeProduct);