test-entity-library-asm 3.9.35 → 3.9.37

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 (67) 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/Local.d.ts +4 -0
  9. package/dist/entities/Local.js +39 -0
  10. package/dist/entities/LocalReserveStatus.d.ts +1 -1
  11. package/dist/entities/LocalReserveStatus.js +2 -1
  12. package/dist/entities/LocalTableReservePayment.js +2 -3
  13. package/dist/entities/MasterNotification.js +1 -2
  14. package/dist/entities/MasterSession.js +3 -5
  15. package/dist/entities/PartnerNotification.js +1 -2
  16. package/dist/entities/PartnerSession.js +3 -5
  17. package/dist/entities/PaymentMethod.js +1 -2
  18. package/dist/entities/Product.d.ts +2 -2
  19. package/dist/entities/Product.js +4 -5
  20. package/dist/entities/ReceiptConfig.js +2 -3
  21. package/dist/entities/Request.js +3 -4
  22. package/dist/entities/RequestInvoice.js +2 -3
  23. package/dist/entities/RequestLocalTable.d.ts +1 -1
  24. package/dist/entities/RequestLocalTable.js +1 -1
  25. package/dist/entities/RequestPrint.js +1 -2
  26. package/dist/entities/ServicePlan.d.ts +1 -1
  27. package/dist/entities/ServicePlan.js +5 -4
  28. package/dist/entities/UserPaymentMethod.js +2 -3
  29. package/dist/views/LocalsCompanyInformationForTheMap.d.ts +3 -0
  30. package/dist/views/LocalsCompanyInformationForTheMap.js +12 -0
  31. package/dist/views/LocalsCompanyInformationForTheTable.d.ts +3 -0
  32. package/dist/views/LocalsCompanyInformationForTheTable.js +12 -0
  33. package/dist/views/PartnerNotifications.js +1 -11
  34. package/dist/views/Partners.d.ts +2 -2
  35. package/dist/views/Partners.js +4 -14
  36. package/dist/views/ViewLocalsCompanies.d.ts +2 -2
  37. package/dist/views/ViewLocalsCompanies.js +4 -14
  38. package/package.json +1 -1
  39. package/src/entities/BusinessType.ts +0 -1
  40. package/src/entities/Category.ts +2 -3
  41. package/src/entities/CodeRedemptionHistoryCompany.ts +4 -4
  42. package/src/entities/Company.ts +1 -0
  43. package/src/entities/CountryHoliday.ts +0 -1
  44. package/src/entities/DiscountCodeCompany.ts +6 -6
  45. package/src/entities/DiscountCodeUser.ts +1 -0
  46. package/src/entities/Gallery.ts +1 -2
  47. package/src/entities/Local.ts +39 -0
  48. package/src/entities/LocalReserveStatus.ts +2 -1
  49. package/src/entities/LocalTableReservePayment.ts +6 -7
  50. package/src/entities/MasterNotification.ts +1 -2
  51. package/src/entities/MasterSession.ts +3 -5
  52. package/src/entities/PartnerNotification.ts +1 -2
  53. package/src/entities/PartnerSession.ts +3 -5
  54. package/src/entities/PaymentMethod.ts +4 -5
  55. package/src/entities/Product.ts +14 -9
  56. package/src/entities/ReceiptConfig.ts +2 -3
  57. package/src/entities/Request.ts +3 -4
  58. package/src/entities/RequestInvoice.ts +3 -4
  59. package/src/entities/RequestLocalTable.ts +1 -3
  60. package/src/entities/RequestPrint.ts +1 -2
  61. package/src/entities/ServicePlan.ts +6 -5
  62. package/src/entities/UserPaymentMethod.ts +4 -5
  63. package/src/views/LocalsCompanyInformationForTheMap.ts +9 -0
  64. package/src/views/LocalsCompanyInformationForTheTable.ts +9 -0
  65. package/src/views/PartnerNotifications.ts +1 -12
  66. package/src/views/Partners.ts +4 -15
  67. package/src/views/ViewLocalsCompanies.ts +4 -15
@@ -8,8 +8,13 @@ import {
8
8
  OneToMany,
9
9
  PrimaryGeneratedColumn,
10
10
  } from "typeorm";
11
- import { Gallery, Partner, ProductDate, ProductImage, ProductSchedule } from "..";
12
- import { DateTransformer } from "../transformers/dateTransformer";
11
+ import {
12
+ Gallery,
13
+ Partner,
14
+ ProductDate,
15
+ ProductImage,
16
+ ProductSchedule,
17
+ } from "..";
13
18
  import { jsonTransformer } from "../transformers/jsonTransformer";
14
19
  import { Category } from "./Category";
15
20
  import { ProductGroup } from "./ProductGroup";
@@ -100,7 +105,7 @@ export class Product {
100
105
 
101
106
  @Column({
102
107
  type: "datetime",
103
- transformer: new DateTransformer(),
108
+ default: () => "CURRENT_TIMESTAMP",
104
109
  comment: "Fecha de creación del registro.",
105
110
  })
106
111
  created: Date;
@@ -109,10 +114,10 @@ export class Product {
109
114
  type: "datetime",
110
115
  nullable: true,
111
116
  default: null,
112
- transformer: new DateTransformer(),
117
+ onUpdate: "CURRENT_TIMESTAMP",
113
118
  comment: "Fecha de actualización del registro.",
114
119
  })
115
- updated: Date;
120
+ updated: Date | null;
116
121
 
117
122
  @ManyToOne(() => Partner, (partner) => partner.partners_update_by, {
118
123
  onDelete: "RESTRICT",
@@ -120,7 +125,7 @@ export class Product {
120
125
  nullable: true,
121
126
  })
122
127
  @JoinColumn({ name: "updated_by" })
123
- updated_by: Partner;
128
+ updated_by: Partner | null;
124
129
 
125
130
  @Column({
126
131
  type: "mediumtext",
@@ -164,7 +169,7 @@ export class Product {
164
169
 
165
170
  @OneToMany(
166
171
  () => ProductIngredient,
167
- (productIngredient) => productIngredient.product
172
+ (productIngredient) => productIngredient.product,
168
173
  )
169
174
  product_ingredients: ProductIngredient[];
170
175
 
@@ -187,13 +192,13 @@ export class Product {
187
192
 
188
193
  @OneToMany(
189
194
  () => ProductSchedule,
190
- (productSchedule) => productSchedule.product
195
+ (productSchedule) => productSchedule.product,
191
196
  )
192
197
  product_schedules: ProductSchedule[];
193
198
 
194
199
  @OneToMany(() => ProductDate, (productDate) => productDate.product)
195
200
  product_dates: ProductDate[];
196
-
201
+
197
202
  @OneToMany(() => ProductImage, (productImage) => productImage.product)
198
203
  products_image: ProductImage[];
199
204
 
@@ -6,7 +6,6 @@ import {
6
6
  PrimaryGeneratedColumn,
7
7
  } from "typeorm";
8
8
  import { Company, Local, User } from "..";
9
- import { DateTransformer } from "../transformers/dateTransformer";
10
9
  import { jsonTransformer } from "../transformers/jsonTransformer";
11
10
 
12
11
  @Entity({
@@ -151,7 +150,7 @@ export class ReceiptConfig {
151
150
  @Column({
152
151
  type: "datetime",
153
152
  comment: "Fecha de creación del registro.",
154
- transformer: new DateTransformer(),
153
+ default: () => "CURRENT_TIMESTAMP",
155
154
  })
156
155
  created: Date;
157
156
 
@@ -160,7 +159,7 @@ export class ReceiptConfig {
160
159
  nullable: true,
161
160
  default: null,
162
161
  comment: "Fecha de actualización del registro.",
163
- transformer: new DateTransformer(),
162
+ onUpdate: "CURRENT_TIMESTAMP",
164
163
  })
165
164
  updated: Date | null;
166
165
 
@@ -9,12 +9,11 @@ import {
9
9
  PrimaryGeneratedColumn,
10
10
  } from "typeorm";
11
11
  import { RequestLocal, RequestPrint, UserAddress } from "..";
12
- import { DateTransformer } from "../transformers/dateTransformer";
13
12
  import { User } from "./User";
14
13
 
15
14
  @Entity({
16
15
  comment:
17
- "Tabla para agregar los pedidos realizados através de la plataforma.",
16
+ "Tabla para agregar los pedidos realizados a través de la plataforma.",
18
17
  })
19
18
  export class Request {
20
19
  @PrimaryGeneratedColumn({
@@ -116,14 +115,14 @@ export class Request {
116
115
 
117
116
  @Column({
118
117
  type: "datetime",
119
- transformer: new DateTransformer(),
118
+ default: () => "CURRENT_TIMESTAMP",
120
119
  comment: "Fecha en la que el cliente final crea el pedido.",
121
120
  })
122
121
  created: Date;
123
122
 
124
123
  @Column({
125
124
  type: "datetime",
126
- transformer: new DateTransformer(),
125
+ onUpdate: "CURRENT_TIMESTAMP",
127
126
  nullable: true,
128
127
  default: null,
129
128
  comment:
@@ -6,7 +6,6 @@ import {
6
6
  OneToMany,
7
7
  PrimaryGeneratedColumn,
8
8
  } from "typeorm";
9
- import { DateTransformer } from "../transformers/dateTransformer";
10
9
  import { Local } from "./Local";
11
10
  import { Partner } from "./Partner";
12
11
  import { RequestInvoiceCategory } from "./RequestInvoiceCategory";
@@ -85,14 +84,14 @@ export class RequestInvoice {
85
84
 
86
85
  @Column({
87
86
  type: "datetime",
88
- transformer: new DateTransformer(),
87
+ default: () => "CURRENT_TIMESTAMP",
89
88
  comment: "Fecha de creación del registro.",
90
89
  })
91
90
  created: Date;
92
91
 
93
92
  @Column({
94
93
  type: "datetime",
95
- transformer: new DateTransformer(),
94
+ onUpdate: "CURRENT_TIMESTAMP",
96
95
  nullable: true,
97
96
  default: null,
98
97
  comment: "Fecha de actualización del registro.",
@@ -117,7 +116,7 @@ export class RequestInvoice {
117
116
 
118
117
  @OneToMany(
119
118
  () => RequestInvoiceCategory,
120
- (requestInvoiceCategory) => requestInvoiceCategory.request_invoice
119
+ (requestInvoiceCategory) => requestInvoiceCategory.request_invoice,
121
120
  )
122
121
  request_invoice_categories: RequestInvoiceCategory[];
123
122
  }
@@ -1,8 +1,6 @@
1
1
  import { Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
2
- import { RequestInvoice } from "./RequestInvoice";
3
- import { Category } from "./Category";
4
- import { RequestLocal } from "./RequestLocal";
5
2
  import { LocalTable } from "./LocalTable";
3
+ import { RequestLocal } from "./RequestLocal";
6
4
 
7
5
  @Entity({
8
6
  comment: "Relación de la/s mesas y el local del cuál se está pidiendo.",
@@ -6,7 +6,6 @@ import {
6
6
  PrimaryGeneratedColumn,
7
7
  } from "typeorm";
8
8
  import { Partner } from "..";
9
- import { DateTransformer } from "../transformers/dateTransformer";
10
9
  import { Request } from "./Request";
11
10
 
12
11
  @Entity("request_print", {
@@ -45,7 +44,7 @@ export class RequestPrint {
45
44
 
46
45
  @Column({
47
46
  type: "datetime",
48
- transformer: new DateTransformer(),
47
+ default: () => "CURRENT_TIMESTAMP",
49
48
  comment: "Fecha creación de la impresión.",
50
49
  })
51
50
  created: Date;
@@ -7,7 +7,6 @@ import {
7
7
  PrimaryGeneratedColumn,
8
8
  Unique,
9
9
  } from "typeorm";
10
- import { DateTransformer } from "../transformers/dateTransformer";
11
10
  import { jsonTransformer } from "../transformers/jsonTransformer";
12
11
  import { Master } from "./Master";
13
12
  import { ServiceDiscountsPlan } from "./ServiceDiscountsPlan";
@@ -50,17 +49,19 @@ export class ServicePlan {
50
49
 
51
50
  @Column({
52
51
  type: "datetime",
53
- transformer: new DateTransformer(),
52
+ default: () => "CURRENT_TIMESTAMP",
54
53
  comment: "Fecha de creación del registro.",
55
54
  })
56
55
  created: Date;
57
56
 
58
57
  @Column({
59
58
  type: "datetime",
60
- transformer: new DateTransformer(),
59
+ nullable: true,
60
+ default: null,
61
+ onUpdate: "CURRENT_TIMESTAMP",
61
62
  comment: "Fecha de actualización del registro.",
62
63
  })
63
- updated: Date;
64
+ updated: Date | null;
64
65
 
65
66
  @ManyToOne(() => Master, (master) => master.id, {
66
67
  onDelete: "SET NULL",
@@ -72,7 +73,7 @@ export class ServicePlan {
72
73
 
73
74
  @OneToMany(
74
75
  () => ServiceDiscountsPlan,
75
- (serviceDiscountsPlan) => serviceDiscountsPlan.servicePlan
76
+ (serviceDiscountsPlan) => serviceDiscountsPlan.servicePlan,
76
77
  )
77
78
  service_discounts_plan: ServiceDiscountsPlan[];
78
79
  }
@@ -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
  }
@@ -40,6 +40,9 @@ export class LocalsCompanyInformationForTheMap {
40
40
  @ViewColumn({ transformer: jsonTransformer })
41
41
  details: any | null;
42
42
 
43
+ @ViewColumn({ transformer: jsonTransformer })
44
+ changes: any | null;
45
+
43
46
  @ViewColumn()
44
47
  created: Date;
45
48
 
@@ -67,6 +70,12 @@ export class LocalsCompanyInformationForTheMap {
67
70
  @ViewColumn({ transformer: jsonTransformer })
68
71
  contact_details: any | null;
69
72
 
73
+ @ViewColumn()
74
+ review_status: number;
75
+
76
+ @ViewColumn()
77
+ operation_type: number;
78
+
70
79
  @ViewColumn()
71
80
  company_code: string;
72
81
 
@@ -40,6 +40,9 @@ export class LocalsCompanyInformationForTheTable {
40
40
  @ViewColumn({ transformer: jsonTransformer })
41
41
  details: any | null;
42
42
 
43
+ @ViewColumn({ transformer: jsonTransformer })
44
+ changes: any | null;
45
+
43
46
  @ViewColumn()
44
47
  created: Date;
45
48
 
@@ -67,6 +70,12 @@ export class LocalsCompanyInformationForTheTable {
67
70
  @ViewColumn({ transformer: jsonTransformer })
68
71
  contact_details: any | null;
69
72
 
73
+ @ViewColumn()
74
+ review_status: number;
75
+
76
+ @ViewColumn()
77
+ operation_type: number;
78
+
70
79
  @ViewColumn()
71
80
  type_local: string;
72
81
 
@@ -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;