test-entity-library-asm 3.9.35 → 3.9.36

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 (58) hide show
  1. package/dist/entities/Category.js +2 -3
  2. package/dist/entities/CodeRedemptionHistoryCompany.js +2 -2
  3. package/dist/entities/Company.js +1 -0
  4. package/dist/entities/DiscountCodeCompany.d.ts +1 -1
  5. package/dist/entities/DiscountCodeCompany.js +4 -4
  6. package/dist/entities/DiscountCodeUser.js +1 -0
  7. package/dist/entities/Gallery.js +1 -2
  8. package/dist/entities/LocalReserveStatus.d.ts +1 -1
  9. package/dist/entities/LocalReserveStatus.js +2 -1
  10. package/dist/entities/LocalTableReservePayment.js +2 -3
  11. package/dist/entities/MasterNotification.js +1 -2
  12. package/dist/entities/MasterSession.js +3 -5
  13. package/dist/entities/PartnerNotification.js +1 -2
  14. package/dist/entities/PartnerSession.js +3 -5
  15. package/dist/entities/PaymentMethod.js +1 -2
  16. package/dist/entities/Product.d.ts +2 -2
  17. package/dist/entities/Product.js +4 -5
  18. package/dist/entities/ReceiptConfig.js +2 -3
  19. package/dist/entities/Request.js +3 -4
  20. package/dist/entities/RequestInvoice.js +2 -3
  21. package/dist/entities/RequestLocalTable.d.ts +1 -1
  22. package/dist/entities/RequestLocalTable.js +1 -1
  23. package/dist/entities/RequestPrint.js +1 -2
  24. package/dist/entities/ServicePlan.d.ts +1 -1
  25. package/dist/entities/ServicePlan.js +5 -4
  26. package/dist/entities/UserPaymentMethod.js +2 -3
  27. package/dist/views/PartnerNotifications.js +1 -11
  28. package/dist/views/Partners.d.ts +2 -2
  29. package/dist/views/Partners.js +4 -14
  30. package/dist/views/ViewLocalsCompanies.d.ts +2 -2
  31. package/dist/views/ViewLocalsCompanies.js +4 -14
  32. package/package.json +1 -1
  33. package/src/entities/BusinessType.ts +0 -1
  34. package/src/entities/Category.ts +2 -3
  35. package/src/entities/CodeRedemptionHistoryCompany.ts +4 -4
  36. package/src/entities/Company.ts +1 -0
  37. package/src/entities/CountryHoliday.ts +0 -1
  38. package/src/entities/DiscountCodeCompany.ts +6 -6
  39. package/src/entities/DiscountCodeUser.ts +1 -0
  40. package/src/entities/Gallery.ts +1 -2
  41. package/src/entities/LocalReserveStatus.ts +2 -1
  42. package/src/entities/LocalTableReservePayment.ts +6 -7
  43. package/src/entities/MasterNotification.ts +1 -2
  44. package/src/entities/MasterSession.ts +3 -5
  45. package/src/entities/PartnerNotification.ts +1 -2
  46. package/src/entities/PartnerSession.ts +3 -5
  47. package/src/entities/PaymentMethod.ts +4 -5
  48. package/src/entities/Product.ts +14 -9
  49. package/src/entities/ReceiptConfig.ts +2 -3
  50. package/src/entities/Request.ts +3 -4
  51. package/src/entities/RequestInvoice.ts +3 -4
  52. package/src/entities/RequestLocalTable.ts +1 -3
  53. package/src/entities/RequestPrint.ts +1 -2
  54. package/src/entities/ServicePlan.ts +6 -5
  55. package/src/entities/UserPaymentMethod.ts +4 -5
  56. package/src/views/PartnerNotifications.ts +1 -12
  57. package/src/views/Partners.ts +4 -15
  58. package/src/views/ViewLocalsCompanies.ts +4 -15
@@ -7,7 +7,6 @@ import {
7
7
  PrimaryGeneratedColumn,
8
8
  } from "typeorm";
9
9
  import { LocalTableReservePayment, RequestLocalPayment } from "..";
10
- import { DateTransformer } from "../transformers/dateTransformer";
11
10
  import { User } from "./User";
12
11
 
13
12
  @Entity("user_payment_method", {
@@ -89,7 +88,7 @@ export class UserPaymentMethod {
89
88
 
90
89
  @Column({
91
90
  type: "datetime",
92
- transformer: new DateTransformer(),
91
+ default: () => "CURRENT_TIMESTAMP",
93
92
  comment: "Fecha de creación del registro.",
94
93
  })
95
94
  created: Date;
@@ -98,20 +97,20 @@ export class UserPaymentMethod {
98
97
  type: "datetime",
99
98
  nullable: true,
100
99
  default: null,
101
- transformer: new DateTransformer(),
100
+ onUpdate: "CURRENT_TIMESTAMP",
102
101
  comment: "Fecha de actualización del registro.",
103
102
  })
104
103
  updated: Date | null;
105
104
 
106
105
  @OneToMany(
107
106
  () => RequestLocalPayment,
108
- (requestLocalPayment) => requestLocalPayment.card
107
+ (requestLocalPayment) => requestLocalPayment.card,
109
108
  )
110
109
  cards: RequestLocalPayment[];
111
110
 
112
111
  @OneToMany(
113
112
  () => LocalTableReservePayment,
114
- (localTableReservePayment) => localTableReservePayment.card
113
+ (localTableReservePayment) => localTableReservePayment.card,
115
114
  )
116
115
  local_table_reserve_payments: LocalTableReservePayment[];
117
116
  }
@@ -1,6 +1,4 @@
1
1
  import { ViewEntity, ViewColumn } from "typeorm";
2
- import moment = require("moment-timezone");
3
- import { getTimeZone } from "..";
4
2
 
5
3
  // JSON Transformer
6
4
  const jsonTransformer = {
@@ -8,15 +6,6 @@ const jsonTransformer = {
8
6
  from: (value: string) => JSON.parse(value),
9
7
  };
10
8
 
11
- const DateTransformer = {
12
- to(value: Date | string): string {
13
- return moment.utc(value).format("YYYY-MM-DD HH:mm:ss");
14
- },
15
- from(value: string): string {
16
- return moment.utc(value).tz(getTimeZone()).format("YYYY-MM-DD HH:mm:ss");
17
- },
18
- };
19
-
20
9
  @ViewEntity({
21
10
  name: "partner_notifications",
22
11
  })
@@ -39,7 +28,7 @@ export class PartnerNotifications {
39
28
  @ViewColumn({ transformer: jsonTransformer })
40
29
  settings: any;
41
30
 
42
- @ViewColumn({ transformer: DateTransformer })
31
+ @ViewColumn()
43
32
  created: Date;
44
33
 
45
34
  @ViewColumn()
@@ -1,6 +1,4 @@
1
1
  import { ViewEntity, ViewColumn } from "typeorm";
2
- import moment = require("moment-timezone");
3
- import { getTimeZone } from "..";
4
2
 
5
3
  // JSON Transformer
6
4
  const jsonTransformer = {
@@ -15,15 +13,6 @@ const jsonTransformer = {
15
13
  },
16
14
  };
17
15
 
18
- const DateTransformer = {
19
- to(value: Date | string): string {
20
- return moment.utc(value).format("YYYY-MM-DD HH:mm:ss");
21
- },
22
- from(value: string): string {
23
- return moment.utc(value).tz(getTimeZone()).format("YYYY-MM-DD HH:mm:ss");
24
- },
25
- };
26
-
27
16
  @ViewEntity({
28
17
  name: "partners",
29
18
  })
@@ -67,11 +56,11 @@ export class Partners {
67
56
  @ViewColumn()
68
57
  owner: number;
69
58
 
70
- @ViewColumn({ transformer: DateTransformer })
71
- created: string;
59
+ @ViewColumn()
60
+ created: Date;
72
61
 
73
- @ViewColumn({ transformer: DateTransformer })
74
- updated: string;
62
+ @ViewColumn()
63
+ updated: Date;
75
64
 
76
65
  @ViewColumn()
77
66
  status: number;
@@ -1,6 +1,4 @@
1
1
  import { ViewEntity, ViewColumn } from "typeorm";
2
- import moment = require("moment-timezone");
3
- import { getTimeZone } from "..";
4
2
 
5
3
  // JSON Transformer
6
4
  const jsonTransformer = {
@@ -8,15 +6,6 @@ const jsonTransformer = {
8
6
  from: (value: string) => JSON.parse(value),
9
7
  };
10
8
 
11
- const DateTransformer = {
12
- to(value: Date | string): string {
13
- return moment.utc(value).format("YYYY-MM-DD HH:mm:ss");
14
- },
15
- from(value: string): string {
16
- return moment.utc(value).tz(getTimeZone()).format("YYYY-MM-DD HH:mm:ss");
17
- },
18
- };
19
-
20
9
  @ViewEntity({
21
10
  name: "view_locals_companies",
22
11
  })
@@ -27,11 +16,11 @@ export class ViewLocalsCompanies {
27
16
  @ViewColumn()
28
17
  name_local: string;
29
18
 
30
- @ViewColumn({ transformer: DateTransformer })
31
- created_local: string;
19
+ @ViewColumn()
20
+ created_local: Date;
32
21
 
33
- @ViewColumn({ transformer: DateTransformer })
34
- updated_local: string;
22
+ @ViewColumn()
23
+ updated_local: Date;
35
24
 
36
25
  @ViewColumn()
37
26
  status: number;