test-entity-library-asm 3.9.56 → 3.9.58

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.
Files changed (54) hide show
  1. package/dist/entities/Company.js +5 -11
  2. package/dist/entities/Country.d.ts +2 -2
  3. package/dist/entities/Country.js +7 -7
  4. package/dist/entities/DiscountCodeCompany.js +1 -4
  5. package/dist/entities/DiscountCodeUser.js +1 -3
  6. package/dist/entities/Local.js +6 -7
  7. package/dist/entities/LocalPlan.js +1 -3
  8. package/dist/entities/Master.js +1 -3
  9. package/dist/entities/MasterNotification.js +1 -3
  10. package/dist/entities/Partner.js +1 -3
  11. package/dist/entities/PartnerNotification.js +1 -3
  12. package/dist/entities/PaymentMethod.js +1 -3
  13. package/dist/entities/Plan.js +1 -3
  14. package/dist/entities/Square.js +1 -3
  15. package/dist/entities/User.js +1 -3
  16. package/dist/filters/LocalsCompanyInformationForTheTable.d.ts +1 -1
  17. package/dist/filters/LocalsCompanyInformationForTheTable.js +63 -14
  18. package/dist/index.js +5 -5
  19. package/dist/interfaces.d.ts +0 -1
  20. package/dist/views/DiscountsCodeUser.js +2 -15
  21. package/dist/views/LocalReserves.js +2 -15
  22. package/dist/views/LocalsCompanyInformationForTheMap.js +10 -22
  23. package/dist/views/LocalsCompanyInformationForTheTable.d.ts +2 -2
  24. package/dist/views/LocalsCompanyInformationForTheTable.js +16 -28
  25. package/dist/views/MasterNotifications.js +5 -10
  26. package/dist/views/PartnerNotifications.js +3 -8
  27. package/dist/views/Partners.js +2 -15
  28. package/dist/views/ViewLocalsCompanies.js +1 -6
  29. package/package.json +1 -1
  30. package/src/entities/Company.ts +5 -11
  31. package/src/entities/Country.ts +9 -9
  32. package/src/entities/DiscountCodeCompany.ts +1 -4
  33. package/src/entities/DiscountCodeUser.ts +1 -3
  34. package/src/entities/Local.ts +7 -9
  35. package/src/entities/LocalPlan.ts +1 -3
  36. package/src/entities/Master.ts +2 -4
  37. package/src/entities/MasterNotification.ts +1 -3
  38. package/src/entities/Partner.ts +1 -3
  39. package/src/entities/PartnerNotification.ts +1 -3
  40. package/src/entities/PaymentMethod.ts +1 -3
  41. package/src/entities/Plan.ts +1 -3
  42. package/src/entities/Square.ts +1 -3
  43. package/src/entities/User.ts +1 -3
  44. package/src/filters/LocalsCompanyInformationForTheTable.ts +66 -23
  45. package/src/index.ts +9 -10
  46. package/src/interfaces.ts +0 -1
  47. package/src/views/DiscountsCodeUser.ts +2 -16
  48. package/src/views/LocalReserves.ts +2 -15
  49. package/src/views/LocalsCompanyInformationForTheMap.ts +10 -22
  50. package/src/views/LocalsCompanyInformationForTheTable.ts +17 -29
  51. package/src/views/MasterNotifications.ts +5 -11
  52. package/src/views/PartnerNotifications.ts +3 -9
  53. package/src/views/Partners.ts +2 -15
  54. package/src/views/ViewLocalsCompanies.ts +1 -7
@@ -8,7 +8,6 @@ import {
8
8
  PrimaryGeneratedColumn,
9
9
  } from "typeorm";
10
10
  import { Master, Partner } from "..";
11
- import { jsonTransformer } from "../transformers/jsonTransformer";
12
11
 
13
12
  @Entity("master_notification", {
14
13
  comment:
@@ -54,10 +53,9 @@ export class MasterNotification {
54
53
  description: string | null;
55
54
 
56
55
  @Column({
57
- type: "text",
56
+ type: "json",
58
57
  nullable: true,
59
58
  default: null,
60
- transformer: jsonTransformer,
61
59
  comment:
62
60
  "Configuración adicional de la notificación, como enlaces, qué hace después de darle click...",
63
61
  })
@@ -28,7 +28,6 @@ import {
28
28
  RequestPrint,
29
29
  VerifyLocal,
30
30
  } from "..";
31
- import { jsonTransformer } from "../transformers/jsonTransformer";
32
31
  import { City } from "./City";
33
32
  import { Company } from "./Company";
34
33
  import { DiscountCodeUser } from "./DiscountCodeUser";
@@ -134,10 +133,9 @@ export class Partner {
134
133
  google_id: string | null;
135
134
 
136
135
  @Column({
137
- type: "longtext",
136
+ type: "json",
138
137
  nullable: true,
139
138
  default: null,
140
- transformer: jsonTransformer,
141
139
  comment:
142
140
  "Campo de tipo JSON donde se guarda información necesaria para el registro.",
143
141
  })
@@ -8,7 +8,6 @@ import {
8
8
  PrimaryGeneratedColumn,
9
9
  } from "typeorm";
10
10
  import { Partner } from "./Partner";
11
- import { jsonTransformer } from "../transformers/jsonTransformer";
12
11
  import { Master } from "./Master";
13
12
 
14
13
  @Entity("partner_notification", {
@@ -54,10 +53,9 @@ export class PartnerNotification {
54
53
  description: string | null;
55
54
 
56
55
  @Column({
57
- type: "text",
56
+ type: "json",
58
57
  nullable: true,
59
58
  default: null,
60
- transformer: jsonTransformer,
61
59
  comment:
62
60
  "Configuración adicional de la notificación, como enlaces, qué hace después de darle click...",
63
61
  })
@@ -12,7 +12,6 @@ import {
12
12
  RequestLocalPayment,
13
13
  } from "..";
14
14
  import { Local } from "./Local";
15
- import { jsonTransformer } from "../transformers/jsonTransformer";
16
15
 
17
16
  @Entity("payment_method", {
18
17
  comment:
@@ -44,8 +43,7 @@ export class PaymentMethod {
44
43
  description: string | null;
45
44
 
46
45
  @Column({
47
- type: "longtext",
48
- transformer: jsonTransformer,
46
+ type: "json",
49
47
  nullable: true,
50
48
  default: null,
51
49
  comment:
@@ -7,7 +7,6 @@ import {
7
7
  PrimaryGeneratedColumn,
8
8
  } from "typeorm";
9
9
  import { LocalPlan } from "..";
10
- import { jsonTransformer } from "../transformers/jsonTransformer";
11
10
  import { Company } from "./Company";
12
11
 
13
12
  @Entity({
@@ -44,8 +43,7 @@ export class Plan {
44
43
  name: string;
45
44
 
46
45
  @Column({
47
- type: "mediumtext",
48
- transformer: jsonTransformer,
46
+ type: "json",
49
47
  nullable: true,
50
48
  default: null,
51
49
  comment:
@@ -11,7 +11,6 @@ import {
11
11
  import { City } from "./City";
12
12
  import { Local } from "./Local";
13
13
  import { User } from "./User";
14
- import { jsonTransformer } from "../transformers/jsonTransformer";
15
14
 
16
15
  @Entity({
17
16
  comment:
@@ -66,10 +65,9 @@ export class Square {
66
65
  longitude: number;
67
66
 
68
67
  @Column({
69
- type: "mediumtext",
68
+ type: "json",
70
69
  nullable: true,
71
70
  default: null,
72
- transformer: jsonTransformer,
73
71
  comment:
74
72
  "Campo de tipo JSON por si se llega a necesitar agregar otras columnas para las plazoletas de los centros comerciales.",
75
73
  })
@@ -15,7 +15,6 @@ import {
15
15
  RequestLocalPayment,
16
16
  UserPaymentMethod,
17
17
  } from "..";
18
- import { jsonTransformer } from "../transformers/jsonTransformer";
19
18
  import { City } from "./City";
20
19
  import { CodeRedemptionHistoryUser } from "./CodeRedemptionHistoryUser";
21
20
  import { Local } from "./Local";
@@ -88,10 +87,9 @@ export class User {
88
87
  password: string;
89
88
 
90
89
  @Column({
91
- type: "longtext",
90
+ type: "json",
92
91
  nullable: true,
93
92
  default: null,
94
- transformer: jsonTransformer,
95
93
  comment:
96
94
  "Campo de tipo JSON donde se guarda información necesaria para el registro.",
97
95
  })
@@ -3,13 +3,7 @@ import { IBasicCompany } from "../interfaces";
3
3
 
4
4
  export async function getLocalsCompanyInformationTable(
5
5
  repository: Repository<any>,
6
- {
7
- company,
8
- status,
9
- visible,
10
- lazyEvent,
11
- filter_visualization = 2, // "no-in-review-rejected"
12
- }: IBasicCompany,
6
+ { company, status, visible, lazyEvent }: IBasicCompany,
13
7
  ) {
14
8
  try {
15
9
  const queryBuilder = repository
@@ -23,7 +17,7 @@ export async function getLocalsCompanyInformationTable(
23
17
  "global"
24
18
  ].value.toLowerCase()}%`;
25
19
  queryBuilder.andWhere(
26
- "(LOWER(locals_company_information_for_the_table.name) LIKE :globalValue OR LOWER(locals_company_information_for_the_table.address) LIKE :globalValue OR LOWER(locals_company_information_for_the_table.partner_name) LIKE :globalValue OR LOWER(locals_company_information_for_the_table.partner_surname) LIKE :globalValue OR LOWER(locals_company_information_for_the_table.partner_full_name) LIKE :globalValue OR locals_company_information_for_the_table.partner_full_name LIKE :globalValue",
20
+ "(LOWER(locals_company_information_for_the_table.name) LIKE :globalValue OR LOWER(locals_company_information_for_the_table.address) LIKE :globalValue OR LOWER(locals_company_information_for_the_table.partner_name) LIKE :globalValue OR LOWER(locals_company_information_for_the_table.partner_surname) LIKE :globalValue OR LOWER(locals_company_information_for_the_table.partner_full_name) LIKE :globalValue OR locals_company_information_for_the_table.partner_full_name LIKE :globalValue)",
27
21
  { globalValue },
28
22
  );
29
23
  }
@@ -58,21 +52,6 @@ export async function getLocalsCompanyInformationTable(
58
52
  );
59
53
  }
60
54
 
61
- // DOC: la columna filter_visualization se utiliza para aplicar el filtro review_status y operation_type.
62
- // DOC: Si filter_visualization es "in-review-rejected", se muestran los locales que están en revisión o rechazados, es decir, review_status = 1 o 3 y operation_type = 1 o 2.
63
- // DOC: Si filter_visualization es "no-in-review-rejected", se muestran los locales que no están en revisión ni rechazados, es decir, review_status es null y operation_type es null.
64
- if (filter_visualization === 1) {
65
- // "in-review-rejected"
66
- queryBuilder.andWhere(
67
- "(locals_company_information_for_the_table.review_status IN (1, 3) AND locals_company_information_for_the_table.operation_type IN (1, 2))",
68
- );
69
- } else if (filter_visualization === 2) {
70
- // "no-in-review-rejected"
71
- queryBuilder.andWhere(
72
- "(locals_company_information_for_the_table.review_status IS NULL AND locals_company_information_for_the_table.operation_type IS NULL)",
73
- );
74
- }
75
-
76
55
  // DOC: Acá vienen los otros filtros, por las columnas de la tabla.
77
56
  const filters = lazyEvent.filters;
78
57
  Object.keys(filters).forEach((key) => {
@@ -97,6 +76,66 @@ export async function getLocalsCompanyInformationTable(
97
76
  switch (
98
77
  matchMode // DOC: Verificamos el modo de coincidencia del filtro.
99
78
  ) {
79
+ case "custom":
80
+ // 📌 Filtro por created / updated (rango de fechas en UTC)
81
+ if (key === "created" || key === "updated") {
82
+ if (Array.isArray(value) && value.length === 2) {
83
+ const [from, to] = value;
84
+
85
+ if (from !== null && to === null) {
86
+ queryBuilder.andWhere(`${accessKey} >= :from`, {
87
+ from: new Date(from),
88
+ });
89
+ } else if (from === null && to !== null) {
90
+ queryBuilder.andWhere(`${accessKey} <= :to`, {
91
+ to: new Date(to),
92
+ });
93
+ } else if (from !== null && to !== null) {
94
+ queryBuilder.andWhere(`${accessKey} BETWEEN :from AND :to`, {
95
+ from: new Date(from),
96
+ to: new Date(to),
97
+ });
98
+ }
99
+ }
100
+ }
101
+
102
+ // 📌 Filtro por created_by (array de ids)
103
+ if (key === "created_by") {
104
+ if (Array.isArray(value) && value.length > 0) {
105
+ queryBuilder.andWhere(`${accessKey} IN (:...${key})`, {
106
+ [key]: value,
107
+ });
108
+ }
109
+ }
110
+
111
+ // 📌 Filtro por updated_by (array de ids)
112
+ if (key === "updated_by") {
113
+ if (Array.isArray(value) && value.length > 0) {
114
+ queryBuilder.andWhere(`${accessKey} IN (:...${key})`, {
115
+ [key]: value,
116
+ });
117
+ }
118
+ }
119
+
120
+ // 📌 Filtro por total_requests / average_rating (rango numérico)
121
+ if (key === "total_requests" || key === "average_rating") {
122
+ if (Array.isArray(value) && value.length === 2) {
123
+ const [from, to] = value;
124
+
125
+ if (from !== null && to === null) {
126
+ queryBuilder.andWhere(`${accessKey} >= :from`, { from });
127
+ } else if (from === null && to !== null) {
128
+ queryBuilder.andWhere(`${accessKey} <= :to`, { to });
129
+ } else if (from !== null && to !== null) {
130
+ queryBuilder.andWhere(`${accessKey} BETWEEN :from AND :to`, {
131
+ from,
132
+ to,
133
+ });
134
+ }
135
+ }
136
+ }
137
+
138
+ break;
100
139
  case "contains": // DOC: Si el modo de coincidencia es "contains".
101
140
  queryBuilder.andWhere(`LOWER(${accessKey}) LIKE :${key}`, {
102
141
  [key]: `%${value}%`,
@@ -211,6 +250,10 @@ export async function getLocalsCompanyInformationTable(
211
250
  // DOC: Ejecutamos la consulta y obtenemos los resultados.
212
251
  const [data, totalRecords] = await queryBuilder.getManyAndCount();
213
252
 
253
+ // DOC: Si quieres ver la consulta generada, puedes descomentar las siguientes líneas:
254
+ // console.log("Query:", queryBuilder.getQuery());
255
+ // console.log("Query:", queryBuilder.getQueryAndParameters());
256
+
214
257
  return {
215
258
  data,
216
259
  totalRecords,
package/src/index.ts CHANGED
@@ -3,6 +3,15 @@ import { config } from "dotenv";
3
3
  import { NextFunction, Request, Response } from "express";
4
4
  import { resolve } from "path";
5
5
  import { DataSource, EntityTarget, ObjectLiteral, Repository } from "typeorm";
6
+ import * as EntitiesViewsRoutes from "./entities.index";
7
+ import {
8
+ getDiscountsCodeCompanyInformation,
9
+ getDiscountsCodeUserInformation,
10
+ getLocalReservesInformation,
11
+ getLocalsCompanyInformation,
12
+ getLocalsCompanyInformationTable,
13
+ getVerifyLocalsInformation
14
+ } from "./entities.views.routes";
6
15
  import {
7
16
  IBasicCompany,
8
17
  IBasicLazyEvent,
@@ -12,17 +21,7 @@ import {
12
21
  IType,
13
22
  } from "./interfaces";
14
23
  import moment = require("moment-timezone");
15
- import {
16
- CustomRepository,
17
- getDiscountsCodeCompanyInformation,
18
- getDiscountsCodeUserInformation,
19
- getLocalReservesInformation,
20
- getLocalsCompanyInformation,
21
- getLocalsCompanyInformationTable,
22
- getVerifyLocalsInformation,
23
- } from "./entities.views.routes";
24
24
  export * from "./entities.views.routes";
25
- import * as EntitiesViewsRoutes from "./entities.index";
26
25
 
27
26
  const asyncLocalStorage = new AsyncLocalStorage<Map<string, string>>();
28
27
 
package/src/interfaces.ts CHANGED
@@ -32,7 +32,6 @@ export interface IBasicCompany extends IBasicLazyEvent {
32
32
  company: number | null;
33
33
  visible?: number | null;
34
34
  owner?: number | null;
35
- filter_visualization?: number | null;
36
35
  }
37
36
 
38
37
  export interface IPropsQueryVerifyLocalInformation extends IPropsQueryVerifyLocal {
@@ -1,19 +1,5 @@
1
1
  import { ViewColumn, ViewEntity } from "typeorm";
2
2
 
3
- // JSON Transformer
4
- const jsonTransformer = {
5
- to: (value: any) => JSON.stringify(value),
6
-
7
- from: (value: string) => {
8
- try {
9
- return JSON.parse(value);
10
- } catch (error) {
11
- console.log(error, "Transformer error");
12
- return null;
13
- }
14
- },
15
- };
16
-
17
3
  @ViewEntity({
18
4
  name: "discounts_code_user",
19
5
  })
@@ -51,7 +37,7 @@ export class DiscountsCodeUser {
51
37
  @ViewColumn()
52
38
  expiration: string;
53
39
 
54
- @ViewColumn({ transformer: jsonTransformer })
40
+ @ViewColumn()
55
41
  repeat_days: any;
56
42
 
57
43
  @ViewColumn()
@@ -87,7 +73,7 @@ export class DiscountsCodeUser {
87
73
  @ViewColumn()
88
74
  partner_surname: string;
89
75
 
90
- @ViewColumn({ transformer: jsonTransformer })
76
+ @ViewColumn()
91
77
  partner_profile: any;
92
78
 
93
79
  @ViewColumn()
@@ -1,18 +1,5 @@
1
1
  import { ViewColumn, ViewEntity } from "typeorm";
2
2
 
3
- // JSON Transformer
4
- const jsonTransformer = {
5
- to: (value: any) => JSON.stringify(value),
6
- from: (value: string) => {
7
- try {
8
- return JSON.parse(value);
9
- } catch (error) {
10
- console.log(error, "Transformer error");
11
- return null;
12
- }
13
- },
14
- };
15
-
16
3
  @ViewEntity({
17
4
  name: "local_reserves",
18
5
  })
@@ -176,7 +163,7 @@ export class LocalReserves {
176
163
  @ViewColumn()
177
164
  partner_email: string | null;
178
165
 
179
- @ViewColumn({ transformer: jsonTransformer })
166
+ @ViewColumn()
180
167
  partner_profile: any | null;
181
168
 
182
169
  @ViewColumn()
@@ -206,7 +193,7 @@ export class LocalReserves {
206
193
  @ViewColumn()
207
194
  user_table_phone: string | null;
208
195
 
209
- @ViewColumn({ transformer: jsonTransformer })
196
+ @ViewColumn()
210
197
  user_table_profile: any | null;
211
198
 
212
199
  @ViewColumn()
@@ -1,17 +1,5 @@
1
1
  import { ViewColumn, ViewEntity } from "typeorm";
2
2
 
3
- const jsonTransformer = {
4
- to: (value: any) => JSON.stringify(value),
5
- from: (value: string) => {
6
- try {
7
- return JSON.parse(value);
8
- } catch (error) {
9
- console.log(error, "Transformer error");
10
- return null;
11
- }
12
- },
13
- };
14
-
15
3
  @ViewEntity({
16
4
  name: "locals_company_information_for_the_map",
17
5
  })
@@ -37,7 +25,7 @@ export class LocalsCompanyInformationForTheMap {
37
25
  @ViewColumn()
38
26
  longitude: number;
39
27
 
40
- @ViewColumn({ transformer: jsonTransformer })
28
+ @ViewColumn()
41
29
  details: any | null;
42
30
 
43
31
  @ViewColumn()
@@ -55,7 +43,7 @@ export class LocalsCompanyInformationForTheMap {
55
43
  @ViewColumn()
56
44
  pos_system: number;
57
45
 
58
- @ViewColumn({ transformer: jsonTransformer })
46
+ @ViewColumn()
59
47
  pos_system_settings: any | null;
60
48
 
61
49
  @ViewColumn()
@@ -64,7 +52,7 @@ export class LocalsCompanyInformationForTheMap {
64
52
  @ViewColumn()
65
53
  visible: number;
66
54
 
67
- @ViewColumn({ transformer: jsonTransformer })
55
+ @ViewColumn()
68
56
  contact_details: any | null;
69
57
 
70
58
  @ViewColumn()
@@ -76,13 +64,13 @@ export class LocalsCompanyInformationForTheMap {
76
64
  @ViewColumn()
77
65
  company_partner: number;
78
66
 
79
- @ViewColumn({ transformer: jsonTransformer })
67
+ @ViewColumn()
80
68
  company_profile: any | null;
81
69
 
82
- @ViewColumn({ transformer: jsonTransformer })
70
+ @ViewColumn()
83
71
  company_contact_details: any | null;
84
72
 
85
- @ViewColumn({ transformer: jsonTransformer })
73
+ @ViewColumn()
86
74
  company_settings: any | null;
87
75
 
88
76
  @ViewColumn()
@@ -121,7 +109,7 @@ export class LocalsCompanyInformationForTheMap {
121
109
  @ViewColumn()
122
110
  square_longitude: number;
123
111
 
124
- @ViewColumn({ transformer: jsonTransformer })
112
+ @ViewColumn()
125
113
  square_details: any | null;
126
114
 
127
115
  @ViewColumn()
@@ -166,13 +154,13 @@ export class LocalsCompanyInformationForTheMap {
166
154
  @ViewColumn()
167
155
  country_structure_phone: string;
168
156
 
169
- @ViewColumn({ transformer: jsonTransformer })
157
+ @ViewColumn()
170
158
  country_legal_information: any | null;
171
159
 
172
160
  @ViewColumn()
173
161
  country_legal_agent: string;
174
162
 
175
- @ViewColumn({ transformer: jsonTransformer })
163
+ @ViewColumn()
176
164
  country_details: any | null;
177
165
 
178
166
  @ViewColumn()
@@ -199,7 +187,7 @@ export class LocalsCompanyInformationForTheMap {
199
187
  @ViewColumn()
200
188
  partner_address: string;
201
189
 
202
- @ViewColumn({ transformer: jsonTransformer })
190
+ @ViewColumn()
203
191
  partner_profile: any | null;
204
192
 
205
193
  @ViewColumn()
@@ -1,17 +1,5 @@
1
1
  import { ViewColumn, ViewEntity } from "typeorm";
2
2
 
3
- const jsonTransformer = {
4
- to: (value: any) => JSON.stringify(value),
5
- from: (value: string) => {
6
- try {
7
- return JSON.parse(value);
8
- } catch (error) {
9
- console.log(error, "Transformer error");
10
- return null;
11
- }
12
- },
13
- };
14
-
15
3
  @ViewEntity({
16
4
  name: "locals_company_information_for_the_table",
17
5
  })
@@ -40,7 +28,7 @@ export class LocalsCompanyInformationForTheTable {
40
28
  @ViewColumn()
41
29
  longitude: number;
42
30
 
43
- @ViewColumn({ transformer: jsonTransformer })
31
+ @ViewColumn()
44
32
  details: any | null;
45
33
 
46
34
  @ViewColumn()
@@ -61,7 +49,7 @@ export class LocalsCompanyInformationForTheTable {
61
49
  @ViewColumn()
62
50
  pos_system: number;
63
51
 
64
- @ViewColumn({ transformer: jsonTransformer })
52
+ @ViewColumn()
65
53
  pos_system_settings: any | null;
66
54
 
67
55
  @ViewColumn()
@@ -70,7 +58,7 @@ export class LocalsCompanyInformationForTheTable {
70
58
  @ViewColumn()
71
59
  visible: number;
72
60
 
73
- @ViewColumn({ transformer: jsonTransformer })
61
+ @ViewColumn()
74
62
  contact_details: any | null;
75
63
 
76
64
  @ViewColumn()
@@ -124,19 +112,19 @@ export class LocalsCompanyInformationForTheTable {
124
112
  @ViewColumn()
125
113
  company_partner: number;
126
114
 
127
- @ViewColumn({ transformer: jsonTransformer })
115
+ @ViewColumn()
128
116
  company_contact_details: any | null;
129
117
 
130
- @ViewColumn({ transformer: jsonTransformer })
118
+ @ViewColumn()
131
119
  company_profile: any | null;
132
120
 
133
121
  @ViewColumn()
134
- company_legal_agent: string;
122
+ company_legal_agent: any | null;
135
123
 
136
- @ViewColumn({ transformer: jsonTransformer })
124
+ @ViewColumn()
137
125
  company_legal_information: any | null;
138
126
 
139
- @ViewColumn({ transformer: jsonTransformer })
127
+ @ViewColumn()
140
128
  company_settings: any | null;
141
129
 
142
130
  @ViewColumn()
@@ -175,13 +163,13 @@ export class LocalsCompanyInformationForTheTable {
175
163
  @ViewColumn()
176
164
  country_currency: string;
177
165
 
178
- @ViewColumn({ transformer: jsonTransformer })
166
+ @ViewColumn()
179
167
  country_details: any | null;
180
168
 
181
- @ViewColumn({ transformer: jsonTransformer })
182
- country_legal_agent: string | null;
169
+ @ViewColumn()
170
+ country_legal_agent: any | null;
183
171
 
184
- @ViewColumn({ transformer: jsonTransformer })
172
+ @ViewColumn()
185
173
  country_legal_information: any | null;
186
174
 
187
175
  @ViewColumn()
@@ -226,7 +214,7 @@ export class LocalsCompanyInformationForTheTable {
226
214
  @ViewColumn()
227
215
  created_by_address: string | null;
228
216
 
229
- @ViewColumn({ transformer: jsonTransformer })
217
+ @ViewColumn()
230
218
  created_by_profile: any | null;
231
219
 
232
220
  @ViewColumn()
@@ -274,7 +262,7 @@ export class LocalsCompanyInformationForTheTable {
274
262
  @ViewColumn()
275
263
  partner_address: string | null;
276
264
 
277
- @ViewColumn({ transformer: jsonTransformer })
265
+ @ViewColumn()
278
266
  partner_profile: any | null;
279
267
 
280
268
  @ViewColumn()
@@ -292,7 +280,7 @@ export class LocalsCompanyInformationForTheTable {
292
280
  @ViewColumn()
293
281
  square_id: number;
294
282
 
295
- @ViewColumn({ transformer: jsonTransformer })
283
+ @ViewColumn()
296
284
  square_details: any | null;
297
285
 
298
286
  @ViewColumn()
@@ -334,7 +322,7 @@ export class LocalsCompanyInformationForTheTable {
334
322
  @ViewColumn()
335
323
  local_plan_end_date: Date;
336
324
 
337
- @ViewColumn({ transformer: jsonTransformer })
325
+ @ViewColumn()
338
326
  local_plan_settings: any | null;
339
327
 
340
328
  @ViewColumn()
@@ -355,7 +343,7 @@ export class LocalsCompanyInformationForTheTable {
355
343
  @ViewColumn()
356
344
  plan_id: number;
357
345
 
358
- @ViewColumn({ transformer: jsonTransformer })
346
+ @ViewColumn()
359
347
  plan_description: any | null;
360
348
 
361
349
  @ViewColumn()
@@ -1,11 +1,5 @@
1
1
  import { ViewEntity, ViewColumn } from "typeorm";
2
2
 
3
- // JSON Transformer
4
- const jsonTransformer = {
5
- to: (value: any) => JSON.stringify(value),
6
- from: (value: string) => JSON.parse(value),
7
- };
8
-
9
3
  @ViewEntity({
10
4
  name: "master_notifications",
11
5
  })
@@ -25,7 +19,7 @@ export class MasterNotifications {
25
19
  @ViewColumn()
26
20
  description: string;
27
21
 
28
- @ViewColumn({ transformer: jsonTransformer })
22
+ @ViewColumn()
29
23
  settings: any;
30
24
 
31
25
  @ViewColumn()
@@ -40,7 +34,7 @@ export class MasterNotifications {
40
34
  @ViewColumn()
41
35
  partner_surname: string;
42
36
 
43
- @ViewColumn({ transformer: jsonTransformer })
37
+ @ViewColumn()
44
38
  partner_profile: any;
45
39
 
46
40
  @ViewColumn()
@@ -67,7 +61,7 @@ export class MasterNotifications {
67
61
  @ViewColumn()
68
62
  master_phone: string;
69
63
 
70
- @ViewColumn({ transformer: jsonTransformer })
64
+ @ViewColumn()
71
65
  master_profile: any;
72
66
 
73
67
  @ViewColumn()
@@ -76,7 +70,7 @@ export class MasterNotifications {
76
70
  @ViewColumn()
77
71
  verify_local_id: number;
78
72
 
79
- @ViewColumn({ transformer: jsonTransformer })
73
+ @ViewColumn()
80
74
  verify_local_local_information: any;
81
75
 
82
76
  @ViewColumn()
@@ -91,7 +85,7 @@ export class MasterNotifications {
91
85
  @ViewColumn()
92
86
  company_name: string;
93
87
 
94
- @ViewColumn({ transformer: jsonTransformer })
88
+ @ViewColumn()
95
89
  company_profile: any;
96
90
 
97
91
  @ViewColumn()