test-entity-library-asm 3.2.13 → 3.3.0
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/entities/AuthenticationCredential.d.ts +1 -1
- package/dist/entities/AuthenticationCredential.js +16 -7
- package/dist/entities/Bank.js +5 -0
- package/dist/entities/BusinessType.js +9 -3
- package/dist/entities/BusinessTypeProduct.js +4 -1
- package/dist/entities/Category.d.ts +3 -3
- package/dist/entities/Category.js +24 -8
- package/dist/entities/CategoryDate.js +3 -2
- package/dist/entities/CategorySchedule.js +3 -2
- package/dist/entities/City.d.ts +8 -8
- package/dist/entities/City.js +13 -10
- package/dist/entities/CodeRedemptionHistoryCompany.d.ts +2 -2
- package/dist/entities/CodeRedemptionHistoryCompany.js +19 -9
- package/dist/entities/CodeRedemptionHistoryUser.d.ts +2 -2
- package/dist/entities/CodeRedemptionHistoryUser.js +21 -11
- package/dist/entities/Company.js +14 -2
- package/dist/entities/Configuration.js +5 -4
- package/dist/entities/Country.d.ts +1 -1
- package/dist/entities/Country.js +15 -5
- package/dist/entities/Day.js +3 -0
- package/dist/entities/DiscountCodeCompany.js +11 -1
- package/dist/entities/DiscountCodeUser.js +17 -2
- package/dist/entities/Local.d.ts +1 -1
- package/dist/entities/Local.js +10 -3
- package/dist/entities/LocalPlan.js +9 -0
- package/dist/entities/LocalQualification.js +4 -1
- package/dist/entities/Master.js +25 -4
- package/dist/entities/MasterNotification.js +7 -0
- package/dist/entities/MasterPermission.js +11 -1
- package/dist/entities/MasterRole.js +12 -1
- package/dist/entities/Partner.js +28 -4
- package/dist/entities/PartnerNotification.js +7 -0
- package/dist/entities/PartnerPermission.d.ts +1 -1
- package/dist/entities/PartnerPermission.js +15 -2
- package/dist/entities/PartnerPermissionSection.js +14 -1
- package/dist/entities/PartnerPlatform.js +14 -1
- package/dist/entities/PartnerRole.js +12 -1
- package/dist/entities/PartnerSession.js +8 -0
- package/dist/entities/PaymentMethod.d.ts +2 -2
- package/dist/entities/PaymentMethod.js +10 -1
- package/dist/entities/Plan.d.ts +1 -1
- package/dist/entities/Plan.js +16 -3
- package/dist/entities/PosSystem.d.ts +2 -2
- package/dist/entities/PosSystem.js +16 -4
- package/dist/entities/Product.d.ts +2 -2
- package/dist/entities/Product.js +30 -6
- package/dist/entities/ProductDate.js +3 -2
- package/dist/entities/ProductGroup.d.ts +3 -3
- package/dist/entities/ProductGroup.js +24 -14
- package/dist/entities/ProductIngredient.d.ts +2 -2
- package/dist/entities/ProductIngredient.js +16 -13
- package/dist/entities/ProductSchedule.js +3 -2
- package/dist/entities/ProductTopping.js +4 -0
- package/dist/entities/Region.d.ts +2 -2
- package/dist/entities/Region.js +12 -8
- package/dist/entities/Request.d.ts +1 -1
- package/dist/entities/Request.js +14 -2
- package/dist/entities/RequestLocal.js +13 -1
- package/dist/entities/RequestLocalHistory.js +8 -1
- package/dist/entities/RequestLocalPayment.js +10 -0
- package/dist/entities/RequestProduct.d.ts +3 -3
- package/dist/entities/RequestProduct.js +19 -15
- package/dist/entities/RequestProductGroupComplement.d.ts +3 -3
- package/dist/entities/RequestProductGroupComplement.js +14 -13
- package/dist/entities/Square.d.ts +2 -2
- package/dist/entities/Square.js +36 -5
- package/dist/entities/ToppingImage.js +6 -0
- package/dist/entities/TypeMeasureIngredient.d.ts +1 -1
- package/dist/entities/TypeMeasureIngredient.js +11 -6
- package/dist/entities/User.d.ts +2 -2
- package/dist/entities/User.js +22 -5
- package/dist/entities/UserAddress.js +14 -1
- package/dist/entities/UserPaymentMethod.d.ts +1 -1
- package/dist/entities/UserPaymentMethod.js +13 -1
- package/dist/entities/VerifyLocal.d.ts +2 -2
- package/dist/entities/VerifyLocal.js +11 -0
- package/dist/entities/productGroupComplement.js +23 -3
- package/package.json +1 -1
- package/src/entities/AuthenticationCredential.ts +24 -15
- package/src/entities/Bank.ts +8 -6
- package/src/entities/BusinessType.ts +9 -2
- package/src/entities/BusinessTypeProduct.ts +4 -1
- package/src/entities/Category.ts +24 -8
- package/src/entities/CategoryDate.ts +3 -2
- package/src/entities/CategorySchedule.ts +3 -2
- package/src/entities/City.ts +31 -28
- package/src/entities/CodeRedemptionHistoryCompany.ts +28 -18
- package/src/entities/CodeRedemptionHistoryUser.ts +31 -21
- package/src/entities/Company.ts +14 -2
- package/src/entities/Configuration.ts +8 -7
- package/src/entities/Country.ts +15 -5
- package/src/entities/Day.ts +4 -1
- package/src/entities/DiscountCodeCompany.ts +11 -1
- package/src/entities/DiscountCodeUser.ts +17 -2
- package/src/entities/Local.ts +12 -11
- package/src/entities/LocalPlan.ts +9 -0
- package/src/entities/LocalQualification.ts +4 -1
- package/src/entities/Master.ts +25 -4
- package/src/entities/MasterNotification.ts +7 -0
- package/src/entities/MasterPermission.ts +11 -1
- package/src/entities/MasterRole.ts +12 -1
- package/src/entities/Partner.ts +28 -4
- package/src/entities/PartnerNotification.ts +7 -0
- package/src/entities/PartnerPermission.ts +15 -2
- package/src/entities/PartnerPermissionSection.ts +14 -1
- package/src/entities/PartnerPlatform.ts +14 -1
- package/src/entities/PartnerRole.ts +12 -1
- package/src/entities/PartnerSession.ts +9 -1
- package/src/entities/PaymentMethod.ts +11 -2
- package/src/entities/Plan.ts +17 -4
- package/src/entities/PosSystem.ts +16 -4
- package/src/entities/Product.ts +31 -7
- package/src/entities/ProductDate.ts +3 -3
- package/src/entities/ProductGroup.ts +40 -30
- package/src/entities/ProductIngredient.ts +27 -24
- package/src/entities/ProductSchedule.ts +3 -2
- package/src/entities/ProductTopping.ts +4 -0
- package/src/entities/Region.ts +22 -19
- package/src/entities/Request.ts +14 -2
- package/src/entities/RequestLocal.ts +13 -1
- package/src/entities/RequestLocalHistory.ts +8 -1
- package/src/entities/RequestLocalPayment.ts +10 -0
- package/src/entities/RequestProduct.ts +30 -26
- package/src/entities/RequestProductGroupComplement.ts +23 -22
- package/src/entities/Square.ts +37 -6
- package/src/entities/ToppingImage.ts +6 -0
- package/src/entities/TypeMeasureIngredient.ts +18 -18
- package/src/entities/User.ts +23 -6
- package/src/entities/UserAddress.ts +14 -1
- package/src/entities/UserPaymentMethod.ts +13 -1
- package/src/entities/VerifyLocal.ts +13 -2
- package/src/entities/productGroupComplement.ts +23 -3
|
@@ -11,14 +11,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.UserPaymentMethod = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
|
-
var User_1 = require("./User");
|
|
15
14
|
var __1 = require("..");
|
|
16
15
|
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
var User_1 = require("./User");
|
|
17
17
|
var UserPaymentMethod = /** @class */ (function () {
|
|
18
18
|
function UserPaymentMethod() {
|
|
19
19
|
}
|
|
20
20
|
__decorate([
|
|
21
21
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
22
|
+
type: "int",
|
|
22
23
|
comment: "ID único de cada registro.",
|
|
23
24
|
}),
|
|
24
25
|
__metadata("design:type", Number)
|
|
@@ -34,6 +35,7 @@ var UserPaymentMethod = /** @class */ (function () {
|
|
|
34
35
|
__decorate([
|
|
35
36
|
(0, typeorm_1.Column)({
|
|
36
37
|
length: 255,
|
|
38
|
+
type: "varchar",
|
|
37
39
|
comment: "Token devuelto por la pasarela de pagos que estemos usando.",
|
|
38
40
|
}),
|
|
39
41
|
__metadata("design:type", String)
|
|
@@ -41,6 +43,7 @@ var UserPaymentMethod = /** @class */ (function () {
|
|
|
41
43
|
__decorate([
|
|
42
44
|
(0, typeorm_1.Column)({
|
|
43
45
|
length: 50,
|
|
46
|
+
type: "varchar",
|
|
44
47
|
comment: "Ej. Visa, MasterCard, Amex...",
|
|
45
48
|
}),
|
|
46
49
|
__metadata("design:type", String)
|
|
@@ -48,6 +51,7 @@ var UserPaymentMethod = /** @class */ (function () {
|
|
|
48
51
|
__decorate([
|
|
49
52
|
(0, typeorm_1.Column)({
|
|
50
53
|
length: 50,
|
|
54
|
+
type: "varchar",
|
|
51
55
|
comment: "Ej. Crédito, Débito, Prepago...",
|
|
52
56
|
}),
|
|
53
57
|
__metadata("design:type", String)
|
|
@@ -55,6 +59,7 @@ var UserPaymentMethod = /** @class */ (function () {
|
|
|
55
59
|
__decorate([
|
|
56
60
|
(0, typeorm_1.Column)({
|
|
57
61
|
length: 4,
|
|
62
|
+
type: "varchar",
|
|
58
63
|
comment: "Últimos 4 dígitos de la tarjeta/método de pago.",
|
|
59
64
|
}),
|
|
60
65
|
__metadata("design:type", String)
|
|
@@ -62,6 +67,7 @@ var UserPaymentMethod = /** @class */ (function () {
|
|
|
62
67
|
__decorate([
|
|
63
68
|
(0, typeorm_1.Column)({
|
|
64
69
|
length: 2,
|
|
70
|
+
type: "varchar",
|
|
65
71
|
comment: "Mes de expiración de la tarjeta/método de pago.",
|
|
66
72
|
}),
|
|
67
73
|
__metadata("design:type", String)
|
|
@@ -69,6 +75,7 @@ var UserPaymentMethod = /** @class */ (function () {
|
|
|
69
75
|
__decorate([
|
|
70
76
|
(0, typeorm_1.Column)({
|
|
71
77
|
length: 2,
|
|
78
|
+
type: "varchar",
|
|
72
79
|
comment: "Año de expiración de la tarjeta/método de pago.",
|
|
73
80
|
}),
|
|
74
81
|
__metadata("design:type", String)
|
|
@@ -76,6 +83,8 @@ var UserPaymentMethod = /** @class */ (function () {
|
|
|
76
83
|
__decorate([
|
|
77
84
|
(0, typeorm_1.Column)({
|
|
78
85
|
default: 1,
|
|
86
|
+
type: "int",
|
|
87
|
+
length: 1,
|
|
79
88
|
comment: "Me indica sí la tarjeta/método de pago está o no activa.\r\n1: Activa.\r\n0: Inactiva.",
|
|
80
89
|
}),
|
|
81
90
|
__metadata("design:type", Number)
|
|
@@ -83,6 +92,8 @@ var UserPaymentMethod = /** @class */ (function () {
|
|
|
83
92
|
__decorate([
|
|
84
93
|
(0, typeorm_1.Column)({
|
|
85
94
|
default: 0,
|
|
95
|
+
type: "int",
|
|
96
|
+
length: 1,
|
|
86
97
|
comment: "Me indica sí la tarjeta/método de pago está o no eliminada.\r\n0: No eliminado.\r\n1: Eliminado.",
|
|
87
98
|
}),
|
|
88
99
|
__metadata("design:type", Number)
|
|
@@ -99,6 +110,7 @@ var UserPaymentMethod = /** @class */ (function () {
|
|
|
99
110
|
(0, typeorm_1.Column)({
|
|
100
111
|
type: "datetime",
|
|
101
112
|
nullable: true,
|
|
113
|
+
default: null,
|
|
102
114
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
103
115
|
comment: "Fecha de actualización del registro.",
|
|
104
116
|
}),
|
|
@@ -6,8 +6,8 @@ export declare class VerifyLocal {
|
|
|
6
6
|
assigned_master: Master;
|
|
7
7
|
local_information: any;
|
|
8
8
|
basic_information: any;
|
|
9
|
-
settings: any;
|
|
10
|
-
opening_hours: any;
|
|
9
|
+
settings: any | null;
|
|
10
|
+
opening_hours: any | null;
|
|
11
11
|
terminal_users: any;
|
|
12
12
|
terminals: any;
|
|
13
13
|
details: any | null;
|
|
@@ -20,6 +20,7 @@ var VerifyLocal = /** @class */ (function () {
|
|
|
20
20
|
}
|
|
21
21
|
__decorate([
|
|
22
22
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
23
|
+
type: "int",
|
|
23
24
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
24
25
|
}),
|
|
25
26
|
__metadata("design:type", Number)
|
|
@@ -60,6 +61,8 @@ var VerifyLocal = /** @class */ (function () {
|
|
|
60
61
|
(0, typeorm_1.Column)({
|
|
61
62
|
type: "longtext",
|
|
62
63
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
64
|
+
nullable: true,
|
|
65
|
+
default: null,
|
|
63
66
|
comment: "Estructura de paso configuración.",
|
|
64
67
|
}),
|
|
65
68
|
__metadata("design:type", Object)
|
|
@@ -68,6 +71,8 @@ var VerifyLocal = /** @class */ (function () {
|
|
|
68
71
|
(0, typeorm_1.Column)({
|
|
69
72
|
type: "longtext",
|
|
70
73
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
74
|
+
nullable: true,
|
|
75
|
+
default: null,
|
|
71
76
|
comment: "Estructura de paso horarios de atención.",
|
|
72
77
|
}),
|
|
73
78
|
__metadata("design:type", Object)
|
|
@@ -92,6 +97,7 @@ var VerifyLocal = /** @class */ (function () {
|
|
|
92
97
|
(0, typeorm_1.Column)({
|
|
93
98
|
type: "text",
|
|
94
99
|
nullable: true,
|
|
100
|
+
default: null,
|
|
95
101
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
96
102
|
comment: "Información adicional del local para su verificación.",
|
|
97
103
|
}),
|
|
@@ -109,6 +115,7 @@ var VerifyLocal = /** @class */ (function () {
|
|
|
109
115
|
(0, typeorm_1.Column)({
|
|
110
116
|
type: "datetime",
|
|
111
117
|
nullable: true,
|
|
118
|
+
default: null,
|
|
112
119
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
113
120
|
comment: "Fecha de verificación del registro.",
|
|
114
121
|
}),
|
|
@@ -125,6 +132,8 @@ var VerifyLocal = /** @class */ (function () {
|
|
|
125
132
|
__decorate([
|
|
126
133
|
(0, typeorm_1.Column)({
|
|
127
134
|
default: 1,
|
|
135
|
+
type: "int",
|
|
136
|
+
width: 1,
|
|
128
137
|
comment: "Este campo hace referencia al estado que tiene la verificación del local, es decir:\r\n1. Pendiente de verificación (Pending verification): Este estado hace referencia a que el usuario ya creó el local y lo mandó a verificación, entonces, le queda al master validar y aprobar o rechazar.\r\n\r\n2. Rechazado (Rejected): Hace referencia a que el master verificó y por alguna razón rechazó la información de la creación del local.\r\n\r\n3. Aprobado (approved): Hace referencia a que la información y se procede a la realización del pago (Si hay un plan, no debería hacer el pago, eso es automático).",
|
|
129
138
|
}),
|
|
130
139
|
__metadata("design:type", Number)
|
|
@@ -132,6 +141,8 @@ var VerifyLocal = /** @class */ (function () {
|
|
|
132
141
|
__decorate([
|
|
133
142
|
(0, typeorm_1.Column)({
|
|
134
143
|
default: 1,
|
|
144
|
+
type: "int",
|
|
145
|
+
width: 1,
|
|
135
146
|
comment: "Visible al usuario: 1 El registro es visto por el administrador en los locales verificados.0 El registro no es visto para el administrador y pasa a la papelera de reciclaje",
|
|
136
147
|
}),
|
|
137
148
|
__metadata("design:type", Number)
|
|
@@ -20,6 +20,7 @@ var ProductGroupComplement = /** @class */ (function () {
|
|
|
20
20
|
}
|
|
21
21
|
__decorate([
|
|
22
22
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
23
|
+
type: "int",
|
|
23
24
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
24
25
|
}),
|
|
25
26
|
__metadata("design:type", Number)
|
|
@@ -33,7 +34,7 @@ var ProductGroupComplement = /** @class */ (function () {
|
|
|
33
34
|
__metadata("design:type", ProductGroup_1.ProductGroup)
|
|
34
35
|
], ProductGroupComplement.prototype, "group_id", void 0);
|
|
35
36
|
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({ length: 30, comment: "Nombre del complemento." }),
|
|
37
|
+
(0, typeorm_1.Column)({ length: 30, type: "varchar", comment: "Nombre del complemento." }),
|
|
37
38
|
__metadata("design:type", String)
|
|
38
39
|
], ProductGroupComplement.prototype, "name", void 0);
|
|
39
40
|
__decorate([
|
|
@@ -45,24 +46,36 @@ var ProductGroupComplement = /** @class */ (function () {
|
|
|
45
46
|
__metadata("design:type", __1.ToppingImage)
|
|
46
47
|
], ProductGroupComplement.prototype, "image", void 0);
|
|
47
48
|
__decorate([
|
|
48
|
-
(0, typeorm_1.Column)({
|
|
49
|
+
(0, typeorm_1.Column)({
|
|
50
|
+
length: 20,
|
|
51
|
+
type: "varchar",
|
|
52
|
+
nullable: true,
|
|
53
|
+
default: null,
|
|
54
|
+
comment: "Precio del complemento.",
|
|
55
|
+
}),
|
|
49
56
|
__metadata("design:type", Object)
|
|
50
57
|
], ProductGroupComplement.prototype, "price", void 0);
|
|
51
58
|
__decorate([
|
|
52
59
|
(0, typeorm_1.Column)({
|
|
53
60
|
nullable: true,
|
|
61
|
+
type: "int",
|
|
62
|
+
default: null,
|
|
54
63
|
comment: "Límite máximo para poder agregar el complement (topping) al producto.",
|
|
55
64
|
}),
|
|
56
65
|
__metadata("design:type", Object)
|
|
57
66
|
], ProductGroupComplement.prototype, "maximum_limit", void 0);
|
|
58
67
|
__decorate([
|
|
59
|
-
(0, typeorm_1.Column)({
|
|
68
|
+
(0, typeorm_1.Column)({
|
|
69
|
+
type: "int",
|
|
70
|
+
comment: "El orden en que aparece los grupos en el producto.",
|
|
71
|
+
}),
|
|
60
72
|
__metadata("design:type", Number)
|
|
61
73
|
], ProductGroupComplement.prototype, "position", void 0);
|
|
62
74
|
__decorate([
|
|
63
75
|
(0, typeorm_1.Column)({
|
|
64
76
|
type: "mediumtext",
|
|
65
77
|
nullable: true,
|
|
78
|
+
default: null,
|
|
66
79
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
67
80
|
comment: "Valores qué se van a mostrar mientras se aprueban los nuevos cambios.",
|
|
68
81
|
}),
|
|
@@ -71,6 +84,8 @@ var ProductGroupComplement = /** @class */ (function () {
|
|
|
71
84
|
__decorate([
|
|
72
85
|
(0, typeorm_1.Column)({
|
|
73
86
|
default: 1,
|
|
87
|
+
type: "int",
|
|
88
|
+
width: 1,
|
|
74
89
|
comment: "Estado en el que está el elemento: \n0. Inactivo. \n1. Activo. \n2. Eliminado.",
|
|
75
90
|
}),
|
|
76
91
|
__metadata("design:type", Number)
|
|
@@ -79,6 +94,7 @@ var ProductGroupComplement = /** @class */ (function () {
|
|
|
79
94
|
(0, typeorm_1.Column)({
|
|
80
95
|
type: "text",
|
|
81
96
|
nullable: true,
|
|
97
|
+
default: null,
|
|
82
98
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
83
99
|
comment: "Cuando un complemento se inactiva, existe la opción de hacerlo por:\r\n1. Un solo día: El elemento no estará disponible hasta las 00:00 del siguiente día (Se guarda un elemento de tipo fecha).\r\n2. Fecha personalizada: Se puede escoger la fecha en la que el elemento estará activo (Se guarda un elemento de tipo fecha).\r\n3. Indefinidamente: El elemento estará inactivo hasta que se vuelva a activar (El campo inactive_until estará vacío).",
|
|
84
100
|
}),
|
|
@@ -87,6 +103,8 @@ var ProductGroupComplement = /** @class */ (function () {
|
|
|
87
103
|
__decorate([
|
|
88
104
|
(0, typeorm_1.Column)({
|
|
89
105
|
default: 1,
|
|
106
|
+
type: "int",
|
|
107
|
+
width: 1,
|
|
90
108
|
comment: "Estado en el que se encuentra la revisión de los cambios: \n1. En revisión. \n2. Rechazado.",
|
|
91
109
|
}),
|
|
92
110
|
__metadata("design:type", Number)
|
|
@@ -94,6 +112,8 @@ var ProductGroupComplement = /** @class */ (function () {
|
|
|
94
112
|
__decorate([
|
|
95
113
|
(0, typeorm_1.Column)({
|
|
96
114
|
nullable: true,
|
|
115
|
+
default: null,
|
|
116
|
+
type: "varchar",
|
|
97
117
|
length: 600,
|
|
98
118
|
comment: "Comentarios u observaciones de la revisión.",
|
|
99
119
|
}),
|
package/package.json
CHANGED
|
@@ -1,43 +1,52 @@
|
|
|
1
|
-
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from
|
|
2
|
-
import { PosSystem } from
|
|
1
|
+
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
|
2
|
+
import { PosSystem } from "..";
|
|
3
3
|
|
|
4
4
|
@Entity({
|
|
5
|
-
name:
|
|
5
|
+
name: "authentication_credential",
|
|
6
6
|
comment:
|
|
7
|
-
|
|
7
|
+
"Tabla creada para almacenar los tipos de autenticación que van a tener los sistemas POS.",
|
|
8
8
|
})
|
|
9
9
|
export class AuthenticationCredential {
|
|
10
10
|
@PrimaryGeneratedColumn({
|
|
11
|
-
|
|
11
|
+
type: "int",
|
|
12
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
12
13
|
})
|
|
13
|
-
id: number
|
|
14
|
+
id: number;
|
|
14
15
|
|
|
15
16
|
@Column({
|
|
16
17
|
length: 30,
|
|
18
|
+
type: "varchar",
|
|
17
19
|
comment:
|
|
18
|
-
|
|
20
|
+
"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.",
|
|
19
21
|
})
|
|
20
|
-
type: string
|
|
22
|
+
type: string;
|
|
21
23
|
|
|
22
|
-
@Column({
|
|
23
|
-
|
|
24
|
+
@Column({
|
|
25
|
+
length: 30,
|
|
26
|
+
type: "varchar",
|
|
27
|
+
comment: "Nombre del tipo de autenticación.",
|
|
28
|
+
})
|
|
29
|
+
name: string;
|
|
24
30
|
|
|
25
31
|
@Column({
|
|
26
32
|
length: 200,
|
|
33
|
+
type: "varchar",
|
|
27
34
|
comment:
|
|
28
|
-
|
|
35
|
+
"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).",
|
|
29
36
|
})
|
|
30
|
-
variables: string
|
|
37
|
+
variables: string;
|
|
31
38
|
|
|
32
39
|
@Column({
|
|
33
40
|
default: 1,
|
|
34
|
-
|
|
41
|
+
type: "int",
|
|
42
|
+
width: 1,
|
|
43
|
+
comment: "Estado del tipo de autenticación:\r\n0: Inactivo.\r\n1: Activo.",
|
|
35
44
|
})
|
|
36
|
-
status: number
|
|
45
|
+
status: number;
|
|
37
46
|
|
|
38
47
|
@OneToMany(
|
|
39
48
|
() => PosSystem,
|
|
40
49
|
(posSystem) => posSystem.authentication_credentials
|
|
41
50
|
)
|
|
42
|
-
authenticationCredentials: PosSystem[]
|
|
51
|
+
authenticationCredentials: PosSystem[];
|
|
43
52
|
}
|
package/src/entities/Bank.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Entity,
|
|
3
2
|
Column,
|
|
4
|
-
|
|
5
|
-
ManyToOne,
|
|
3
|
+
Entity,
|
|
6
4
|
JoinColumn,
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
ManyToOne,
|
|
6
|
+
PrimaryGeneratedColumn,
|
|
9
7
|
Unique,
|
|
10
8
|
} from "typeorm";
|
|
11
9
|
import { Country } from "./Country";
|
|
12
|
-
import { City } from "./City";
|
|
13
10
|
|
|
14
11
|
@Entity({
|
|
15
12
|
comment:
|
|
@@ -18,12 +15,14 @@ import { City } from "./City";
|
|
|
18
15
|
@Unique("unique_code_per_country", ["code", "country"])
|
|
19
16
|
export class Bank {
|
|
20
17
|
@PrimaryGeneratedColumn({
|
|
18
|
+
type: "int",
|
|
21
19
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
20
|
})
|
|
23
21
|
id: number;
|
|
24
22
|
|
|
25
23
|
@Column({
|
|
26
24
|
length: 20,
|
|
25
|
+
type: "varchar",
|
|
27
26
|
comment:
|
|
28
27
|
"Código identificador de la entidad bancaria.\r\n\r\nEste código es único y no se puede repetir por país.",
|
|
29
28
|
})
|
|
@@ -37,6 +36,7 @@ export class Bank {
|
|
|
37
36
|
country: Country;
|
|
38
37
|
|
|
39
38
|
@Column({
|
|
39
|
+
type: "varchar",
|
|
40
40
|
length: 50,
|
|
41
41
|
comment:
|
|
42
42
|
"Nombre de la entidad bancaria.\r\n\r\nEste nombre es el que se mostrará en la plataforma.",
|
|
@@ -45,6 +45,8 @@ export class Bank {
|
|
|
45
45
|
|
|
46
46
|
@Column({
|
|
47
47
|
default: 1,
|
|
48
|
+
type: "int",
|
|
49
|
+
width: 1,
|
|
48
50
|
comment:
|
|
49
51
|
"Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
50
52
|
})
|
|
@@ -9,23 +9,30 @@ import { jsonTransformer } from "../transformers/jsonTransformer";
|
|
|
9
9
|
})
|
|
10
10
|
export class BusinessType {
|
|
11
11
|
@PrimaryGeneratedColumn({
|
|
12
|
+
type: "int",
|
|
12
13
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
13
14
|
})
|
|
14
15
|
id: number;
|
|
15
16
|
|
|
16
|
-
@Column({
|
|
17
|
+
@Column({
|
|
18
|
+
length: 50,
|
|
19
|
+
type: "varchar",
|
|
20
|
+
comment: "Nombre del tipo de negocio.",
|
|
21
|
+
})
|
|
17
22
|
name: string;
|
|
18
23
|
|
|
19
24
|
@Column({
|
|
20
25
|
type: "text",
|
|
21
26
|
nullable: true,
|
|
22
|
-
|
|
27
|
+
default: null,
|
|
23
28
|
comment: "Descripción del tipo de negocio.",
|
|
24
29
|
})
|
|
25
30
|
description: string | null;
|
|
26
31
|
|
|
27
32
|
@Column({
|
|
28
33
|
default: 1,
|
|
34
|
+
type: "int",
|
|
35
|
+
width: 1,
|
|
29
36
|
comment:
|
|
30
37
|
"Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
31
38
|
})
|
|
@@ -16,6 +16,7 @@ import { BusinessType } from "./BusinessType";
|
|
|
16
16
|
})
|
|
17
17
|
export class BusinessTypeProduct {
|
|
18
18
|
@PrimaryGeneratedColumn({
|
|
19
|
+
type: "int",
|
|
19
20
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
20
21
|
})
|
|
21
22
|
id: number;
|
|
@@ -44,12 +45,14 @@ export class BusinessTypeProduct {
|
|
|
44
45
|
type: "varchar",
|
|
45
46
|
length: 500,
|
|
46
47
|
nullable: true,
|
|
48
|
+
default: null,
|
|
47
49
|
comment: "Imagen para el tipo de comida.",
|
|
48
50
|
})
|
|
49
51
|
photo: string | null;
|
|
50
52
|
|
|
51
53
|
@Column({
|
|
52
|
-
type: "
|
|
54
|
+
type: "int",
|
|
55
|
+
width: 1,
|
|
53
56
|
default: 1,
|
|
54
57
|
comment:
|
|
55
58
|
"Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
package/src/entities/Category.ts
CHANGED
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
OneToMany,
|
|
7
7
|
PrimaryGeneratedColumn,
|
|
8
8
|
} from "typeorm";
|
|
9
|
-
import { Local } from "./Local";
|
|
10
|
-
import { Product } from "./Product";
|
|
11
9
|
import { CategoryDate, Partner, ScheduleCategory } from "..";
|
|
12
|
-
import { jsonTransformer } from "../transformers/jsonTransformer";
|
|
13
10
|
import { DateTransformer } from "../transformers/dateTransformer";
|
|
11
|
+
import { jsonTransformer } from "../transformers/jsonTransformer";
|
|
12
|
+
import { Local } from "./Local";
|
|
13
|
+
import { Product } from "./Product";
|
|
14
14
|
|
|
15
15
|
@Entity({
|
|
16
16
|
comment:
|
|
@@ -18,6 +18,7 @@ import { DateTransformer } from "../transformers/dateTransformer";
|
|
|
18
18
|
})
|
|
19
19
|
export class Category {
|
|
20
20
|
@PrimaryGeneratedColumn({
|
|
21
|
+
type: "int",
|
|
21
22
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
23
|
})
|
|
23
24
|
id: number;
|
|
@@ -29,14 +30,19 @@ export class Category {
|
|
|
29
30
|
@JoinColumn({ name: "local" })
|
|
30
31
|
local: Local;
|
|
31
32
|
|
|
32
|
-
@Column({ length: 30, comment: "Nombre de la categoría." })
|
|
33
|
+
@Column({ length: 30, type: "varchar", comment: "Nombre de la categoría." })
|
|
33
34
|
name: string;
|
|
34
35
|
|
|
35
|
-
@Column({
|
|
36
|
+
@Column({
|
|
37
|
+
type: "int",
|
|
38
|
+
comment: "¿En qué posición se va a mostrar esta categoría?",
|
|
39
|
+
})
|
|
36
40
|
position: number;
|
|
37
41
|
|
|
38
42
|
@Column({
|
|
39
43
|
nullable: true,
|
|
44
|
+
type: "int",
|
|
45
|
+
width: 1,
|
|
40
46
|
comment:
|
|
41
47
|
"Campo para saber el tipo de horario que se va a mostrar en la aplicación:\n 1. Días. \n2. Fecha específica.",
|
|
42
48
|
default: null,
|
|
@@ -45,6 +51,8 @@ export class Category {
|
|
|
45
51
|
|
|
46
52
|
@Column({
|
|
47
53
|
nullable: true,
|
|
54
|
+
type: "int",
|
|
55
|
+
width: 1,
|
|
48
56
|
comment:
|
|
49
57
|
"Columna para saber el tipo de horario qué el usuario quiere para el elemento: \n1. Mostrar (Show). \n2. Ocultar (Hide)",
|
|
50
58
|
default: null,
|
|
@@ -60,18 +68,19 @@ export class Category {
|
|
|
60
68
|
|
|
61
69
|
@Column({
|
|
62
70
|
type: "datetime",
|
|
63
|
-
nullable: true,
|
|
64
71
|
transformer: new DateTransformer(),
|
|
65
72
|
comment: "Fecha de creación del registro.",
|
|
66
73
|
})
|
|
67
|
-
created: Date
|
|
74
|
+
created: Date;
|
|
68
75
|
|
|
69
76
|
@Column({
|
|
70
77
|
type: "datetime",
|
|
78
|
+
nullable: true,
|
|
79
|
+
default: null,
|
|
71
80
|
transformer: new DateTransformer(),
|
|
72
81
|
comment: "Fecha de actualización del registro.",
|
|
73
82
|
})
|
|
74
|
-
updated: Date;
|
|
83
|
+
updated: Date | null;
|
|
75
84
|
|
|
76
85
|
@ManyToOne(() => Partner, (partner) => partner.partners_category_update_by, {
|
|
77
86
|
onDelete: "RESTRICT",
|
|
@@ -84,6 +93,7 @@ export class Category {
|
|
|
84
93
|
@Column({
|
|
85
94
|
type: "mediumtext",
|
|
86
95
|
nullable: true,
|
|
96
|
+
default: null,
|
|
87
97
|
transformer: jsonTransformer,
|
|
88
98
|
comment:
|
|
89
99
|
"Valores qué se van a mostrar mientras se aprueban los nuevos cambios.",
|
|
@@ -92,6 +102,8 @@ export class Category {
|
|
|
92
102
|
|
|
93
103
|
@Column({
|
|
94
104
|
default: 1,
|
|
105
|
+
type: "int",
|
|
106
|
+
width: 1,
|
|
95
107
|
comment:
|
|
96
108
|
"Estado en el que está el elemento: \n0. Inactivo. \n1. Activo. \n2. Eliminado.",
|
|
97
109
|
})
|
|
@@ -99,6 +111,8 @@ export class Category {
|
|
|
99
111
|
|
|
100
112
|
@Column({
|
|
101
113
|
default: 1,
|
|
114
|
+
type: "int",
|
|
115
|
+
width: 1,
|
|
102
116
|
comment:
|
|
103
117
|
"Estado en el que se encuentra la revisión de los cambios: \n1. En revisión. \n2. Rechazado.",
|
|
104
118
|
})
|
|
@@ -106,6 +120,8 @@ export class Category {
|
|
|
106
120
|
|
|
107
121
|
@Column({
|
|
108
122
|
nullable: true,
|
|
123
|
+
default: null,
|
|
124
|
+
type: "varchar",
|
|
109
125
|
length: 600,
|
|
110
126
|
comment: "Comentario del revisor al rechazar una categoría (master).",
|
|
111
127
|
})
|
|
@@ -12,6 +12,7 @@ import { Category } from "./Category";
|
|
|
12
12
|
})
|
|
13
13
|
export class CategoryDate {
|
|
14
14
|
@PrimaryGeneratedColumn({
|
|
15
|
+
type: "int",
|
|
15
16
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
16
17
|
})
|
|
17
18
|
id: number;
|
|
@@ -29,9 +30,9 @@ export class CategoryDate {
|
|
|
29
30
|
})
|
|
30
31
|
date: Date;
|
|
31
32
|
|
|
32
|
-
@Column({ comment: "Hora de inicio." })
|
|
33
|
+
@Column({ type: "varchar", length: 5, comment: "Hora de inicio." })
|
|
33
34
|
start_time: string;
|
|
34
35
|
|
|
35
|
-
@Column({ comment: "Hora de finalización." })
|
|
36
|
+
@Column({ type: "varchar", length: 5, comment: "Hora de finalización." })
|
|
36
37
|
end_time: string;
|
|
37
38
|
}
|
|
@@ -14,6 +14,7 @@ import { Day } from "./Day";
|
|
|
14
14
|
})
|
|
15
15
|
export class ScheduleCategory {
|
|
16
16
|
@PrimaryGeneratedColumn({
|
|
17
|
+
type: "int",
|
|
17
18
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
18
19
|
})
|
|
19
20
|
id: number;
|
|
@@ -32,9 +33,9 @@ export class ScheduleCategory {
|
|
|
32
33
|
@JoinColumn({ name: "day" })
|
|
33
34
|
day: Day;
|
|
34
35
|
|
|
35
|
-
@Column({ comment: "Hora de inicio." })
|
|
36
|
+
@Column({ type: "varchar", length: 5, comment: "Hora de inicio." })
|
|
36
37
|
start_time: string;
|
|
37
38
|
|
|
38
|
-
@Column({ comment: "Hora de finalización." })
|
|
39
|
+
@Column({ type: "varchar", length: 5, comment: "Hora de finalización." })
|
|
39
40
|
end_time: string;
|
|
40
41
|
}
|
package/src/entities/City.ts
CHANGED
|
@@ -5,58 +5,61 @@ import {
|
|
|
5
5
|
ManyToOne,
|
|
6
6
|
OneToMany,
|
|
7
7
|
PrimaryGeneratedColumn,
|
|
8
|
-
} from
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { Partner } from
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
@Entity({ comment:
|
|
8
|
+
} from "typeorm";
|
|
9
|
+
import { Square } from "..";
|
|
10
|
+
import { Company } from "./Company";
|
|
11
|
+
import { Local } from "./Local";
|
|
12
|
+
import { Master } from "./Master";
|
|
13
|
+
import { Partner } from "./Partner";
|
|
14
|
+
import { Region } from "./Region";
|
|
15
|
+
import { User } from "./User";
|
|
16
|
+
import { UserAddress } from "./UserAddress";
|
|
17
|
+
|
|
18
|
+
@Entity({ comment: "Ciudades donde está visible la plataforma." })
|
|
19
19
|
export class City {
|
|
20
20
|
@PrimaryGeneratedColumn({
|
|
21
|
-
|
|
21
|
+
type: "int",
|
|
22
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
23
|
})
|
|
23
|
-
id: number
|
|
24
|
+
id: number;
|
|
24
25
|
|
|
25
26
|
@ManyToOne(() => Region, (region) => region.cities, {
|
|
26
|
-
onDelete:
|
|
27
|
-
onUpdate:
|
|
27
|
+
onDelete: "RESTRICT",
|
|
28
|
+
onUpdate: "RESTRICT",
|
|
28
29
|
})
|
|
29
|
-
@JoinColumn({ name:
|
|
30
|
-
region: Region
|
|
30
|
+
@JoinColumn({ name: "region" })
|
|
31
|
+
region: Region;
|
|
31
32
|
|
|
32
|
-
@Column({ length: 50, comment:
|
|
33
|
-
name: string
|
|
33
|
+
@Column({ length: 50, type: "varchar", comment: "Nombre de la ciudad." })
|
|
34
|
+
name: string;
|
|
34
35
|
|
|
35
36
|
@Column({
|
|
36
37
|
default: 1,
|
|
38
|
+
type: "int",
|
|
39
|
+
width: 1,
|
|
37
40
|
comment:
|
|
38
|
-
|
|
41
|
+
"Estado de la ciudad, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
39
42
|
})
|
|
40
|
-
status: number
|
|
43
|
+
status: number;
|
|
41
44
|
|
|
42
45
|
@OneToMany(() => User, (user) => user.city)
|
|
43
|
-
users: User[]
|
|
46
|
+
users: User[];
|
|
44
47
|
|
|
45
48
|
@OneToMany(() => Company, (Company) => Company.city)
|
|
46
|
-
companies: Company[]
|
|
49
|
+
companies: Company[];
|
|
47
50
|
|
|
48
51
|
@OneToMany(() => Local, (local) => local.city)
|
|
49
|
-
locals: Local[]
|
|
52
|
+
locals: Local[];
|
|
50
53
|
|
|
51
54
|
@OneToMany(() => Partner, (partner) => partner.city)
|
|
52
|
-
partners: Partner[]
|
|
55
|
+
partners: Partner[];
|
|
53
56
|
|
|
54
57
|
@OneToMany(() => Master, (master) => master.city)
|
|
55
|
-
masters: Master[]
|
|
58
|
+
masters: Master[];
|
|
56
59
|
|
|
57
60
|
@OneToMany(() => UserAddress, (userAddress) => userAddress.city)
|
|
58
|
-
user_addresses: UserAddress[]
|
|
61
|
+
user_addresses: UserAddress[];
|
|
59
62
|
|
|
60
63
|
@OneToMany(() => Square, (square) => square.city)
|
|
61
|
-
squares: Square[]
|
|
64
|
+
squares: Square[];
|
|
62
65
|
}
|