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
package/dist/entities/Product.js
CHANGED
|
@@ -11,19 +11,20 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Product = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
|
+
var __1 = require("..");
|
|
15
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
14
17
|
var Category_1 = require("./Category");
|
|
15
18
|
var ProductGroup_1 = require("./ProductGroup");
|
|
16
19
|
var ProductIngredient_1 = require("./ProductIngredient");
|
|
17
20
|
var RequestProduct_1 = require("./RequestProduct");
|
|
18
21
|
var User_1 = require("./User");
|
|
19
|
-
var __1 = require("..");
|
|
20
|
-
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
21
|
-
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
22
22
|
var Product = /** @class */ (function () {
|
|
23
23
|
function Product() {
|
|
24
24
|
}
|
|
25
25
|
__decorate([
|
|
26
26
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
27
|
+
type: "int",
|
|
27
28
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
28
29
|
}),
|
|
29
30
|
__metadata("design:type", Number)
|
|
@@ -37,23 +38,26 @@ var Product = /** @class */ (function () {
|
|
|
37
38
|
__metadata("design:type", Category_1.Category)
|
|
38
39
|
], Product.prototype, "category", void 0);
|
|
39
40
|
__decorate([
|
|
40
|
-
(0, typeorm_1.Column)({ length: 50, comment: "Nombre del producto." }),
|
|
41
|
+
(0, typeorm_1.Column)({ length: 50, type: "varchar", comment: "Nombre del producto." }),
|
|
41
42
|
__metadata("design:type", String)
|
|
42
43
|
], Product.prototype, "name", void 0);
|
|
43
44
|
__decorate([
|
|
44
45
|
(0, typeorm_1.Column)({
|
|
45
46
|
length: 400,
|
|
47
|
+
type: "varchar",
|
|
46
48
|
comment: "Detalles del producto. \n\n ¿Qué contiene?",
|
|
47
49
|
}),
|
|
48
50
|
__metadata("design:type", String)
|
|
49
51
|
], Product.prototype, "details", void 0);
|
|
50
52
|
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({ length: 20, comment: "Precio del producto." }),
|
|
53
|
+
(0, typeorm_1.Column)({ length: 20, type: "varchar", comment: "Precio del producto." }),
|
|
52
54
|
__metadata("design:type", String)
|
|
53
55
|
], Product.prototype, "price", void 0);
|
|
54
56
|
__decorate([
|
|
55
57
|
(0, typeorm_1.Column)({
|
|
56
58
|
default: 0,
|
|
59
|
+
type: "int",
|
|
60
|
+
width: 1,
|
|
57
61
|
comment: "¿El producto cuenta con restricción de edad?\r\n1. Cuenta con restricción.\r\n0. No cuenta con restricción.",
|
|
58
62
|
}),
|
|
59
63
|
__metadata("design:type", Number)
|
|
@@ -61,18 +65,24 @@ var Product = /** @class */ (function () {
|
|
|
61
65
|
__decorate([
|
|
62
66
|
(0, typeorm_1.Column)({
|
|
63
67
|
default: 0,
|
|
68
|
+
type: "int",
|
|
69
|
+
width: 1,
|
|
64
70
|
comment: "¿El producto es un combo?\r\n1. Combo.\r\n0. No es un combo.",
|
|
65
71
|
}),
|
|
66
72
|
__metadata("design:type", Number)
|
|
67
73
|
], Product.prototype, "combo", void 0);
|
|
68
74
|
__decorate([
|
|
69
|
-
(0, typeorm_1.Column)({
|
|
75
|
+
(0, typeorm_1.Column)({
|
|
76
|
+
type: "int",
|
|
77
|
+
comment: "En qué posición se va a mostrar el producto.",
|
|
78
|
+
}),
|
|
70
79
|
__metadata("design:type", Number)
|
|
71
80
|
], Product.prototype, "position", void 0);
|
|
72
81
|
__decorate([
|
|
73
82
|
(0, typeorm_1.Column)({
|
|
74
83
|
type: "text",
|
|
75
84
|
nullable: true,
|
|
85
|
+
default: null,
|
|
76
86
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
77
87
|
comment: "Campo de tipo json para guardar el id y la url de la foto",
|
|
78
88
|
}),
|
|
@@ -81,7 +91,9 @@ var Product = /** @class */ (function () {
|
|
|
81
91
|
__decorate([
|
|
82
92
|
(0, typeorm_1.Column)({
|
|
83
93
|
type: "mediumtext",
|
|
94
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
84
95
|
nullable: true,
|
|
96
|
+
default: null,
|
|
85
97
|
comment: "Campo de tipo JSON donde se guarda información necesaria para el registro.",
|
|
86
98
|
}),
|
|
87
99
|
__metadata("design:type", Object)
|
|
@@ -89,6 +101,8 @@ var Product = /** @class */ (function () {
|
|
|
89
101
|
__decorate([
|
|
90
102
|
(0, typeorm_1.Column)({
|
|
91
103
|
nullable: true,
|
|
104
|
+
type: "int",
|
|
105
|
+
width: 1,
|
|
92
106
|
comment: "Campo para saber el tipo de horario que se va a mostrar en la aplicación:\n 1. Días. \n2. Fecha específica.",
|
|
93
107
|
default: null,
|
|
94
108
|
}),
|
|
@@ -113,6 +127,8 @@ var Product = /** @class */ (function () {
|
|
|
113
127
|
__decorate([
|
|
114
128
|
(0, typeorm_1.Column)({
|
|
115
129
|
type: "datetime",
|
|
130
|
+
nullable: true,
|
|
131
|
+
default: null,
|
|
116
132
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
117
133
|
comment: "Fecha de actualización del registro.",
|
|
118
134
|
}),
|
|
@@ -122,6 +138,7 @@ var Product = /** @class */ (function () {
|
|
|
122
138
|
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.partners_update_by; }, {
|
|
123
139
|
onDelete: "RESTRICT",
|
|
124
140
|
onUpdate: "NO ACTION",
|
|
141
|
+
nullable: true,
|
|
125
142
|
}),
|
|
126
143
|
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
127
144
|
__metadata("design:type", __1.Partner)
|
|
@@ -130,6 +147,7 @@ var Product = /** @class */ (function () {
|
|
|
130
147
|
(0, typeorm_1.Column)({
|
|
131
148
|
type: "mediumtext",
|
|
132
149
|
nullable: true,
|
|
150
|
+
default: null,
|
|
133
151
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
134
152
|
comment: "Valores qué se van a mostrar mientras se aprueban los nuevos cambios.",
|
|
135
153
|
}),
|
|
@@ -138,6 +156,8 @@ var Product = /** @class */ (function () {
|
|
|
138
156
|
__decorate([
|
|
139
157
|
(0, typeorm_1.Column)({
|
|
140
158
|
default: 1,
|
|
159
|
+
type: "int",
|
|
160
|
+
width: 1,
|
|
141
161
|
comment: "Estado en el que está el elemento: \n0. Inactivo. \n1. Activo. \n2. Eliminado.",
|
|
142
162
|
}),
|
|
143
163
|
__metadata("design:type", Number)
|
|
@@ -145,6 +165,8 @@ var Product = /** @class */ (function () {
|
|
|
145
165
|
__decorate([
|
|
146
166
|
(0, typeorm_1.Column)({
|
|
147
167
|
default: 1,
|
|
168
|
+
type: "int",
|
|
169
|
+
width: 1,
|
|
148
170
|
comment: "Estado en el que se encuentra la revisión de los cambios: \n1. En revisión. \n2. Rechazado.",
|
|
149
171
|
}),
|
|
150
172
|
__metadata("design:type", Number)
|
|
@@ -152,6 +174,8 @@ var Product = /** @class */ (function () {
|
|
|
152
174
|
__decorate([
|
|
153
175
|
(0, typeorm_1.Column)({
|
|
154
176
|
nullable: true,
|
|
177
|
+
default: null,
|
|
178
|
+
type: "varchar",
|
|
155
179
|
length: 600,
|
|
156
180
|
comment: "Comentarios u observaciones de la revisión.",
|
|
157
181
|
}),
|
|
@@ -17,6 +17,7 @@ var ProductDate = /** @class */ (function () {
|
|
|
17
17
|
}
|
|
18
18
|
__decorate([
|
|
19
19
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
+
type: "int",
|
|
20
21
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
21
22
|
}),
|
|
22
23
|
__metadata("design:type", Number)
|
|
@@ -37,11 +38,11 @@ var ProductDate = /** @class */ (function () {
|
|
|
37
38
|
__metadata("design:type", Date)
|
|
38
39
|
], ProductDate.prototype, "date", void 0);
|
|
39
40
|
__decorate([
|
|
40
|
-
(0, typeorm_1.Column)({ comment: "Hora de inicio." }),
|
|
41
|
+
(0, typeorm_1.Column)({ type: "varchar", comment: "Hora de inicio." }),
|
|
41
42
|
__metadata("design:type", String)
|
|
42
43
|
], ProductDate.prototype, "start_time", void 0);
|
|
43
44
|
__decorate([
|
|
44
|
-
(0, typeorm_1.Column)({ comment: "Hora de finalización." }),
|
|
45
|
+
(0, typeorm_1.Column)({ type: "varchar", comment: "Hora de finalización." }),
|
|
45
46
|
__metadata("design:type", String)
|
|
46
47
|
], ProductDate.prototype, "end_time", void 0);
|
|
47
48
|
ProductDate = __decorate([
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Product } from
|
|
2
|
-
import { ProductTopping } from
|
|
3
|
-
import { ProductGroupComplement } from
|
|
1
|
+
import { Product } from "./Product";
|
|
2
|
+
import { ProductTopping } from "./ProductTopping";
|
|
3
|
+
import { ProductGroupComplement } from "./productGroupComplement";
|
|
4
4
|
export declare class ProductGroup {
|
|
5
5
|
id: number;
|
|
6
6
|
product: Product;
|
|
@@ -19,53 +19,63 @@ var ProductGroup = /** @class */ (function () {
|
|
|
19
19
|
}
|
|
20
20
|
__decorate([
|
|
21
21
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
22
|
-
|
|
22
|
+
type: "int",
|
|
23
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
23
24
|
}),
|
|
24
25
|
__metadata("design:type", Number)
|
|
25
26
|
], ProductGroup.prototype, "id", void 0);
|
|
26
27
|
__decorate([
|
|
27
28
|
(0, typeorm_1.ManyToOne)(function () { return Product_1.Product; }, function (product) { return product.product_groups; }, {
|
|
28
|
-
onDelete:
|
|
29
|
-
onUpdate:
|
|
29
|
+
onDelete: "CASCADE",
|
|
30
|
+
onUpdate: "NO ACTION",
|
|
30
31
|
}),
|
|
31
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
32
|
+
(0, typeorm_1.JoinColumn)({ name: "product" }),
|
|
32
33
|
__metadata("design:type", Product_1.Product)
|
|
33
34
|
], ProductGroup.prototype, "product", void 0);
|
|
34
35
|
__decorate([
|
|
35
36
|
(0, typeorm_1.ManyToOne)(function () { return ProductTopping_1.ProductTopping; }, function (productTopping) { return productTopping.product_groups; }, {
|
|
36
|
-
onDelete:
|
|
37
|
-
onUpdate:
|
|
37
|
+
onDelete: "CASCADE",
|
|
38
|
+
onUpdate: "NO ACTION",
|
|
38
39
|
}),
|
|
39
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: "topping" }),
|
|
40
41
|
__metadata("design:type", ProductTopping_1.ProductTopping)
|
|
41
42
|
], ProductGroup.prototype, "topping", void 0);
|
|
42
43
|
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ length: 30, comment:
|
|
44
|
+
(0, typeorm_1.Column)({ length: 30, type: "varchar", comment: "Nombre del grupo." }),
|
|
44
45
|
__metadata("design:type", String)
|
|
45
46
|
], ProductGroup.prototype, "name", void 0);
|
|
46
47
|
__decorate([
|
|
47
48
|
(0, typeorm_1.Column)({
|
|
48
49
|
default: 1,
|
|
49
|
-
|
|
50
|
+
type: "int",
|
|
51
|
+
width: 1,
|
|
52
|
+
comment: "El `type` se refiere a si el grupo es opcional o si es requerido:\r\n1. Opcional.\r\n2. Requerido.",
|
|
50
53
|
}),
|
|
51
54
|
__metadata("design:type", Number)
|
|
52
55
|
], ProductGroup.prototype, "type", void 0);
|
|
53
56
|
__decorate([
|
|
54
57
|
(0, typeorm_1.Column)({
|
|
55
58
|
default: 0,
|
|
56
|
-
|
|
59
|
+
type: "int",
|
|
60
|
+
width: 1,
|
|
61
|
+
comment: "Cantidad mínima que el usuario puede agregar para el grupo.\r\n\r\n- Cuando `type` es `Requerido (2)` entonces la cantidad mínima debería ser 1.\r\n\r\n- Cuando `type` es `Opcional (1)` entonces la cantidad puede ser 0.",
|
|
57
62
|
}),
|
|
58
63
|
__metadata("design:type", Number)
|
|
59
64
|
], ProductGroup.prototype, "minimum_quantity", void 0);
|
|
60
65
|
__decorate([
|
|
61
66
|
(0, typeorm_1.Column)({
|
|
62
67
|
default: 0,
|
|
63
|
-
|
|
68
|
+
type: "int",
|
|
69
|
+
width: 1,
|
|
70
|
+
comment: "Cantidad máxima que el usuario puede agregar para el grupo.",
|
|
64
71
|
}),
|
|
65
72
|
__metadata("design:type", Number)
|
|
66
73
|
], ProductGroup.prototype, "maximum_quantity", void 0);
|
|
67
74
|
__decorate([
|
|
68
|
-
(0, typeorm_1.Column)({
|
|
75
|
+
(0, typeorm_1.Column)({
|
|
76
|
+
type: "int",
|
|
77
|
+
comment: "El orden en que aparece los grupos en el producto.",
|
|
78
|
+
}),
|
|
69
79
|
__metadata("design:type", Number)
|
|
70
80
|
], ProductGroup.prototype, "position", void 0);
|
|
71
81
|
__decorate([
|
|
@@ -73,8 +83,8 @@ var ProductGroup = /** @class */ (function () {
|
|
|
73
83
|
__metadata("design:type", Array)
|
|
74
84
|
], ProductGroup.prototype, "groups_complement", void 0);
|
|
75
85
|
ProductGroup = __decorate([
|
|
76
|
-
(0, typeorm_1.Entity)(
|
|
77
|
-
comment:
|
|
86
|
+
(0, typeorm_1.Entity)("product_group", {
|
|
87
|
+
comment: "Grupos para agregar al topping por producto.\r\n\r\nEstos elementos que se agreguen acá estarán visibles para los usuarios en la APP.",
|
|
78
88
|
})
|
|
79
89
|
], ProductGroup);
|
|
80
90
|
return ProductGroup;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Product } from
|
|
2
|
-
import { TypeMeasureIngredient } from
|
|
1
|
+
import { Product } from "./Product";
|
|
2
|
+
import { TypeMeasureIngredient } from "./TypeMeasureIngredient";
|
|
3
3
|
export declare class ProductIngredient {
|
|
4
4
|
id: number;
|
|
5
5
|
product: Product;
|
|
@@ -18,48 +18,51 @@ var ProductIngredient = /** @class */ (function () {
|
|
|
18
18
|
}
|
|
19
19
|
__decorate([
|
|
20
20
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
-
|
|
21
|
+
type: "int",
|
|
22
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
23
|
}),
|
|
23
24
|
__metadata("design:type", Number)
|
|
24
25
|
], ProductIngredient.prototype, "id", void 0);
|
|
25
26
|
__decorate([
|
|
26
27
|
(0, typeorm_1.ManyToOne)(function () { return Product_1.Product; }, function (product) { return product.product_ingredients; }, {
|
|
27
|
-
onDelete:
|
|
28
|
-
onUpdate:
|
|
28
|
+
onDelete: "CASCADE",
|
|
29
|
+
onUpdate: "NO ACTION",
|
|
29
30
|
}),
|
|
30
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
31
|
+
(0, typeorm_1.JoinColumn)({ name: "product" }),
|
|
31
32
|
__metadata("design:type", Product_1.Product)
|
|
32
33
|
], ProductIngredient.prototype, "product", void 0);
|
|
33
34
|
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ length: 30, comment:
|
|
35
|
+
(0, typeorm_1.Column)({ length: 30, type: "varchar", comment: "Nombre del ingrediente." }),
|
|
35
36
|
__metadata("design:type", String)
|
|
36
37
|
], ProductIngredient.prototype, "name", void 0);
|
|
37
38
|
__decorate([
|
|
38
39
|
(0, typeorm_1.ManyToOne)(function () { return TypeMeasureIngredient_1.TypeMeasureIngredient; }, function (typeMeasureIngredient) { return typeMeasureIngredient.type_measure_ingredients; }, {
|
|
39
|
-
onDelete:
|
|
40
|
-
onUpdate:
|
|
40
|
+
onDelete: "CASCADE",
|
|
41
|
+
onUpdate: "NO ACTION",
|
|
41
42
|
}),
|
|
42
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
43
|
+
(0, typeorm_1.JoinColumn)({ name: "type_measure_ingredient" }),
|
|
43
44
|
__metadata("design:type", TypeMeasureIngredient_1.TypeMeasureIngredient)
|
|
44
45
|
], ProductIngredient.prototype, "type_measure_ingredient", void 0);
|
|
45
46
|
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({ comment:
|
|
47
|
+
(0, typeorm_1.Column)({ type: "int", comment: "Cantidad del ingrediente." }),
|
|
47
48
|
__metadata("design:type", Number)
|
|
48
49
|
], ProductIngredient.prototype, "quantity", void 0);
|
|
49
50
|
__decorate([
|
|
50
|
-
(0, typeorm_1.Column)({ type:
|
|
51
|
+
(0, typeorm_1.Column)({ type: "datetime", comment: "Fecha de creación del registro." }),
|
|
51
52
|
__metadata("design:type", Date)
|
|
52
53
|
], ProductIngredient.prototype, "created", void 0);
|
|
53
54
|
__decorate([
|
|
54
55
|
(0, typeorm_1.Column)({
|
|
55
56
|
default: 1,
|
|
56
|
-
|
|
57
|
+
type: "int",
|
|
58
|
+
width: 1,
|
|
59
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en los reportes de inventario.\r\n0. Inactivo: No será visible en los reportes de inventario.",
|
|
57
60
|
}),
|
|
58
61
|
__metadata("design:type", Number)
|
|
59
62
|
], ProductIngredient.prototype, "status", void 0);
|
|
60
63
|
ProductIngredient = __decorate([
|
|
61
|
-
(0, typeorm_1.Entity)(
|
|
62
|
-
comment:
|
|
64
|
+
(0, typeorm_1.Entity)("product_ingredient", {
|
|
65
|
+
comment: "Ingredientes que tendrá un producto específico. Esto se hace para guardar la información del inventario que se tiene y el que se gasta diario, esto genera un reporte donde el cliente puede ver qué cosas fueron usadas.",
|
|
63
66
|
})
|
|
64
67
|
], ProductIngredient);
|
|
65
68
|
return ProductIngredient;
|
|
@@ -18,6 +18,7 @@ var ProductSchedule = /** @class */ (function () {
|
|
|
18
18
|
}
|
|
19
19
|
__decorate([
|
|
20
20
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
+
type: "int",
|
|
21
22
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
23
|
}),
|
|
23
24
|
__metadata("design:type", Number)
|
|
@@ -39,11 +40,11 @@ var ProductSchedule = /** @class */ (function () {
|
|
|
39
40
|
__metadata("design:type", Day_1.Day)
|
|
40
41
|
], ProductSchedule.prototype, "day", void 0);
|
|
41
42
|
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)({ comment: "Hora de inicio." }),
|
|
43
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 5, comment: "Hora de inicio." }),
|
|
43
44
|
__metadata("design:type", String)
|
|
44
45
|
], ProductSchedule.prototype, "start_time", void 0);
|
|
45
46
|
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({ comment: "Hora de finalización." }),
|
|
47
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 5, comment: "Hora de finalización." }),
|
|
47
48
|
__metadata("design:type", String)
|
|
48
49
|
], ProductSchedule.prototype, "end_time", void 0);
|
|
49
50
|
ProductSchedule = __decorate([
|
|
@@ -18,6 +18,7 @@ var ProductTopping = /** @class */ (function () {
|
|
|
18
18
|
}
|
|
19
19
|
__decorate([
|
|
20
20
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
+
type: "int",
|
|
21
22
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
23
|
}),
|
|
23
24
|
__metadata("design:type", Number)
|
|
@@ -34,6 +35,7 @@ var ProductTopping = /** @class */ (function () {
|
|
|
34
35
|
__decorate([
|
|
35
36
|
(0, typeorm_1.Column)({
|
|
36
37
|
length: 50,
|
|
38
|
+
type: "varchar",
|
|
37
39
|
comment: "El `name` se refiere al id de los archivos de lenguaje que está en `locales` del proyecto. \n\nEsto se hace para qué sirva el multilenguaje en el proyecto. \n\nCabe recalcar qué las empresas pueden crear sus propios toppings, entonces no pasa nada el lenguaje en el que ellos lo escriban.",
|
|
38
40
|
}),
|
|
39
41
|
__metadata("design:type", String)
|
|
@@ -41,6 +43,8 @@ var ProductTopping = /** @class */ (function () {
|
|
|
41
43
|
__decorate([
|
|
42
44
|
(0, typeorm_1.Column)({
|
|
43
45
|
default: 1,
|
|
46
|
+
type: "int",
|
|
47
|
+
width: 1,
|
|
44
48
|
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en los reportes de inventario.\r\n0. Inactivo: No será visible en los reportes de inventario.",
|
|
45
49
|
}),
|
|
46
50
|
__metadata("design:type", Number)
|
package/dist/entities/Region.js
CHANGED
|
@@ -11,36 +11,40 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Region = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
|
-
var Country_1 = require("./Country");
|
|
15
14
|
var City_1 = require("./City");
|
|
15
|
+
var Country_1 = require("./Country");
|
|
16
16
|
var Region = /** @class */ (function () {
|
|
17
17
|
function Region() {
|
|
18
18
|
}
|
|
19
19
|
__decorate([
|
|
20
20
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
-
|
|
21
|
+
type: "int",
|
|
22
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
23
|
}),
|
|
23
24
|
__metadata("design:type", Number)
|
|
24
25
|
], Region.prototype, "id", void 0);
|
|
25
26
|
__decorate([
|
|
26
27
|
(0, typeorm_1.ManyToOne)(function () { return Country_1.Country; }, function (country) { return country.regions; }, {
|
|
27
|
-
onDelete:
|
|
28
|
-
onUpdate:
|
|
28
|
+
onDelete: "RESTRICT",
|
|
29
|
+
onUpdate: "NO ACTION",
|
|
29
30
|
}),
|
|
30
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
31
|
+
(0, typeorm_1.JoinColumn)({ name: "country" }),
|
|
31
32
|
__metadata("design:type", Country_1.Country)
|
|
32
33
|
], Region.prototype, "country", void 0);
|
|
33
34
|
__decorate([
|
|
34
35
|
(0, typeorm_1.Column)({
|
|
35
36
|
length: 50,
|
|
36
|
-
|
|
37
|
+
type: "varchar",
|
|
38
|
+
comment: "Nombre de la región/departamento/estado.\r\n\r\nID/KEY de la variable que se encuentra en los archivos `locales` para el multilenguaje.",
|
|
37
39
|
}),
|
|
38
40
|
__metadata("design:type", String)
|
|
39
41
|
], Region.prototype, "name", void 0);
|
|
40
42
|
__decorate([
|
|
41
43
|
(0, typeorm_1.Column)({
|
|
42
44
|
default: 1,
|
|
43
|
-
|
|
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.",
|
|
44
48
|
}),
|
|
45
49
|
__metadata("design:type", Number)
|
|
46
50
|
], Region.prototype, "status", void 0);
|
|
@@ -50,7 +54,7 @@ var Region = /** @class */ (function () {
|
|
|
50
54
|
], Region.prototype, "cities", void 0);
|
|
51
55
|
Region = __decorate([
|
|
52
56
|
(0, typeorm_1.Entity)({
|
|
53
|
-
comment:
|
|
57
|
+
comment: "Regiones/departamentos donde estará visible la plataforma.",
|
|
54
58
|
})
|
|
55
59
|
], Region);
|
|
56
60
|
return Region;
|
package/dist/entities/Request.js
CHANGED
|
@@ -21,6 +21,7 @@ var Request = /** @class */ (function () {
|
|
|
21
21
|
}
|
|
22
22
|
__decorate([
|
|
23
23
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
24
|
+
type: "int",
|
|
24
25
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
25
26
|
}),
|
|
26
27
|
__metadata("design:type", Number)
|
|
@@ -29,6 +30,7 @@ var Request = /** @class */ (function () {
|
|
|
29
30
|
(0, typeorm_1.Column)({
|
|
30
31
|
length: 50,
|
|
31
32
|
unique: true,
|
|
33
|
+
type: "varchar",
|
|
32
34
|
comment: "Código único de cada pedido.\r\nEste código servirá para filtrar por pedidos en la plataforma terminal, y si se va a pagar en efectivo, entonces puede dictar ese número o generar un código QR para leer y traer la información.",
|
|
33
35
|
}),
|
|
34
36
|
__metadata("design:type", String)
|
|
@@ -54,6 +56,8 @@ var Request = /** @class */ (function () {
|
|
|
54
56
|
__decorate([
|
|
55
57
|
(0, typeorm_1.Column)({
|
|
56
58
|
default: 1,
|
|
59
|
+
type: "int",
|
|
60
|
+
width: 1,
|
|
57
61
|
comment: "Este campo hace referencia a si el tipo es:\r\n\r\n1. Individual: Un solo usuario ordena y paga.\r\n\r\n2. Grupal: El usuario principal puede agregar a otros colaboradores para realizar un pedido grupal (a tener en cuenta que el usuario principal es el único que puede realizar el pago del pedido).",
|
|
58
62
|
}),
|
|
59
63
|
__metadata("design:type", Number)
|
|
@@ -61,20 +65,26 @@ var Request = /** @class */ (function () {
|
|
|
61
65
|
__decorate([
|
|
62
66
|
(0, typeorm_1.Column)({
|
|
63
67
|
default: 1,
|
|
68
|
+
type: "int",
|
|
69
|
+
width: 1,
|
|
64
70
|
comment: "Puedo saber si el pedido es para:\r\n1. Comer en el establecimiento.\r\n2. Recoger para llevar.\r\n3. Para llevar.",
|
|
65
71
|
}),
|
|
66
72
|
__metadata("design:type", Number)
|
|
67
73
|
], Request.prototype, "order_type", void 0);
|
|
68
74
|
__decorate([
|
|
69
75
|
(0, typeorm_1.Column)({
|
|
70
|
-
|
|
76
|
+
type: "decimal",
|
|
77
|
+
precision: 10,
|
|
78
|
+
scale: 2,
|
|
71
79
|
comment: "Costo total del pedido, aquí toca tener en cuenta los productos (request_product) que se agreguen al pedido (request) y los complementos (request_product_group_complement).",
|
|
72
80
|
}),
|
|
73
|
-
__metadata("design:type",
|
|
81
|
+
__metadata("design:type", Number)
|
|
74
82
|
], Request.prototype, "order_cost", void 0);
|
|
75
83
|
__decorate([
|
|
76
84
|
(0, typeorm_1.Column)({
|
|
77
85
|
default: 0,
|
|
86
|
+
type: "int",
|
|
87
|
+
width: 1,
|
|
78
88
|
comment: "Estado en el que se encuentra un pedido.\r\n0. En proceso: El usuario está agregando los productos del/los local/es.\r\n1. Creado: El usuario ya creó el pedido con los prductos en los/el local/es especificado/s.\r\n2. Cancelado: El usuario canceló el pedido, esto sólo se permite si aún no está pago el pedido.\r\n3. Rechazado: Si un local canceló el pedido por x circustancias. Cabe resaltar que si el pedido fue solicitado a más de un local, el estado 3 sólo se agregaría al pedido si todos los locales cancelaron (Se tiene un estado para cada local en la tabla request_local) -> Aún no se sabe si este estado va.\r\n4. Finalizado: El pedido fue entregado y también pagado. Si el pedido se realizó en varios locales, entonces sólo se pasará a Finalizado, cuando todos los locales a los que se le hizo el pedido están pagos y con los productos entregados.",
|
|
79
89
|
}),
|
|
80
90
|
__metadata("design:type", Number)
|
|
@@ -82,6 +92,7 @@ var Request = /** @class */ (function () {
|
|
|
82
92
|
__decorate([
|
|
83
93
|
(0, typeorm_1.Column)({
|
|
84
94
|
length: 400,
|
|
95
|
+
type: "varchar",
|
|
85
96
|
comment: "Los detalles que el usuario agrega al pedido, puede ser alguna sugerencia u otra cosa.",
|
|
86
97
|
}),
|
|
87
98
|
__metadata("design:type", String)
|
|
@@ -89,6 +100,7 @@ var Request = /** @class */ (function () {
|
|
|
89
100
|
__decorate([
|
|
90
101
|
(0, typeorm_1.Column)({
|
|
91
102
|
length: 400,
|
|
103
|
+
type: "varchar",
|
|
92
104
|
comment: "Comentarios del pedido, este los realiza el cliente (local).",
|
|
93
105
|
}),
|
|
94
106
|
__metadata("design:type", String)
|
|
@@ -17,12 +17,16 @@ var RequestLocal = /** @class */ (function () {
|
|
|
17
17
|
function RequestLocal() {
|
|
18
18
|
}
|
|
19
19
|
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
+
type: "int",
|
|
22
|
+
comment: "Id único de cada registro.",
|
|
23
|
+
}),
|
|
21
24
|
__metadata("design:type", Number)
|
|
22
25
|
], RequestLocal.prototype, "id", void 0);
|
|
23
26
|
__decorate([
|
|
24
27
|
(0, typeorm_1.ManyToOne)(function () { return __1.Request; }, function (request) { return request.requests_local; }, {
|
|
25
28
|
onDelete: "CASCADE",
|
|
29
|
+
onUpdate: "NO ACTION",
|
|
26
30
|
}),
|
|
27
31
|
(0, typeorm_1.JoinColumn)({ name: "request" }),
|
|
28
32
|
__metadata("design:type", __1.Request)
|
|
@@ -30,6 +34,7 @@ var RequestLocal = /** @class */ (function () {
|
|
|
30
34
|
__decorate([
|
|
31
35
|
(0, typeorm_1.ManyToOne)(function () { return __1.Local; }, function (local) { return local.requests_local; }, {
|
|
32
36
|
onDelete: "CASCADE",
|
|
37
|
+
onUpdate: "NO ACTION",
|
|
33
38
|
}),
|
|
34
39
|
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
35
40
|
__metadata("design:type", __1.Local)
|
|
@@ -37,6 +42,7 @@ var RequestLocal = /** @class */ (function () {
|
|
|
37
42
|
__decorate([
|
|
38
43
|
(0, typeorm_1.Column)({
|
|
39
44
|
length: 20,
|
|
45
|
+
type: "varchar",
|
|
40
46
|
comment: "Costo total del pedido. ",
|
|
41
47
|
}),
|
|
42
48
|
__metadata("design:type", String)
|
|
@@ -44,6 +50,8 @@ var RequestLocal = /** @class */ (function () {
|
|
|
44
50
|
__decorate([
|
|
45
51
|
(0, typeorm_1.Column)({
|
|
46
52
|
default: 1,
|
|
53
|
+
type: "int",
|
|
54
|
+
width: 1,
|
|
47
55
|
comment: "Estado en el que se encuentra un pedido.\r\n0. En proceso: El usuario está agregando los productos del/los local/es.\r\n1. Creado: El usuario ya creó el pedido con los prductos en los/el local/es especificado/s.\r\n2. Cancelado: El usuario canceló el pedido, esto sólo se permite si aún no está pago el pedido.\r\n3. Rechazado: Si un local canceló el pedido por x circustancias. Cabe resaltar que si el pedido fue solicitado a más de un local, el estado 3 sólo se agregaría al pedido si todos los locales cancelaron (Se tiene un estado para cada local en la tabla request_local) -> Aún no se sabe si este estado va.\r\n4. Finalizado: El pedido fue entregado y también pagado. Si el pedido se realizó en varios locales, entonces sólo se pasará a Finalizado, cuando todos los locales a los que se le hizo el pedido están pagos y con los productos entregados.",
|
|
48
56
|
}),
|
|
49
57
|
__metadata("design:type", Number)
|
|
@@ -53,6 +61,7 @@ var RequestLocal = /** @class */ (function () {
|
|
|
53
61
|
type: "varchar",
|
|
54
62
|
length: 4,
|
|
55
63
|
nullable: true,
|
|
64
|
+
default: null,
|
|
56
65
|
comment: "Columna para saber cuánto tiempo máximo (minutos) nos tomará en preparar los productos y sus toppings.\r\n\r\nEsta columna viene también al momento de crear.",
|
|
57
66
|
}),
|
|
58
67
|
__metadata("design:type", Object)
|
|
@@ -61,6 +70,7 @@ var RequestLocal = /** @class */ (function () {
|
|
|
61
70
|
(0, typeorm_1.Column)({
|
|
62
71
|
type: "datetime",
|
|
63
72
|
nullable: true,
|
|
73
|
+
default: null,
|
|
64
74
|
comment: "Columna donde almacenamos la fecha de actualización del registro, este campo nos sirve para saber cuánto tiempo llevamos desde qué se actualizó hasta la hora actual.",
|
|
65
75
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
66
76
|
}),
|
|
@@ -69,6 +79,8 @@ var RequestLocal = /** @class */ (function () {
|
|
|
69
79
|
__decorate([
|
|
70
80
|
(0, typeorm_1.Column)({
|
|
71
81
|
default: 1,
|
|
82
|
+
type: "int",
|
|
83
|
+
width: 1,
|
|
72
84
|
comment: "Columna para saber sí se notificó vía mensaje desde la página web - aplicación de escritorio o/y correo electrónico:\r\n1. No notificado.\r\n2. Notificado.",
|
|
73
85
|
}),
|
|
74
86
|
__metadata("design:type", Number)
|
|
@@ -17,7 +17,10 @@ var RequestLocalHistory = /** @class */ (function () {
|
|
|
17
17
|
function RequestLocalHistory() {
|
|
18
18
|
}
|
|
19
19
|
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
+
type: "int",
|
|
22
|
+
comment: "ID único de cada registro.",
|
|
23
|
+
}),
|
|
21
24
|
__metadata("design:type", Number)
|
|
22
25
|
], RequestLocalHistory.prototype, "id", void 0);
|
|
23
26
|
__decorate([
|
|
@@ -30,6 +33,8 @@ var RequestLocalHistory = /** @class */ (function () {
|
|
|
30
33
|
], RequestLocalHistory.prototype, "request_local", void 0);
|
|
31
34
|
__decorate([
|
|
32
35
|
(0, typeorm_1.Column)({
|
|
36
|
+
type: "int",
|
|
37
|
+
width: 1,
|
|
33
38
|
comment: "Estado en el que se encuentra el registro.",
|
|
34
39
|
}),
|
|
35
40
|
__metadata("design:type", Number)
|
|
@@ -37,7 +42,9 @@ var RequestLocalHistory = /** @class */ (function () {
|
|
|
37
42
|
__decorate([
|
|
38
43
|
(0, typeorm_1.Column)({
|
|
39
44
|
length: 600,
|
|
45
|
+
type: "varchar",
|
|
40
46
|
nullable: true,
|
|
47
|
+
default: null,
|
|
41
48
|
comment: "Comentarios del cambio de estado del registro.",
|
|
42
49
|
}),
|
|
43
50
|
__metadata("design:type", Object)
|