test-entity-library-asm 1.6.3 → 1.6.4
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/Partner.js
CHANGED
|
@@ -18,6 +18,10 @@ var Local_1 = require("./Local");
|
|
|
18
18
|
var PartnerRole_1 = require("./PartnerRole");
|
|
19
19
|
var Terminal_1 = require("./Terminal");
|
|
20
20
|
var TerminalSession_1 = require("./TerminalSession");
|
|
21
|
+
var jsonTransformer = {
|
|
22
|
+
to: function (value) { return JSON.stringify(value); },
|
|
23
|
+
from: function (value) { return JSON.parse(value); },
|
|
24
|
+
};
|
|
21
25
|
var Partner = /** @class */ (function () {
|
|
22
26
|
function Partner() {
|
|
23
27
|
}
|
|
@@ -94,11 +98,11 @@ var Partner = /** @class */ (function () {
|
|
|
94
98
|
], Partner.prototype, "password", void 0);
|
|
95
99
|
__decorate([
|
|
96
100
|
(0, typeorm_1.Column)({
|
|
97
|
-
type: 'longtext',
|
|
98
101
|
nullable: true,
|
|
102
|
+
transformer: jsonTransformer,
|
|
99
103
|
comment: 'Campo de tipo JSON donde se guarda información necesaria para el registro.',
|
|
100
104
|
}),
|
|
101
|
-
__metadata("design:type",
|
|
105
|
+
__metadata("design:type", Object)
|
|
102
106
|
], Partner.prototype, "profile", void 0);
|
|
103
107
|
__decorate([
|
|
104
108
|
(0, typeorm_1.Column)({
|
package/package.json
CHANGED
package/src/entities/Partner.ts
CHANGED
|
@@ -16,6 +16,11 @@ import { PartnerRole } from './PartnerRole'
|
|
|
16
16
|
import { Terminal } from './Terminal'
|
|
17
17
|
import { TerminalSession } from './TerminalSession'
|
|
18
18
|
|
|
19
|
+
const jsonTransformer = {
|
|
20
|
+
to: (value: any) => JSON.stringify(value),
|
|
21
|
+
from: (value: string) => JSON.parse(value),
|
|
22
|
+
}
|
|
23
|
+
|
|
19
24
|
@Entity({
|
|
20
25
|
comment:
|
|
21
26
|
'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.',
|
|
@@ -82,12 +87,12 @@ export class Partner {
|
|
|
82
87
|
password: string
|
|
83
88
|
|
|
84
89
|
@Column({
|
|
85
|
-
type: 'longtext',
|
|
86
90
|
nullable: true,
|
|
91
|
+
transformer: jsonTransformer,
|
|
87
92
|
comment:
|
|
88
93
|
'Campo de tipo JSON donde se guarda información necesaria para el registro.',
|
|
89
94
|
})
|
|
90
|
-
profile:
|
|
95
|
+
profile: Object
|
|
91
96
|
|
|
92
97
|
@Column({
|
|
93
98
|
default: 0,
|