test-entity-library-asm 2.8.7 → 2.8.9
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/Master.d.ts +5 -4
- package/dist/entities/Master.js +41 -26
- package/dist/entities/MasterNotification.d.ts +3 -2
- package/dist/entities/MasterNotification.js +30 -20
- package/dist/entities/Partner.d.ts +11 -9
- package/dist/entities/Partner.js +59 -40
- package/dist/entities/PartnerNotification.d.ts +3 -2
- package/dist/entities/PartnerNotification.js +25 -16
- package/package.json +1 -1
- package/src/entities/Master.ts +74 -56
- package/src/entities/MasterNotification.ts +40 -30
- package/src/entities/Partner.ts +98 -79
- package/src/entities/PartnerNotification.ts +39 -29
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MasterNotification, PartnerNotification, ReassignReview, VerifyLocal } from
|
|
2
|
-
import { City } from
|
|
3
|
-
import { DiscountCodeCompany } from
|
|
4
|
-
import { MasterRole } from
|
|
1
|
+
import { MasterNotification, PartnerNotification, ReassignReview, VerifyLocal } from "..";
|
|
2
|
+
import { City } from "./City";
|
|
3
|
+
import { DiscountCodeCompany } from "./DiscountCodeCompany";
|
|
4
|
+
import { MasterRole } from "./MasterRole";
|
|
5
5
|
export declare class Master {
|
|
6
6
|
id: number;
|
|
7
7
|
code: string;
|
|
@@ -24,5 +24,6 @@ export declare class Master {
|
|
|
24
24
|
master_notifications: MasterNotification[];
|
|
25
25
|
reassign_reviews: ReassignReview[];
|
|
26
26
|
reassign_review_news: ReassignReview[];
|
|
27
|
+
masters_to_notification: MasterNotification[];
|
|
27
28
|
masters_notification: PartnerNotification[];
|
|
28
29
|
}
|
package/dist/entities/Master.js
CHANGED
|
@@ -22,12 +22,12 @@ var Master = /** @class */ (function () {
|
|
|
22
22
|
}
|
|
23
23
|
__decorate([
|
|
24
24
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
25
|
-
comment:
|
|
25
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
26
26
|
}),
|
|
27
27
|
__metadata("design:type", Number)
|
|
28
28
|
], Master.prototype, "id", void 0);
|
|
29
29
|
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ length: 30, unique: true, comment:
|
|
30
|
+
(0, typeorm_1.Column)({ length: 30, unique: true, comment: "Código único del master." }),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
32
|
], Master.prototype, "code", void 0);
|
|
33
33
|
__decorate([
|
|
@@ -35,23 +35,23 @@ var Master = /** @class */ (function () {
|
|
|
35
35
|
length: 14,
|
|
36
36
|
nullable: true,
|
|
37
37
|
unique: true,
|
|
38
|
-
comment:
|
|
38
|
+
comment: "Número de documento del master.",
|
|
39
39
|
}),
|
|
40
40
|
__metadata("design:type", String)
|
|
41
41
|
], Master.prototype, "document", void 0);
|
|
42
42
|
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ length: 50, comment:
|
|
43
|
+
(0, typeorm_1.Column)({ length: 50, comment: "Nombre del master." }),
|
|
44
44
|
__metadata("design:type", String)
|
|
45
45
|
], Master.prototype, "name", void 0);
|
|
46
46
|
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({ length: 50, comment:
|
|
47
|
+
(0, typeorm_1.Column)({ length: 50, comment: "Apellidos del master." }),
|
|
48
48
|
__metadata("design:type", String)
|
|
49
49
|
], Master.prototype, "surname", void 0);
|
|
50
50
|
__decorate([
|
|
51
51
|
(0, typeorm_1.Column)({
|
|
52
52
|
length: 100,
|
|
53
53
|
unique: true,
|
|
54
|
-
comment:
|
|
54
|
+
comment: "Correo electrónico del master.",
|
|
55
55
|
}),
|
|
56
56
|
__metadata("design:type", String)
|
|
57
57
|
], Master.prototype, "email", void 0);
|
|
@@ -59,65 +59,65 @@ var Master = /** @class */ (function () {
|
|
|
59
59
|
(0, typeorm_1.Column)({
|
|
60
60
|
length: 12,
|
|
61
61
|
unique: true,
|
|
62
|
-
comment:
|
|
62
|
+
comment: "Número de celular del master.",
|
|
63
63
|
}),
|
|
64
64
|
__metadata("design:type", String)
|
|
65
65
|
], Master.prototype, "phone", void 0);
|
|
66
66
|
__decorate([
|
|
67
67
|
(0, typeorm_1.ManyToOne)(function () { return City_1.City; }, function (city) { return city.masters; }, {
|
|
68
|
-
onDelete:
|
|
69
|
-
onUpdate:
|
|
68
|
+
onDelete: "RESTRICT",
|
|
69
|
+
onUpdate: "NO ACTION",
|
|
70
70
|
}),
|
|
71
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
71
|
+
(0, typeorm_1.JoinColumn)({ name: "city" }),
|
|
72
72
|
__metadata("design:type", City_1.City)
|
|
73
73
|
], Master.prototype, "city", void 0);
|
|
74
74
|
__decorate([
|
|
75
|
-
(0, typeorm_1.Column)({ nullable: true, length: 100, comment:
|
|
75
|
+
(0, typeorm_1.Column)({ nullable: true, length: 100, comment: "Dirección del master." }),
|
|
76
76
|
__metadata("design:type", String)
|
|
77
77
|
], Master.prototype, "address", void 0);
|
|
78
78
|
__decorate([
|
|
79
79
|
(0, typeorm_1.Column)({
|
|
80
80
|
length: 255,
|
|
81
|
-
comment:
|
|
81
|
+
comment: "Contraseña almacenada tipo SHA256 del master.",
|
|
82
82
|
}),
|
|
83
83
|
__metadata("design:type", String)
|
|
84
84
|
], Master.prototype, "password", void 0);
|
|
85
85
|
__decorate([
|
|
86
86
|
(0, typeorm_1.Column)({
|
|
87
|
-
type:
|
|
87
|
+
type: "longtext",
|
|
88
88
|
nullable: true,
|
|
89
89
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
90
|
-
comment:
|
|
90
|
+
comment: "Campo de tipo JSON donde se guarda información necesaria para el registro.",
|
|
91
91
|
}),
|
|
92
92
|
__metadata("design:type", Object)
|
|
93
93
|
], Master.prototype, "profile", void 0);
|
|
94
94
|
__decorate([
|
|
95
95
|
(0, typeorm_1.Column)({
|
|
96
|
-
type:
|
|
96
|
+
type: "datetime",
|
|
97
97
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
98
|
-
comment:
|
|
98
|
+
comment: "Fecha de creación del registro.",
|
|
99
99
|
}),
|
|
100
100
|
__metadata("design:type", Date)
|
|
101
101
|
], Master.prototype, "created", void 0);
|
|
102
102
|
__decorate([
|
|
103
103
|
(0, typeorm_1.Column)({
|
|
104
|
-
type:
|
|
104
|
+
type: "datetime",
|
|
105
105
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
106
|
-
comment:
|
|
106
|
+
comment: "Fecha de actualización del registro.",
|
|
107
107
|
}),
|
|
108
108
|
__metadata("design:type", Date)
|
|
109
109
|
], Master.prototype, "updated", void 0);
|
|
110
110
|
__decorate([
|
|
111
111
|
(0, typeorm_1.Column)({
|
|
112
112
|
default: 1,
|
|
113
|
-
comment:
|
|
113
|
+
comment: "¿El master tiene acceso a la plataforma?:\r\n1. Activo: El master tiene acceso.\r\n0. Inactivo: El master no tiene acceso a la plataforma.",
|
|
114
114
|
}),
|
|
115
115
|
__metadata("design:type", Number)
|
|
116
116
|
], Master.prototype, "status", void 0);
|
|
117
117
|
__decorate([
|
|
118
118
|
(0, typeorm_1.Column)({
|
|
119
119
|
default: 1,
|
|
120
|
-
comment:
|
|
120
|
+
comment: "Es el estado para verificar si se envía en la papelera o no.",
|
|
121
121
|
}),
|
|
122
122
|
__metadata("design:type", Number)
|
|
123
123
|
], Master.prototype, "visible", void 0);
|
|
@@ -128,14 +128,14 @@ var Master = /** @class */ (function () {
|
|
|
128
128
|
__decorate([
|
|
129
129
|
(0, typeorm_1.ManyToMany)(function () { return MasterRole_1.MasterRole; }),
|
|
130
130
|
(0, typeorm_1.JoinTable)({
|
|
131
|
-
name:
|
|
131
|
+
name: "master_assigned_role",
|
|
132
132
|
joinColumn: {
|
|
133
|
-
name:
|
|
134
|
-
referencedColumnName:
|
|
133
|
+
name: "master",
|
|
134
|
+
referencedColumnName: "id",
|
|
135
135
|
},
|
|
136
136
|
inverseJoinColumn: {
|
|
137
|
-
name:
|
|
138
|
-
referencedColumnName:
|
|
137
|
+
name: "role",
|
|
138
|
+
referencedColumnName: "id",
|
|
139
139
|
},
|
|
140
140
|
}),
|
|
141
141
|
__metadata("design:type", Array)
|
|
@@ -156,13 +156,28 @@ var Master = /** @class */ (function () {
|
|
|
156
156
|
(0, typeorm_1.OneToMany)(function () { return __1.ReassignReview; }, function (reassignReview) { return reassignReview.new_user; }),
|
|
157
157
|
__metadata("design:type", Array)
|
|
158
158
|
], Master.prototype, "reassign_review_news", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
(0, typeorm_1.ManyToMany)(function () { return __1.MasterNotification; }),
|
|
161
|
+
(0, typeorm_1.JoinTable)({
|
|
162
|
+
name: "master_to_notification",
|
|
163
|
+
joinColumn: {
|
|
164
|
+
name: "master_notification",
|
|
165
|
+
referencedColumnName: "id",
|
|
166
|
+
},
|
|
167
|
+
inverseJoinColumn: {
|
|
168
|
+
name: "master",
|
|
169
|
+
referencedColumnName: "id",
|
|
170
|
+
},
|
|
171
|
+
}),
|
|
172
|
+
__metadata("design:type", Array)
|
|
173
|
+
], Master.prototype, "masters_to_notification", void 0);
|
|
159
174
|
__decorate([
|
|
160
175
|
(0, typeorm_1.OneToMany)(function () { return __1.PartnerNotification; }, function (partner_notification) { return partner_notification.master; }),
|
|
161
176
|
__metadata("design:type", Array)
|
|
162
177
|
], Master.prototype, "masters_notification", void 0);
|
|
163
178
|
Master = __decorate([
|
|
164
179
|
(0, typeorm_1.Entity)({
|
|
165
|
-
comment:
|
|
180
|
+
comment: "Tabla agregada para los usuarios qué son administradores de la plataforma.",
|
|
166
181
|
})
|
|
167
182
|
], Master);
|
|
168
183
|
return Master;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Master } from
|
|
1
|
+
import { Master, Partner } from "..";
|
|
2
2
|
export declare class MasterNotification {
|
|
3
3
|
id: number;
|
|
4
4
|
master: Master;
|
|
5
|
+
partner: Partner;
|
|
5
6
|
name: string;
|
|
6
7
|
description: string;
|
|
7
8
|
settings: any;
|
|
8
|
-
type: number;
|
|
9
9
|
status: number;
|
|
10
10
|
created: Date;
|
|
11
|
+
master_to_notifications: Master[];
|
|
11
12
|
}
|
|
@@ -19,22 +19,32 @@ var MasterNotification = /** @class */ (function () {
|
|
|
19
19
|
}
|
|
20
20
|
__decorate([
|
|
21
21
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
22
|
-
comment:
|
|
22
|
+
comment: "ID único para cada notificación",
|
|
23
23
|
}),
|
|
24
24
|
__metadata("design:type", Number)
|
|
25
25
|
], MasterNotification.prototype, "id", void 0);
|
|
26
26
|
__decorate([
|
|
27
27
|
(0, typeorm_1.ManyToOne)(function () { return __1.Master; }, function (master) { return master.master_notifications; }, {
|
|
28
|
-
onDelete:
|
|
29
|
-
onUpdate:
|
|
28
|
+
onDelete: "CASCADE",
|
|
29
|
+
onUpdate: "NO ACTION",
|
|
30
|
+
nullable: true,
|
|
30
31
|
}),
|
|
31
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
32
|
+
(0, typeorm_1.JoinColumn)({ name: "master" }),
|
|
32
33
|
__metadata("design:type", __1.Master)
|
|
33
34
|
], MasterNotification.prototype, "master", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.partner_notifications; }, {
|
|
37
|
+
onDelete: "CASCADE",
|
|
38
|
+
onUpdate: "NO ACTION",
|
|
39
|
+
nullable: true,
|
|
40
|
+
}),
|
|
41
|
+
(0, typeorm_1.JoinColumn)({ name: "partner" }),
|
|
42
|
+
__metadata("design:type", __1.Partner)
|
|
43
|
+
], MasterNotification.prototype, "partner", void 0);
|
|
34
44
|
__decorate([
|
|
35
45
|
(0, typeorm_1.Column)({
|
|
36
46
|
length: 200,
|
|
37
|
-
comment:
|
|
47
|
+
comment: "Nombre de la notificación.",
|
|
38
48
|
}),
|
|
39
49
|
__metadata("design:type", String)
|
|
40
50
|
], MasterNotification.prototype, "name", void 0);
|
|
@@ -42,44 +52,44 @@ var MasterNotification = /** @class */ (function () {
|
|
|
42
52
|
(0, typeorm_1.Column)({
|
|
43
53
|
length: 400,
|
|
44
54
|
nullable: true,
|
|
45
|
-
comment:
|
|
55
|
+
comment: "Descripción de la notificación.",
|
|
46
56
|
}),
|
|
47
57
|
__metadata("design:type", String)
|
|
48
58
|
], MasterNotification.prototype, "description", void 0);
|
|
49
59
|
__decorate([
|
|
50
60
|
(0, typeorm_1.Column)({
|
|
51
|
-
type:
|
|
61
|
+
type: "text",
|
|
52
62
|
nullable: true,
|
|
53
63
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
54
|
-
comment:
|
|
64
|
+
comment: "Configuración adicional de la notificación, como enlaces, qué hace después de darle click...",
|
|
55
65
|
}),
|
|
56
66
|
__metadata("design:type", Object)
|
|
57
67
|
], MasterNotification.prototype, "settings", void 0);
|
|
58
68
|
__decorate([
|
|
59
69
|
(0, typeorm_1.Column)({
|
|
60
70
|
default: 1,
|
|
61
|
-
comment:
|
|
62
|
-
}),
|
|
63
|
-
__metadata("design:type", Number)
|
|
64
|
-
], MasterNotification.prototype, "type", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, typeorm_1.Column)({
|
|
67
|
-
default: 1,
|
|
68
|
-
comment: 'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
|
|
71
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
69
72
|
}),
|
|
70
73
|
__metadata("design:type", Number)
|
|
71
74
|
], MasterNotification.prototype, "status", void 0);
|
|
72
75
|
__decorate([
|
|
73
76
|
(0, typeorm_1.Column)({
|
|
74
|
-
type:
|
|
75
|
-
comment:
|
|
77
|
+
type: "datetime",
|
|
78
|
+
comment: "Fecha de creación de la notificación.",
|
|
76
79
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
77
80
|
}),
|
|
78
81
|
__metadata("design:type", Date)
|
|
79
82
|
], MasterNotification.prototype, "created", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.ManyToMany)(function () { return __1.Master; }),
|
|
85
|
+
(0, typeorm_1.JoinTable)({
|
|
86
|
+
name: "master_to_notification",
|
|
87
|
+
}),
|
|
88
|
+
__metadata("design:type", Array)
|
|
89
|
+
], MasterNotification.prototype, "master_to_notifications", void 0);
|
|
80
90
|
MasterNotification = __decorate([
|
|
81
|
-
(0, typeorm_1.Entity)(
|
|
82
|
-
comment:
|
|
91
|
+
(0, typeorm_1.Entity)("master_notification", {
|
|
92
|
+
comment: "Tabla creada para las notificaciones del master (administrador) de la plataforma.",
|
|
83
93
|
})
|
|
84
94
|
], MasterNotification);
|
|
85
95
|
return MasterNotification;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { City } from
|
|
2
|
-
import { Company } from
|
|
3
|
-
import { DiscountCodeUser } from
|
|
4
|
-
import { Local } from
|
|
5
|
-
import { PartnerRole } from
|
|
6
|
-
import { Terminal } from
|
|
7
|
-
import { TerminalSession } from
|
|
8
|
-
import { PartnerNotification } from
|
|
9
|
-
import { VerifyLocal } from
|
|
1
|
+
import { City } from "./City";
|
|
2
|
+
import { Company } from "./Company";
|
|
3
|
+
import { DiscountCodeUser } from "./DiscountCodeUser";
|
|
4
|
+
import { Local } from "./Local";
|
|
5
|
+
import { PartnerRole } from "./PartnerRole";
|
|
6
|
+
import { Terminal } from "./Terminal";
|
|
7
|
+
import { TerminalSession } from "./TerminalSession";
|
|
8
|
+
import { PartnerNotification } from "./PartnerNotification";
|
|
9
|
+
import { MasterNotification, VerifyLocal } from "..";
|
|
10
10
|
export declare class Partner {
|
|
11
11
|
id: number;
|
|
12
12
|
company: Company;
|
|
@@ -34,4 +34,6 @@ export declare class Partner {
|
|
|
34
34
|
sessions: TerminalSession[];
|
|
35
35
|
partners_notification: PartnerNotification[];
|
|
36
36
|
verifyLocals: VerifyLocal[];
|
|
37
|
+
partners_to_notification: PartnerNotification[];
|
|
38
|
+
partner_notifications: MasterNotification[];
|
|
37
39
|
}
|
package/dist/entities/Partner.js
CHANGED
|
@@ -27,21 +27,21 @@ var Partner = /** @class */ (function () {
|
|
|
27
27
|
}
|
|
28
28
|
__decorate([
|
|
29
29
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
30
|
-
comment:
|
|
30
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
31
31
|
}),
|
|
32
32
|
__metadata("design:type", Number)
|
|
33
33
|
], Partner.prototype, "id", void 0);
|
|
34
34
|
__decorate([
|
|
35
35
|
(0, typeorm_1.ManyToOne)(function () { return Company_1.Company; }, function (company) { return company.partners_company; }, {
|
|
36
|
-
onDelete:
|
|
37
|
-
onUpdate:
|
|
36
|
+
onDelete: "CASCADE",
|
|
37
|
+
onUpdate: "NO ACTION",
|
|
38
38
|
nullable: true,
|
|
39
39
|
}),
|
|
40
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
41
41
|
__metadata("design:type", Company_1.Company)
|
|
42
42
|
], Partner.prototype, "company", void 0);
|
|
43
43
|
__decorate([
|
|
44
|
-
(0, typeorm_1.Column)({ length: 30, unique: true, comment:
|
|
44
|
+
(0, typeorm_1.Column)({ length: 30, unique: true, comment: "Código único del partner." }),
|
|
45
45
|
__metadata("design:type", String)
|
|
46
46
|
], Partner.prototype, "code", void 0);
|
|
47
47
|
__decorate([
|
|
@@ -49,23 +49,23 @@ var Partner = /** @class */ (function () {
|
|
|
49
49
|
length: 14,
|
|
50
50
|
nullable: true,
|
|
51
51
|
unique: true,
|
|
52
|
-
comment:
|
|
52
|
+
comment: "Número de documento del partner.",
|
|
53
53
|
}),
|
|
54
54
|
__metadata("design:type", String)
|
|
55
55
|
], Partner.prototype, "document", void 0);
|
|
56
56
|
__decorate([
|
|
57
|
-
(0, typeorm_1.Column)({ length: 50, comment:
|
|
57
|
+
(0, typeorm_1.Column)({ length: 50, comment: "Nombre del partner." }),
|
|
58
58
|
__metadata("design:type", String)
|
|
59
59
|
], Partner.prototype, "name", void 0);
|
|
60
60
|
__decorate([
|
|
61
|
-
(0, typeorm_1.Column)({ length: 50, comment:
|
|
61
|
+
(0, typeorm_1.Column)({ length: 50, comment: "Apellidos del partner." }),
|
|
62
62
|
__metadata("design:type", String)
|
|
63
63
|
], Partner.prototype, "surname", void 0);
|
|
64
64
|
__decorate([
|
|
65
65
|
(0, typeorm_1.Column)({
|
|
66
66
|
length: 100,
|
|
67
67
|
unique: true,
|
|
68
|
-
comment:
|
|
68
|
+
comment: "Correo electrónico del partner.",
|
|
69
69
|
}),
|
|
70
70
|
__metadata("design:type", String)
|
|
71
71
|
], Partner.prototype, "email", void 0);
|
|
@@ -73,57 +73,57 @@ var Partner = /** @class */ (function () {
|
|
|
73
73
|
(0, typeorm_1.Column)({
|
|
74
74
|
length: 12,
|
|
75
75
|
unique: true,
|
|
76
|
-
comment:
|
|
76
|
+
comment: "Número de celular del partner.",
|
|
77
77
|
}),
|
|
78
78
|
__metadata("design:type", String)
|
|
79
79
|
], Partner.prototype, "phone", void 0);
|
|
80
80
|
__decorate([
|
|
81
81
|
(0, typeorm_1.ManyToOne)(function () { return City_1.City; }, function (city) { return city.partners; }, {
|
|
82
|
-
onDelete:
|
|
83
|
-
onUpdate:
|
|
82
|
+
onDelete: "RESTRICT",
|
|
83
|
+
onUpdate: "NO ACTION",
|
|
84
84
|
}),
|
|
85
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
85
|
+
(0, typeorm_1.JoinColumn)({ name: "city" }),
|
|
86
86
|
__metadata("design:type", City_1.City)
|
|
87
87
|
], Partner.prototype, "city", void 0);
|
|
88
88
|
__decorate([
|
|
89
|
-
(0, typeorm_1.Column)({ nullable: true, length: 100, comment:
|
|
89
|
+
(0, typeorm_1.Column)({ nullable: true, length: 100, comment: "Dirección del partner." }),
|
|
90
90
|
__metadata("design:type", String)
|
|
91
91
|
], Partner.prototype, "address", void 0);
|
|
92
92
|
__decorate([
|
|
93
93
|
(0, typeorm_1.Column)({
|
|
94
94
|
length: 255,
|
|
95
|
-
comment:
|
|
95
|
+
comment: "Contraseña almacenada tipo SHA256 del partner.",
|
|
96
96
|
}),
|
|
97
97
|
__metadata("design:type", String)
|
|
98
98
|
], Partner.prototype, "password", void 0);
|
|
99
99
|
__decorate([
|
|
100
100
|
(0, typeorm_1.Column)({
|
|
101
|
-
type:
|
|
101
|
+
type: "longtext",
|
|
102
102
|
nullable: true,
|
|
103
103
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
104
|
-
comment:
|
|
104
|
+
comment: "Campo de tipo JSON donde se guarda información necesaria para el registro.",
|
|
105
105
|
}),
|
|
106
106
|
__metadata("design:type", Object)
|
|
107
107
|
], Partner.prototype, "profile", void 0);
|
|
108
108
|
__decorate([
|
|
109
109
|
(0, typeorm_1.Column)({
|
|
110
110
|
default: 0,
|
|
111
|
-
comment:
|
|
111
|
+
comment: "En este campo sabemos sí el usuario que está en la tabla es dueño de una empresa/company en la plataforma.",
|
|
112
112
|
}),
|
|
113
113
|
__metadata("design:type", Number)
|
|
114
114
|
], Partner.prototype, "owner", void 0);
|
|
115
115
|
__decorate([
|
|
116
116
|
(0, typeorm_1.Column)({
|
|
117
|
-
type:
|
|
118
|
-
comment:
|
|
117
|
+
type: "datetime",
|
|
118
|
+
comment: "Fecha de creación del registro.",
|
|
119
119
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
120
120
|
}),
|
|
121
121
|
__metadata("design:type", Date)
|
|
122
122
|
], Partner.prototype, "created", void 0);
|
|
123
123
|
__decorate([
|
|
124
124
|
(0, typeorm_1.Column)({
|
|
125
|
-
type:
|
|
126
|
-
comment:
|
|
125
|
+
type: "datetime",
|
|
126
|
+
comment: "Fecha de actualización del registro.",
|
|
127
127
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
128
128
|
}),
|
|
129
129
|
__metadata("design:type", Date)
|
|
@@ -131,14 +131,14 @@ var Partner = /** @class */ (function () {
|
|
|
131
131
|
__decorate([
|
|
132
132
|
(0, typeorm_1.Column)({
|
|
133
133
|
default: 1,
|
|
134
|
-
comment:
|
|
134
|
+
comment: "¿El partner tiene acceso a la plataforma?:\r\n1. Activo: El partner tiene acceso.\r\n0. Inactivo: El partner no tiene acceso a la plataforma.",
|
|
135
135
|
}),
|
|
136
136
|
__metadata("design:type", Number)
|
|
137
137
|
], Partner.prototype, "status", void 0);
|
|
138
138
|
__decorate([
|
|
139
139
|
(0, typeorm_1.Column)({
|
|
140
140
|
default: 1,
|
|
141
|
-
comment:
|
|
141
|
+
comment: "Es el estado para verificar si se envía en la papelera o no.",
|
|
142
142
|
}),
|
|
143
143
|
__metadata("design:type", Number)
|
|
144
144
|
], Partner.prototype, "visible", void 0);
|
|
@@ -157,14 +157,14 @@ var Partner = /** @class */ (function () {
|
|
|
157
157
|
__decorate([
|
|
158
158
|
(0, typeorm_1.ManyToMany)(function () { return Local_1.Local; }, function (local) { return local.locals_partners; }),
|
|
159
159
|
(0, typeorm_1.JoinTable)({
|
|
160
|
-
name:
|
|
160
|
+
name: "local_partner",
|
|
161
161
|
joinColumn: {
|
|
162
|
-
name:
|
|
163
|
-
referencedColumnName:
|
|
162
|
+
name: "partner",
|
|
163
|
+
referencedColumnName: "id",
|
|
164
164
|
},
|
|
165
165
|
inverseJoinColumn: {
|
|
166
|
-
name:
|
|
167
|
-
referencedColumnName:
|
|
166
|
+
name: "local",
|
|
167
|
+
referencedColumnName: "id",
|
|
168
168
|
},
|
|
169
169
|
}),
|
|
170
170
|
__metadata("design:type", Array)
|
|
@@ -172,14 +172,14 @@ var Partner = /** @class */ (function () {
|
|
|
172
172
|
__decorate([
|
|
173
173
|
(0, typeorm_1.ManyToMany)(function () { return PartnerRole_1.PartnerRole; }, function (partnerLocal) { return partnerLocal.partners_roles; }),
|
|
174
174
|
(0, typeorm_1.JoinTable)({
|
|
175
|
-
name:
|
|
175
|
+
name: "partner_assigned_role",
|
|
176
176
|
joinColumn: {
|
|
177
|
-
name:
|
|
178
|
-
referencedColumnName:
|
|
177
|
+
name: "partner",
|
|
178
|
+
referencedColumnName: "id",
|
|
179
179
|
},
|
|
180
180
|
inverseJoinColumn: {
|
|
181
|
-
name:
|
|
182
|
-
referencedColumnName:
|
|
181
|
+
name: "role",
|
|
182
|
+
referencedColumnName: "id",
|
|
183
183
|
},
|
|
184
184
|
}),
|
|
185
185
|
__metadata("design:type", Array)
|
|
@@ -187,14 +187,14 @@ var Partner = /** @class */ (function () {
|
|
|
187
187
|
__decorate([
|
|
188
188
|
(0, typeorm_1.ManyToMany)(function () { return Terminal_1.Terminal; }, function (terminal) { return terminal.partners; }),
|
|
189
189
|
(0, typeorm_1.JoinTable)({
|
|
190
|
-
name:
|
|
190
|
+
name: "partner_terminal",
|
|
191
191
|
joinColumn: {
|
|
192
|
-
name:
|
|
193
|
-
referencedColumnName:
|
|
192
|
+
name: "partner",
|
|
193
|
+
referencedColumnName: "id",
|
|
194
194
|
},
|
|
195
195
|
inverseJoinColumn: {
|
|
196
|
-
name:
|
|
197
|
-
referencedColumnName:
|
|
196
|
+
name: "terminal",
|
|
197
|
+
referencedColumnName: "id",
|
|
198
198
|
},
|
|
199
199
|
}),
|
|
200
200
|
__metadata("design:type", Array)
|
|
@@ -211,9 +211,28 @@ var Partner = /** @class */ (function () {
|
|
|
211
211
|
(0, typeorm_1.OneToMany)(function () { return __1.VerifyLocal; }, function (verifyLocal) { return verifyLocal.partner; }),
|
|
212
212
|
__metadata("design:type", Array)
|
|
213
213
|
], Partner.prototype, "verifyLocals", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
(0, typeorm_1.ManyToMany)(function () { return PartnerNotification_1.PartnerNotification; }),
|
|
216
|
+
(0, typeorm_1.JoinTable)({
|
|
217
|
+
name: "partner_to_notification",
|
|
218
|
+
joinColumn: {
|
|
219
|
+
name: "partner_notification",
|
|
220
|
+
referencedColumnName: "id",
|
|
221
|
+
},
|
|
222
|
+
inverseJoinColumn: {
|
|
223
|
+
name: "partner",
|
|
224
|
+
referencedColumnName: "id",
|
|
225
|
+
},
|
|
226
|
+
}),
|
|
227
|
+
__metadata("design:type", Array)
|
|
228
|
+
], Partner.prototype, "partners_to_notification", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
(0, typeorm_1.OneToMany)(function () { return __1.MasterNotification; }, function (master_notification) { return master_notification.master; }),
|
|
231
|
+
__metadata("design:type", Array)
|
|
232
|
+
], Partner.prototype, "partner_notifications", void 0);
|
|
214
233
|
Partner = __decorate([
|
|
215
234
|
(0, typeorm_1.Entity)({
|
|
216
|
-
comment:
|
|
235
|
+
comment: "Tabla agregada para los usuarios qué quieran registrar su local o empresa de comida rápida en la plataforma.\r\n\r\nEste usuario es independiente a los usuarios de la tabla `user` ya que tiene diferentes plataformas.\r\n\r\nTambién van a estar los usuarios qué el administrador/dueño desee agregar como empleados/colaboradores.",
|
|
217
236
|
})
|
|
218
237
|
], Partner);
|
|
219
238
|
return Partner;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Partner } from
|
|
2
|
-
import { Master } from
|
|
1
|
+
import { Partner } from "./Partner";
|
|
2
|
+
import { Master } from "./Master";
|
|
3
3
|
export declare class PartnerNotification {
|
|
4
4
|
id: number;
|
|
5
5
|
partner: Partner;
|
|
@@ -9,4 +9,5 @@ export declare class PartnerNotification {
|
|
|
9
9
|
settings: any;
|
|
10
10
|
status: number;
|
|
11
11
|
created: Date;
|
|
12
|
+
partner_to_notifications: Partner[];
|
|
12
13
|
}
|