test-entity-library-asm 3.1.8 → 3.2.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/BusinessTypeProduct.d.ts +2 -2
- package/dist/entities/BusinessTypeProduct.js +15 -15
- package/dist/entities/Local.d.ts +2 -3
- package/dist/entities/Local.js +37 -10
- package/dist/entities/Master.js +4 -4
- package/dist/entities/MasterNotification.js +9 -1
- package/dist/entities/MasterPermission.d.ts +1 -1
- package/dist/entities/MasterPermission.js +17 -9
- package/dist/entities/MasterRole.d.ts +2 -2
- package/dist/entities/MasterRole.js +17 -17
- package/dist/entities/Partner.js +4 -4
- package/dist/entities/PartnerNotification.js +9 -1
- package/dist/entities/PaymentMethod.d.ts +3 -3
- package/dist/entities/PaymentMethod.js +25 -17
- package/dist/entities/Product.js +9 -1
- package/dist/entities/Request.d.ts +11 -7
- package/dist/entities/Request.js +68 -28
- package/dist/entities/Square.js +10 -2
- package/dist/entities/User.d.ts +11 -11
- package/dist/entities/User.js +52 -44
- package/package.json +1 -1
- package/src/entities/BusinessTypeProduct.ts +24 -24
- package/src/entities/Local.ts +40 -10
- package/src/entities/Master.ts +8 -9
- package/src/entities/MasterNotification.ts +9 -1
- package/src/entities/MasterPermission.ts +25 -17
- package/src/entities/MasterRole.ts +30 -27
- package/src/entities/Partner.ts +7 -4
- package/src/entities/PartnerNotification.ts +9 -1
- package/src/entities/PaymentMethod.ts +38 -30
- package/src/entities/Product.ts +9 -1
- package/src/entities/Request.ts +85 -45
- package/src/entities/Square.ts +11 -3
- package/src/entities/User.ts +93 -83
|
@@ -18,23 +18,23 @@ var BusinessTypeProduct = /** @class */ (function () {
|
|
|
18
18
|
}
|
|
19
19
|
__decorate([
|
|
20
20
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
-
comment:
|
|
21
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
22
|
}),
|
|
23
23
|
__metadata("design:type", Number)
|
|
24
24
|
], BusinessTypeProduct.prototype, "id", void 0);
|
|
25
25
|
__decorate([
|
|
26
26
|
(0, typeorm_1.ManyToOne)(function () { return BusinessType_1.BusinessType; }, function (businessType) { return businessType.business_types_product; }, {
|
|
27
|
-
onDelete:
|
|
28
|
-
onUpdate:
|
|
27
|
+
onDelete: "RESTRICT",
|
|
28
|
+
onUpdate: "NO ACTION",
|
|
29
29
|
nullable: true,
|
|
30
30
|
}),
|
|
31
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
31
|
+
(0, typeorm_1.JoinColumn)({ name: "business_type" }),
|
|
32
32
|
__metadata("design:type", BusinessType_1.BusinessType)
|
|
33
33
|
], BusinessTypeProduct.prototype, "business_type", void 0);
|
|
34
34
|
__decorate([
|
|
35
35
|
(0, typeorm_1.Column)({
|
|
36
36
|
length: 40,
|
|
37
|
-
comment:
|
|
37
|
+
comment: "ID de la variable que se encuentra en los archivos `locales` para el multilenguaje.",
|
|
38
38
|
}),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], BusinessTypeProduct.prototype, "name", void 0);
|
|
@@ -42,35 +42,35 @@ var BusinessTypeProduct = /** @class */ (function () {
|
|
|
42
42
|
(0, typeorm_1.Column)({
|
|
43
43
|
length: 500,
|
|
44
44
|
nullable: true,
|
|
45
|
-
comment:
|
|
45
|
+
comment: "Imagen para el tipo de comida.",
|
|
46
46
|
}),
|
|
47
47
|
__metadata("design:type", String)
|
|
48
48
|
], BusinessTypeProduct.prototype, "photo", void 0);
|
|
49
49
|
__decorate([
|
|
50
50
|
(0, typeorm_1.Column)({
|
|
51
51
|
default: 1,
|
|
52
|
-
comment:
|
|
52
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
53
53
|
}),
|
|
54
54
|
__metadata("design:type", Number)
|
|
55
55
|
], BusinessTypeProduct.prototype, "status", void 0);
|
|
56
56
|
__decorate([
|
|
57
|
-
(0, typeorm_1.ManyToMany)(function () { return __1.Local; }),
|
|
57
|
+
(0, typeorm_1.ManyToMany)(function () { return __1.Local; }, function (local) { return local.business_type_products; }),
|
|
58
58
|
(0, typeorm_1.JoinTable)({
|
|
59
|
-
name:
|
|
59
|
+
name: "business_type_product_local",
|
|
60
60
|
joinColumn: {
|
|
61
|
-
name:
|
|
62
|
-
referencedColumnName:
|
|
61
|
+
name: "business_type_product",
|
|
62
|
+
referencedColumnName: "id",
|
|
63
63
|
},
|
|
64
64
|
inverseJoinColumn: {
|
|
65
|
-
name:
|
|
66
|
-
referencedColumnName:
|
|
65
|
+
name: "local",
|
|
66
|
+
referencedColumnName: "id",
|
|
67
67
|
},
|
|
68
68
|
}),
|
|
69
69
|
__metadata("design:type", Array)
|
|
70
70
|
], BusinessTypeProduct.prototype, "business_type_products", void 0);
|
|
71
71
|
BusinessTypeProduct = __decorate([
|
|
72
|
-
(0, typeorm_1.Entity)(
|
|
73
|
-
comment:
|
|
72
|
+
(0, typeorm_1.Entity)("business_type_product", {
|
|
73
|
+
comment: "Tabla para agregar los productos qué el local va tener por el tipo de negocio.",
|
|
74
74
|
})
|
|
75
75
|
], BusinessTypeProduct);
|
|
76
76
|
return BusinessTypeProduct;
|
package/dist/entities/Local.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DiscountCodeUser, LocalPlan, PosSystem } from "..";
|
|
1
|
+
import { DiscountCodeUser, LocalPlan, PosSystem, Request } from "..";
|
|
2
2
|
import { BusinessTypeProduct } from "./BusinessTypeProduct";
|
|
3
3
|
import { Category } from "./Category";
|
|
4
4
|
import { City } from "./City";
|
|
@@ -6,7 +6,6 @@ import { Company } from "./Company";
|
|
|
6
6
|
import { LocalQualification } from "./LocalQualification";
|
|
7
7
|
import { Partner } from "./Partner";
|
|
8
8
|
import { PaymentMethod } from "./PaymentMethod";
|
|
9
|
-
import { Request } from "./Request";
|
|
10
9
|
import { Square } from "./Square";
|
|
11
10
|
import { User } from "./User";
|
|
12
11
|
export declare class Local {
|
|
@@ -27,10 +26,10 @@ export declare class Local {
|
|
|
27
26
|
status: number;
|
|
28
27
|
visible: number;
|
|
29
28
|
locals_partners: Partner[];
|
|
29
|
+
requests_local: Request[];
|
|
30
30
|
categories: Category[];
|
|
31
31
|
payment_methods: PaymentMethod[];
|
|
32
32
|
qualifications: LocalQualification[];
|
|
33
|
-
requests: Request[];
|
|
34
33
|
users_favorite_local: User[];
|
|
35
34
|
business_type_products: BusinessTypeProduct[];
|
|
36
35
|
discount_code_locals: DiscountCodeUser[];
|
package/dist/entities/Local.js
CHANGED
|
@@ -20,9 +20,9 @@ var Company_1 = require("./Company");
|
|
|
20
20
|
var LocalQualification_1 = require("./LocalQualification");
|
|
21
21
|
var Partner_1 = require("./Partner");
|
|
22
22
|
var PaymentMethod_1 = require("./PaymentMethod");
|
|
23
|
-
var Request_1 = require("./Request");
|
|
24
23
|
var Square_1 = require("./Square");
|
|
25
24
|
var User_1 = require("./User");
|
|
25
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
26
26
|
var Local = /** @class */ (function () {
|
|
27
27
|
function Local() {
|
|
28
28
|
}
|
|
@@ -74,11 +74,11 @@ var Local = /** @class */ (function () {
|
|
|
74
74
|
__metadata("design:type", Object)
|
|
75
75
|
], Local.prototype, "details", void 0);
|
|
76
76
|
__decorate([
|
|
77
|
-
(0, typeorm_1.Column)({ type: "datetime" }),
|
|
77
|
+
(0, typeorm_1.Column)({ type: "datetime", transformer: new dateTransformer_1.DateTransformer() }),
|
|
78
78
|
__metadata("design:type", Date)
|
|
79
79
|
], Local.prototype, "created", void 0);
|
|
80
80
|
__decorate([
|
|
81
|
-
(0, typeorm_1.Column)({ type: "datetime" }),
|
|
81
|
+
(0, typeorm_1.Column)({ type: "datetime", transformer: new dateTransformer_1.DateTransformer() }),
|
|
82
82
|
__metadata("design:type", Date)
|
|
83
83
|
], Local.prototype, "updated", void 0);
|
|
84
84
|
__decorate([
|
|
@@ -143,14 +143,37 @@ var Local = /** @class */ (function () {
|
|
|
143
143
|
}),
|
|
144
144
|
__metadata("design:type", Array)
|
|
145
145
|
], Local.prototype, "locals_partners", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, typeorm_1.ManyToMany)(function () { return __1.Request; }, function (request) { return request.requests_local; }),
|
|
148
|
+
(0, typeorm_1.JoinTable)({
|
|
149
|
+
name: "request_local",
|
|
150
|
+
joinColumn: {
|
|
151
|
+
name: "local",
|
|
152
|
+
referencedColumnName: "id",
|
|
153
|
+
},
|
|
154
|
+
inverseJoinColumn: {
|
|
155
|
+
name: "request",
|
|
156
|
+
referencedColumnName: "id",
|
|
157
|
+
},
|
|
158
|
+
}),
|
|
159
|
+
__metadata("design:type", Array)
|
|
160
|
+
], Local.prototype, "requests_local", void 0);
|
|
146
161
|
__decorate([
|
|
147
162
|
(0, typeorm_1.OneToMany)(function () { return Category_1.Category; }, function (category) { return category.local; }),
|
|
148
163
|
__metadata("design:type", Array)
|
|
149
164
|
], Local.prototype, "categories", void 0);
|
|
150
165
|
__decorate([
|
|
151
|
-
(0, typeorm_1.ManyToMany)(function () { return PaymentMethod_1.PaymentMethod; }),
|
|
166
|
+
(0, typeorm_1.ManyToMany)(function () { return PaymentMethod_1.PaymentMethod; }, function (paymentMethod) { return paymentMethod.locals; }),
|
|
152
167
|
(0, typeorm_1.JoinTable)({
|
|
153
168
|
name: "local_payment_method",
|
|
169
|
+
joinColumn: {
|
|
170
|
+
name: "local",
|
|
171
|
+
referencedColumnName: "id",
|
|
172
|
+
},
|
|
173
|
+
inverseJoinColumn: {
|
|
174
|
+
name: "payment_method",
|
|
175
|
+
referencedColumnName: "id",
|
|
176
|
+
},
|
|
154
177
|
}),
|
|
155
178
|
__metadata("design:type", Array)
|
|
156
179
|
], Local.prototype, "payment_methods", void 0);
|
|
@@ -159,18 +182,22 @@ var Local = /** @class */ (function () {
|
|
|
159
182
|
__metadata("design:type", Array)
|
|
160
183
|
], Local.prototype, "qualifications", void 0);
|
|
161
184
|
__decorate([
|
|
162
|
-
(0, typeorm_1.
|
|
163
|
-
__metadata("design:type", Array)
|
|
164
|
-
], Local.prototype, "requests", void 0);
|
|
165
|
-
__decorate([
|
|
166
|
-
(0, typeorm_1.ManyToMany)(function () { return User_1.User; }),
|
|
185
|
+
(0, typeorm_1.ManyToMany)(function () { return User_1.User; }, function (user) { return user.user_favorite_locals; }),
|
|
167
186
|
(0, typeorm_1.JoinTable)({
|
|
168
187
|
name: "user_favorite_local",
|
|
188
|
+
joinColumn: {
|
|
189
|
+
name: "local",
|
|
190
|
+
referencedColumnName: "id",
|
|
191
|
+
},
|
|
192
|
+
inverseJoinColumn: {
|
|
193
|
+
name: "user",
|
|
194
|
+
referencedColumnName: "id",
|
|
195
|
+
},
|
|
169
196
|
}),
|
|
170
197
|
__metadata("design:type", Array)
|
|
171
198
|
], Local.prototype, "users_favorite_local", void 0);
|
|
172
199
|
__decorate([
|
|
173
|
-
(0, typeorm_1.ManyToMany)(function () { return BusinessTypeProduct_1.BusinessTypeProduct; }),
|
|
200
|
+
(0, typeorm_1.ManyToMany)(function () { return BusinessTypeProduct_1.BusinessTypeProduct; }, function (businessTypeProduct) { return businessTypeProduct.business_type_products; }),
|
|
174
201
|
(0, typeorm_1.JoinTable)({
|
|
175
202
|
name: "business_type_product_local",
|
|
176
203
|
joinColumn: {
|
package/dist/entities/Master.js
CHANGED
|
@@ -126,7 +126,7 @@ var Master = /** @class */ (function () {
|
|
|
126
126
|
__metadata("design:type", Array)
|
|
127
127
|
], Master.prototype, "discount_code_companies", void 0);
|
|
128
128
|
__decorate([
|
|
129
|
-
(0, typeorm_1.ManyToMany)(function () { return MasterRole_1.MasterRole; }),
|
|
129
|
+
(0, typeorm_1.ManyToMany)(function () { return MasterRole_1.MasterRole; }, function (masterRole) { return masterRole.masters_roles; }),
|
|
130
130
|
(0, typeorm_1.JoinTable)({
|
|
131
131
|
name: "master_assigned_role",
|
|
132
132
|
joinColumn: {
|
|
@@ -149,15 +149,15 @@ var Master = /** @class */ (function () {
|
|
|
149
149
|
__metadata("design:type", Array)
|
|
150
150
|
], Master.prototype, "master_notifications", void 0);
|
|
151
151
|
__decorate([
|
|
152
|
-
(0, typeorm_1.ManyToMany)(function () { return __1.MasterNotification; }),
|
|
152
|
+
(0, typeorm_1.ManyToMany)(function () { return __1.MasterNotification; }, function (masterNotification) { return masterNotification.master_to_notifications; }),
|
|
153
153
|
(0, typeorm_1.JoinTable)({
|
|
154
154
|
name: "master_to_notification",
|
|
155
155
|
joinColumn: {
|
|
156
|
-
name: "
|
|
156
|
+
name: "master",
|
|
157
157
|
referencedColumnName: "id",
|
|
158
158
|
},
|
|
159
159
|
inverseJoinColumn: {
|
|
160
|
-
name: "
|
|
160
|
+
name: "master_notification",
|
|
161
161
|
referencedColumnName: "id",
|
|
162
162
|
},
|
|
163
163
|
}),
|
|
@@ -81,9 +81,17 @@ var MasterNotification = /** @class */ (function () {
|
|
|
81
81
|
__metadata("design:type", Date)
|
|
82
82
|
], MasterNotification.prototype, "created", void 0);
|
|
83
83
|
__decorate([
|
|
84
|
-
(0, typeorm_1.ManyToMany)(function () { return __1.Master; }),
|
|
84
|
+
(0, typeorm_1.ManyToMany)(function () { return __1.Master; }, function (master) { return master.masters_to_notification; }),
|
|
85
85
|
(0, typeorm_1.JoinTable)({
|
|
86
86
|
name: "master_to_notification",
|
|
87
|
+
joinColumn: {
|
|
88
|
+
name: "master_notification",
|
|
89
|
+
referencedColumnName: "id",
|
|
90
|
+
},
|
|
91
|
+
inverseJoinColumn: {
|
|
92
|
+
name: "master",
|
|
93
|
+
referencedColumnName: "id",
|
|
94
|
+
},
|
|
87
95
|
}),
|
|
88
96
|
__metadata("design:type", Array)
|
|
89
97
|
], MasterNotification.prototype, "master_to_notifications", void 0);
|
|
@@ -17,45 +17,53 @@ var MasterPermission = /** @class */ (function () {
|
|
|
17
17
|
}
|
|
18
18
|
__decorate([
|
|
19
19
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
-
comment:
|
|
20
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
21
21
|
}),
|
|
22
22
|
__metadata("design:type", Number)
|
|
23
23
|
], MasterPermission.prototype, "id", void 0);
|
|
24
24
|
__decorate([
|
|
25
|
-
(0, typeorm_1.Column)({ length: 10, unique: true, comment:
|
|
25
|
+
(0, typeorm_1.Column)({ length: 10, unique: true, comment: "Código del permiso." }),
|
|
26
26
|
__metadata("design:type", String)
|
|
27
27
|
], MasterPermission.prototype, "code", void 0);
|
|
28
28
|
__decorate([
|
|
29
29
|
(0, typeorm_1.Column)({
|
|
30
30
|
length: 40,
|
|
31
|
-
comment:
|
|
31
|
+
comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.",
|
|
32
32
|
}),
|
|
33
33
|
__metadata("design:type", String)
|
|
34
34
|
], MasterPermission.prototype, "name", void 0);
|
|
35
35
|
__decorate([
|
|
36
36
|
(0, typeorm_1.Column)({
|
|
37
37
|
length: 40,
|
|
38
|
-
comment:
|
|
38
|
+
comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.",
|
|
39
39
|
}),
|
|
40
40
|
__metadata("design:type", String)
|
|
41
41
|
], MasterPermission.prototype, "description", void 0);
|
|
42
42
|
__decorate([
|
|
43
43
|
(0, typeorm_1.Column)({
|
|
44
44
|
default: 1,
|
|
45
|
-
comment:
|
|
45
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
46
46
|
}),
|
|
47
47
|
__metadata("design:type", Number)
|
|
48
48
|
], MasterPermission.prototype, "status", void 0);
|
|
49
49
|
__decorate([
|
|
50
|
-
(0, typeorm_1.ManyToMany)(function () { return MasterRole_1.MasterRole; }),
|
|
50
|
+
(0, typeorm_1.ManyToMany)(function () { return MasterRole_1.MasterRole; }, function (masterRole) { return masterRole.roles_permissions; }),
|
|
51
51
|
(0, typeorm_1.JoinTable)({
|
|
52
|
-
name:
|
|
52
|
+
name: "master_role_permission",
|
|
53
|
+
joinColumn: {
|
|
54
|
+
name: "permission",
|
|
55
|
+
referencedColumnName: "id",
|
|
56
|
+
},
|
|
57
|
+
inverseJoinColumn: {
|
|
58
|
+
name: "role",
|
|
59
|
+
referencedColumnName: "id",
|
|
60
|
+
},
|
|
53
61
|
}),
|
|
54
62
|
__metadata("design:type", Array)
|
|
55
63
|
], MasterPermission.prototype, "roles", void 0);
|
|
56
64
|
MasterPermission = __decorate([
|
|
57
|
-
(0, typeorm_1.Entity)(
|
|
58
|
-
comment:
|
|
65
|
+
(0, typeorm_1.Entity)("master_permission", {
|
|
66
|
+
comment: "Permisos que estarán disponibles en la plataforma para los usuarios (masters).",
|
|
59
67
|
})
|
|
60
68
|
], MasterPermission);
|
|
61
69
|
return MasterPermission;
|
|
@@ -18,12 +18,12 @@ var MasterRole = /** @class */ (function () {
|
|
|
18
18
|
}
|
|
19
19
|
__decorate([
|
|
20
20
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
-
comment:
|
|
21
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
22
|
}),
|
|
23
23
|
__metadata("design:type", Number)
|
|
24
24
|
], MasterRole.prototype, "id", void 0);
|
|
25
25
|
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({ length: 10, unique: true, comment:
|
|
26
|
+
(0, typeorm_1.Column)({ length: 10, unique: true, comment: "Código único del rol." }),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], MasterRole.prototype, "code", void 0);
|
|
29
29
|
__decorate([
|
|
@@ -44,43 +44,43 @@ var MasterRole = /** @class */ (function () {
|
|
|
44
44
|
__decorate([
|
|
45
45
|
(0, typeorm_1.Column)({
|
|
46
46
|
default: 1,
|
|
47
|
-
comment:
|
|
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
48
|
}),
|
|
49
49
|
__metadata("design:type", Number)
|
|
50
50
|
], MasterRole.prototype, "status", void 0);
|
|
51
51
|
__decorate([
|
|
52
|
-
(0, typeorm_1.ManyToMany)(function () { return MasterPermission_1.MasterPermission; }),
|
|
52
|
+
(0, typeorm_1.ManyToMany)(function () { return MasterPermission_1.MasterPermission; }, function (masterPermission) { return masterPermission.roles; }),
|
|
53
53
|
(0, typeorm_1.JoinTable)({
|
|
54
|
-
name:
|
|
54
|
+
name: "master_role_permission",
|
|
55
55
|
joinColumn: {
|
|
56
|
-
name:
|
|
57
|
-
referencedColumnName:
|
|
56
|
+
name: "role",
|
|
57
|
+
referencedColumnName: "id",
|
|
58
58
|
},
|
|
59
59
|
inverseJoinColumn: {
|
|
60
|
-
name:
|
|
61
|
-
referencedColumnName:
|
|
60
|
+
name: "permission",
|
|
61
|
+
referencedColumnName: "id",
|
|
62
62
|
},
|
|
63
63
|
}),
|
|
64
64
|
__metadata("design:type", Array)
|
|
65
65
|
], MasterRole.prototype, "roles_permissions", void 0);
|
|
66
66
|
__decorate([
|
|
67
|
-
(0, typeorm_1.ManyToMany)(function () { return Master_1.Master; }),
|
|
67
|
+
(0, typeorm_1.ManyToMany)(function () { return Master_1.Master; }, function (master) { return master.masters_roles; }),
|
|
68
68
|
(0, typeorm_1.JoinTable)({
|
|
69
|
-
name:
|
|
69
|
+
name: "master_assigned_role",
|
|
70
70
|
joinColumn: {
|
|
71
|
-
name:
|
|
72
|
-
referencedColumnName:
|
|
71
|
+
name: "role",
|
|
72
|
+
referencedColumnName: "id",
|
|
73
73
|
},
|
|
74
74
|
inverseJoinColumn: {
|
|
75
|
-
name:
|
|
76
|
-
referencedColumnName:
|
|
75
|
+
name: "master",
|
|
76
|
+
referencedColumnName: "id",
|
|
77
77
|
},
|
|
78
78
|
}),
|
|
79
79
|
__metadata("design:type", Array)
|
|
80
80
|
], MasterRole.prototype, "masters_roles", void 0);
|
|
81
81
|
MasterRole = __decorate([
|
|
82
|
-
(0, typeorm_1.Entity)(
|
|
83
|
-
comment:
|
|
82
|
+
(0, typeorm_1.Entity)("master_role", {
|
|
83
|
+
comment: "Roles que se le pueden agregar a un usuario (master) en la plataforma.",
|
|
84
84
|
})
|
|
85
85
|
], MasterRole);
|
|
86
86
|
return MasterRole;
|
package/dist/entities/Partner.js
CHANGED
|
@@ -168,7 +168,7 @@ var Partner = /** @class */ (function () {
|
|
|
168
168
|
__metadata("design:type", Array)
|
|
169
169
|
], Partner.prototype, "locals_partner", void 0);
|
|
170
170
|
__decorate([
|
|
171
|
-
(0, typeorm_1.ManyToMany)(function () { return PartnerRole_1.PartnerRole; }, function (
|
|
171
|
+
(0, typeorm_1.ManyToMany)(function () { return PartnerRole_1.PartnerRole; }, function (partnerRole) { return partnerRole.partners_roles; }),
|
|
172
172
|
(0, typeorm_1.JoinTable)({
|
|
173
173
|
name: "partner_assigned_role",
|
|
174
174
|
joinColumn: {
|
|
@@ -191,15 +191,15 @@ var Partner = /** @class */ (function () {
|
|
|
191
191
|
__metadata("design:type", Array)
|
|
192
192
|
], Partner.prototype, "verifyLocals", void 0);
|
|
193
193
|
__decorate([
|
|
194
|
-
(0, typeorm_1.ManyToMany)(function () { return PartnerNotification_1.PartnerNotification; }),
|
|
194
|
+
(0, typeorm_1.ManyToMany)(function () { return PartnerNotification_1.PartnerNotification; }, function (partnerNotification) { return partnerNotification.partner_to_notifications; }),
|
|
195
195
|
(0, typeorm_1.JoinTable)({
|
|
196
196
|
name: "partner_to_notification",
|
|
197
197
|
joinColumn: {
|
|
198
|
-
name: "
|
|
198
|
+
name: "partner",
|
|
199
199
|
referencedColumnName: "id",
|
|
200
200
|
},
|
|
201
201
|
inverseJoinColumn: {
|
|
202
|
-
name: "
|
|
202
|
+
name: "partner_notification",
|
|
203
203
|
referencedColumnName: "id",
|
|
204
204
|
},
|
|
205
205
|
}),
|
|
@@ -82,9 +82,17 @@ var PartnerNotification = /** @class */ (function () {
|
|
|
82
82
|
__metadata("design:type", Date)
|
|
83
83
|
], PartnerNotification.prototype, "created", void 0);
|
|
84
84
|
__decorate([
|
|
85
|
-
(0, typeorm_1.ManyToMany)(function () { return Partner_1.Partner; }),
|
|
85
|
+
(0, typeorm_1.ManyToMany)(function () { return Partner_1.Partner; }, function (partner) { return partner.partners_to_notification; }),
|
|
86
86
|
(0, typeorm_1.JoinTable)({
|
|
87
87
|
name: "partner_to_notification",
|
|
88
|
+
joinColumn: {
|
|
89
|
+
name: "partner_notification",
|
|
90
|
+
referencedColumnName: "id",
|
|
91
|
+
},
|
|
92
|
+
inverseJoinColumn: {
|
|
93
|
+
name: "partner",
|
|
94
|
+
referencedColumnName: "id",
|
|
95
|
+
},
|
|
88
96
|
}),
|
|
89
97
|
__metadata("design:type", Array)
|
|
90
98
|
], PartnerNotification.prototype, "partner_to_notifications", void 0);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Local } from
|
|
2
|
-
import { Request } from
|
|
3
|
-
import { User } from
|
|
1
|
+
import { Local } from "./Local";
|
|
2
|
+
import { Request } from "./Request";
|
|
3
|
+
import { User } from "./User";
|
|
4
4
|
export declare class PaymentMethod {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
@@ -19,14 +19,14 @@ var PaymentMethod = /** @class */ (function () {
|
|
|
19
19
|
}
|
|
20
20
|
__decorate([
|
|
21
21
|
(0, typeorm_1.PrimaryColumn)({
|
|
22
|
-
comment:
|
|
22
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
23
23
|
}),
|
|
24
24
|
__metadata("design:type", Number)
|
|
25
25
|
], PaymentMethod.prototype, "id", void 0);
|
|
26
26
|
__decorate([
|
|
27
27
|
(0, typeorm_1.Column)({
|
|
28
28
|
length: 50,
|
|
29
|
-
comment:
|
|
29
|
+
comment: "Nombre del estado, este campo debe tener el id/key de cada lenguaje. \r\n\r\nVer la carpeta locales del proyecto frontend para ver el id de cada tipo de elemento.",
|
|
30
30
|
}),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
32
|
], PaymentMethod.prototype, "name", void 0);
|
|
@@ -34,40 +34,40 @@ var PaymentMethod = /** @class */ (function () {
|
|
|
34
34
|
(0, typeorm_1.Column)({
|
|
35
35
|
length: 50,
|
|
36
36
|
nullable: true,
|
|
37
|
-
comment:
|
|
37
|
+
comment: "Descripción del estado, este campo debe tener el id/key de cada lenguaje. \r\n\r\nVer la carpeta locales del proyecto frontend para ver el id de cada tipo de elemento.",
|
|
38
38
|
}),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], PaymentMethod.prototype, "description", void 0);
|
|
41
41
|
__decorate([
|
|
42
42
|
(0, typeorm_1.Column)({
|
|
43
|
-
type:
|
|
43
|
+
type: "longtext",
|
|
44
44
|
nullable: true,
|
|
45
|
-
comment:
|
|
45
|
+
comment: "Campo de tipo JSON donde se pueden agregar columnas u otros elementos que sean necesarios.",
|
|
46
46
|
}),
|
|
47
47
|
__metadata("design:type", String)
|
|
48
48
|
], PaymentMethod.prototype, "settings", void 0);
|
|
49
49
|
__decorate([
|
|
50
|
-
(0, typeorm_1.Column)({ type:
|
|
50
|
+
(0, typeorm_1.Column)({ type: "datetime", comment: "Fecha de creación del registro." }),
|
|
51
51
|
__metadata("design:type", Date)
|
|
52
52
|
], PaymentMethod.prototype, "created", void 0);
|
|
53
53
|
__decorate([
|
|
54
54
|
(0, typeorm_1.Column)({
|
|
55
55
|
default: 1,
|
|
56
|
-
comment:
|
|
56
|
+
comment: "Valida si el estado es visible para mostrar al cliente (local/company): \r\n1. Activo. \r\n0. Inactivo.",
|
|
57
57
|
}),
|
|
58
58
|
__metadata("design:type", Number)
|
|
59
59
|
], PaymentMethod.prototype, "status", void 0);
|
|
60
60
|
__decorate([
|
|
61
|
-
(0, typeorm_1.ManyToMany)(function () { return Local_1.Local; }),
|
|
61
|
+
(0, typeorm_1.ManyToMany)(function () { return Local_1.Local; }, function (local) { return local.payment_methods; }),
|
|
62
62
|
(0, typeorm_1.JoinTable)({
|
|
63
|
-
name:
|
|
63
|
+
name: "local_payment_method",
|
|
64
64
|
joinColumn: {
|
|
65
|
-
name:
|
|
66
|
-
referencedColumnName:
|
|
65
|
+
name: "payment_method",
|
|
66
|
+
referencedColumnName: "id",
|
|
67
67
|
},
|
|
68
68
|
inverseJoinColumn: {
|
|
69
|
-
name:
|
|
70
|
-
referencedColumnName:
|
|
69
|
+
name: "local",
|
|
70
|
+
referencedColumnName: "id",
|
|
71
71
|
},
|
|
72
72
|
}),
|
|
73
73
|
__metadata("design:type", Array)
|
|
@@ -77,15 +77,23 @@ var PaymentMethod = /** @class */ (function () {
|
|
|
77
77
|
__metadata("design:type", Array)
|
|
78
78
|
], PaymentMethod.prototype, "requests", void 0);
|
|
79
79
|
__decorate([
|
|
80
|
-
(0, typeorm_1.ManyToMany)(function () { return User_1.User; }),
|
|
80
|
+
(0, typeorm_1.ManyToMany)(function () { return User_1.User; }, function (user) { return user.user_payments_method; }),
|
|
81
81
|
(0, typeorm_1.JoinTable)({
|
|
82
|
-
name:
|
|
82
|
+
name: "user_payment_method",
|
|
83
|
+
joinColumn: {
|
|
84
|
+
name: "payment_method",
|
|
85
|
+
referencedColumnName: "id",
|
|
86
|
+
},
|
|
87
|
+
inverseJoinColumn: {
|
|
88
|
+
name: "user",
|
|
89
|
+
referencedColumnName: "id",
|
|
90
|
+
},
|
|
83
91
|
}),
|
|
84
92
|
__metadata("design:type", Array)
|
|
85
93
|
], PaymentMethod.prototype, "user_payments_method", void 0);
|
|
86
94
|
PaymentMethod = __decorate([
|
|
87
|
-
(0, typeorm_1.Entity)(
|
|
88
|
-
comment:
|
|
95
|
+
(0, typeorm_1.Entity)("payment_method", {
|
|
96
|
+
comment: "Métodos de pago qué la plataforma tendrá disponible, estos serán visibles cuando un cliente (local) desee agregarlos para que se vean en los pedidos.",
|
|
89
97
|
})
|
|
90
98
|
], PaymentMethod);
|
|
91
99
|
return PaymentMethod;
|
package/dist/entities/Product.js
CHANGED
|
@@ -161,9 +161,17 @@ var Product = /** @class */ (function () {
|
|
|
161
161
|
__metadata("design:type", Array)
|
|
162
162
|
], Product.prototype, "request_products", void 0);
|
|
163
163
|
__decorate([
|
|
164
|
-
(0, typeorm_1.ManyToMany)(function () { return User_1.User; }),
|
|
164
|
+
(0, typeorm_1.ManyToMany)(function () { return User_1.User; }, function (user) { return user.user_favorite_products; }),
|
|
165
165
|
(0, typeorm_1.JoinTable)({
|
|
166
166
|
name: "user_favorite_product",
|
|
167
|
+
joinColumn: {
|
|
168
|
+
name: "product",
|
|
169
|
+
referencedColumnName: "id",
|
|
170
|
+
},
|
|
171
|
+
inverseJoinColumn: {
|
|
172
|
+
name: "user",
|
|
173
|
+
referencedColumnName: "id",
|
|
174
|
+
},
|
|
167
175
|
}),
|
|
168
176
|
__metadata("design:type", Array)
|
|
169
177
|
], Product.prototype, "users_favorite_product", void 0);
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import { Local } from
|
|
2
|
-
import { PaymentMethod } from
|
|
3
|
-
import { RequestProduct } from
|
|
4
|
-
import { RequestProductGroupComplement } from
|
|
5
|
-
import { RequestStatus } from
|
|
6
|
-
import { User } from
|
|
1
|
+
import { Local } from "..";
|
|
2
|
+
import { PaymentMethod } from "./PaymentMethod";
|
|
3
|
+
import { RequestProduct } from "./RequestProduct";
|
|
4
|
+
import { RequestProductGroupComplement } from "./RequestProductGroupComplement";
|
|
5
|
+
import { RequestStatus } from "./RequestStatus";
|
|
6
|
+
import { User } from "./User";
|
|
7
7
|
export declare class Request {
|
|
8
8
|
id: number;
|
|
9
9
|
user: User;
|
|
10
|
-
|
|
10
|
+
order_mode: number;
|
|
11
11
|
order_type: number;
|
|
12
12
|
payment_method: PaymentMethod;
|
|
13
13
|
order_cost: string;
|
|
14
|
+
paid_status: number;
|
|
14
15
|
status: RequestStatus;
|
|
15
16
|
details: string;
|
|
16
17
|
comments: string;
|
|
18
|
+
created: Date;
|
|
19
|
+
updated: Date;
|
|
20
|
+
requests_local: Local[];
|
|
17
21
|
requests_group: User[];
|
|
18
22
|
request_products: RequestProduct[];
|
|
19
23
|
request_product_group_complements: RequestProductGroupComplement[];
|