test-entity-library-asm 3.4.5 → 3.4.7

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 (36) hide show
  1. package/dist/entities/DecorationReserve.d.ts +8 -0
  2. package/dist/entities/DecorationReserve.js +62 -0
  3. package/dist/entities/Local.d.ts +2 -1
  4. package/dist/entities/Local.js +4 -0
  5. package/dist/entities/LocalDecorationReserve.d.ts +10 -0
  6. package/dist/entities/LocalDecorationReserve.js +80 -0
  7. package/dist/entities/LocalTable.d.ts +3 -1
  8. package/dist/entities/LocalTable.js +13 -1
  9. package/dist/entities/LocalTableReserve.d.ts +19 -0
  10. package/dist/entities/LocalTableReserve.js +160 -0
  11. package/dist/entities/LocalTableReservePayment.d.ts +19 -0
  12. package/dist/entities/LocalTableReservePayment.js +172 -0
  13. package/dist/entities/Partner.d.ts +2 -1
  14. package/dist/entities/Partner.js +4 -0
  15. package/dist/entities/PaymentMethod.d.ts +2 -1
  16. package/dist/entities/PaymentMethod.js +4 -0
  17. package/dist/entities/RequestLocalPayment.js +1 -1
  18. package/dist/entities/User.d.ts +3 -1
  19. package/dist/entities/User.js +8 -0
  20. package/dist/entities/UserPaymentMethod.d.ts +2 -1
  21. package/dist/entities/UserPaymentMethod.js +4 -0
  22. package/dist/entities.views.routes.d.ts +4 -0
  23. package/dist/entities.views.routes.js +9 -1
  24. package/package.json +1 -1
  25. package/src/entities/DecorationReserve.ts +44 -0
  26. package/src/entities/Local.ts +4 -0
  27. package/src/entities/LocalDecorationReserve.ts +69 -0
  28. package/src/entities/LocalTable.ts +21 -1
  29. package/src/entities/LocalTableReserve.ts +148 -0
  30. package/src/entities/LocalTableReservePayment.ts +165 -0
  31. package/src/entities/Partner.ts +7 -0
  32. package/src/entities/PaymentMethod.ts +7 -1
  33. package/src/entities/RequestLocalPayment.ts +1 -1
  34. package/src/entities/User.ts +19 -4
  35. package/src/entities/UserPaymentMethod.ts +7 -1
  36. package/src/entities.views.routes.ts +4 -0
@@ -0,0 +1,8 @@
1
+ import { LocalDecorationReserve } from "..";
2
+ export declare class DecorationReserve {
3
+ id: number;
4
+ name: string;
5
+ details: string;
6
+ status: number;
7
+ local_decorations_reserve: LocalDecorationReserve[];
8
+ }
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DecorationReserve = void 0;
13
+ var typeorm_1 = require("typeorm");
14
+ var __1 = require("..");
15
+ var DecorationReserve = /** @class */ (function () {
16
+ function DecorationReserve() {
17
+ }
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)({
20
+ type: "int",
21
+ comment: "Id único de cada registro.",
22
+ }),
23
+ __metadata("design:type", Number)
24
+ ], DecorationReserve.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({
27
+ length: 50,
28
+ type: "varchar",
29
+ comment: "Nombre de la decoración.\r\nEste nombre debe ser claro y preciso.",
30
+ }),
31
+ __metadata("design:type", String)
32
+ ], DecorationReserve.prototype, "name", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({
35
+ length: 200,
36
+ type: "varchar",
37
+ comment: "Comentarios adicionales/observaciones de la decoración.",
38
+ }),
39
+ __metadata("design:type", String)
40
+ ], DecorationReserve.prototype, "details", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({
43
+ default: 1,
44
+ type: "int",
45
+ width: 1,
46
+ comment: "Estado que se encuentra el registro:\r\n0: Inactivo.\r\n1: Activo.",
47
+ }),
48
+ __metadata("design:type", Number)
49
+ ], DecorationReserve.prototype, "status", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.OneToMany)(function () { return __1.LocalDecorationReserve; }, function (localDecorationReserve) { return localDecorationReserve.name; }),
52
+ __metadata("design:type", Array)
53
+ ], DecorationReserve.prototype, "local_decorations_reserve", void 0);
54
+ DecorationReserve = __decorate([
55
+ (0, typeorm_1.Entity)({
56
+ comment: "Tipos de decoración qué tiene el software, lo maneja ASM.",
57
+ name: "decoration_reserve",
58
+ })
59
+ ], DecorationReserve);
60
+ return DecorationReserve;
61
+ }());
62
+ exports.DecorationReserve = DecorationReserve;
@@ -1,4 +1,4 @@
1
- import { DiscountCodeUser, LocalPlan, LocalTable, LocalTableZone, PosSystem, ReceiptConfig, RequestLocal } from "..";
1
+ import { DiscountCodeUser, LocalDecorationReserve, LocalPlan, LocalTable, LocalTableZone, PosSystem, ReceiptConfig, RequestLocal } from "..";
2
2
  import { BusinessTypeProduct } from "./BusinessTypeProduct";
3
3
  import { Category } from "./Category";
4
4
  import { City } from "./City";
@@ -37,4 +37,5 @@ export declare class Local {
37
37
  receipts_local_config: ReceiptConfig[];
38
38
  local_table_zones: LocalTableZone[];
39
39
  local_tables: LocalTable[];
40
+ local_decorations_reserve: LocalDecorationReserve[];
40
41
  }
@@ -227,6 +227,10 @@ var Local = /** @class */ (function () {
227
227
  (0, typeorm_1.OneToMany)(function () { return __1.LocalTable; }, function (localTable) { return localTable.local; }),
228
228
  __metadata("design:type", Array)
229
229
  ], Local.prototype, "local_tables", void 0);
230
+ __decorate([
231
+ (0, typeorm_1.OneToMany)(function () { return __1.LocalDecorationReserve; }, function (localDecorationReserve) { return localDecorationReserve.local; }),
232
+ __metadata("design:type", Array)
233
+ ], Local.prototype, "local_decorations_reserve", void 0);
230
234
  Local = __decorate([
231
235
  (0, typeorm_1.Entity)({ comment: "Locales disponibles de las empresas (company)." })
232
236
  ], Local);
@@ -0,0 +1,10 @@
1
+ import { DecorationReserve, Local, LocalTableReserve } from "..";
2
+ export declare class LocalDecorationReserve {
3
+ id: number;
4
+ code: string;
5
+ local: Local;
6
+ name: DecorationReserve;
7
+ price: number;
8
+ status: number;
9
+ local_table_reserves: LocalTableReserve[];
10
+ }
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.LocalDecorationReserve = void 0;
13
+ var typeorm_1 = require("typeorm");
14
+ var __1 = require("..");
15
+ var LocalDecorationReserve = /** @class */ (function () {
16
+ function LocalDecorationReserve() {
17
+ }
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)({
20
+ type: "int",
21
+ comment: "Id único de cada registro.",
22
+ }),
23
+ __metadata("design:type", Number)
24
+ ], LocalDecorationReserve.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({
27
+ length: 10,
28
+ type: "varchar",
29
+ unique: true,
30
+ comment: "Código único de cada registro.",
31
+ }),
32
+ __metadata("design:type", String)
33
+ ], LocalDecorationReserve.prototype, "code", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.ManyToOne)(function () { return __1.Local; }, function (local) { return local.local_decorations_reserve; }, {
36
+ onDelete: "NO ACTION",
37
+ onUpdate: "NO ACTION",
38
+ }),
39
+ (0, typeorm_1.JoinColumn)({ name: "local" }),
40
+ __metadata("design:type", __1.Local)
41
+ ], LocalDecorationReserve.prototype, "local", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.ManyToOne)(function () { return __1.DecorationReserve; }, function (decorationReserve) { return decorationReserve.local_decorations_reserve; }, {
44
+ onDelete: "RESTRICT",
45
+ onUpdate: "NO ACTION",
46
+ }),
47
+ (0, typeorm_1.JoinColumn)({ name: "name" }),
48
+ __metadata("design:type", __1.DecorationReserve)
49
+ ], LocalDecorationReserve.prototype, "name", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Column)({
52
+ type: "decimal",
53
+ precision: 10,
54
+ scale: 2,
55
+ comment: "Precio de la decoración.",
56
+ }),
57
+ __metadata("design:type", Number)
58
+ ], LocalDecorationReserve.prototype, "price", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({
61
+ default: 1,
62
+ type: "int",
63
+ width: 1,
64
+ comment: "Estado de la decoración:\r\n0: Inactivo.\r\n1: Activo.",
65
+ }),
66
+ __metadata("design:type", Number)
67
+ ], LocalDecorationReserve.prototype, "status", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.OneToMany)(function () { return __1.LocalTableReserve; }, function (localTableReserve) { return localTableReserve.decoration; }),
70
+ __metadata("design:type", Array)
71
+ ], LocalDecorationReserve.prototype, "local_table_reserves", void 0);
72
+ LocalDecorationReserve = __decorate([
73
+ (0, typeorm_1.Entity)({
74
+ comment: "Tipos de decoración qué tiene el local.",
75
+ name: "local_decoration_reserve",
76
+ })
77
+ ], LocalDecorationReserve);
78
+ return LocalDecorationReserve;
79
+ }());
80
+ exports.LocalDecorationReserve = LocalDecorationReserve;
@@ -1,4 +1,4 @@
1
- import { Local, LocalTableZone, Partner, RequestLocal } from "..";
1
+ import { Local, LocalTableReserve, LocalTableZone, Partner, RequestLocal } from "..";
2
2
  export declare class LocalTable {
3
3
  id: number;
4
4
  code: string;
@@ -10,9 +10,11 @@ export declare class LocalTable {
10
10
  type: number;
11
11
  zone: LocalTableZone;
12
12
  description: string | null;
13
+ number: number;
13
14
  created: Date;
14
15
  updated: Date | null;
15
16
  updated_by: Partner | null;
16
17
  status: number;
17
18
  request_locals: RequestLocal[];
19
+ local_table_reserves: LocalTableReserve[];
18
20
  }
@@ -97,6 +97,13 @@ var LocalTable = /** @class */ (function () {
97
97
  }),
98
98
  __metadata("design:type", Object)
99
99
  ], LocalTable.prototype, "description", void 0);
100
+ __decorate([
101
+ (0, typeorm_1.Column)({
102
+ type: "int",
103
+ comment: "Número consecutivo de cada mesa.",
104
+ }),
105
+ __metadata("design:type", Number)
106
+ ], LocalTable.prototype, "number", void 0);
100
107
  __decorate([
101
108
  (0, typeorm_1.Column)({
102
109
  type: "datetime",
@@ -137,11 +144,16 @@ var LocalTable = /** @class */ (function () {
137
144
  (0, typeorm_1.OneToMany)(function () { return __1.RequestLocal; }, function (requestLocal) { return requestLocal.local_table; }),
138
145
  __metadata("design:type", Array)
139
146
  ], LocalTable.prototype, "request_locals", void 0);
147
+ __decorate([
148
+ (0, typeorm_1.OneToMany)(function () { return __1.LocalTableReserve; }, function (localTableReserve) { return localTableReserve.local_table; }),
149
+ __metadata("design:type", Array)
150
+ ], LocalTable.prototype, "local_table_reserves", void 0);
140
151
  LocalTable = __decorate([
141
152
  (0, typeorm_1.Entity)({
142
153
  comment: "Mesas qué se encuentran en el local.",
143
154
  name: "local_table",
144
- })
155
+ }),
156
+ (0, typeorm_1.Unique)("uq_zone_number", ["zone", "number"])
145
157
  ], LocalTable);
146
158
  return LocalTable;
147
159
  }());
@@ -0,0 +1,19 @@
1
+ import { LocalDecorationReserve, LocalTable, LocalTableReservePayment, User } from "..";
2
+ export declare class LocalTableReserve {
3
+ id: number;
4
+ code: string;
5
+ local_table: LocalTable;
6
+ user_name: string;
7
+ user_phone: string | null;
8
+ user_email: string | null;
9
+ user: User | null;
10
+ date: Date;
11
+ start_time: string;
12
+ end_time: string;
13
+ details: string | null;
14
+ decoration: LocalDecorationReserve;
15
+ created: Date;
16
+ updated: Date | null;
17
+ status: number;
18
+ local_table_reserve_payments: LocalTableReservePayment[];
19
+ }
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.LocalTableReserve = void 0;
13
+ var typeorm_1 = require("typeorm");
14
+ var __1 = require("..");
15
+ var dateTransformer_1 = require("../transformers/dateTransformer");
16
+ var LocalTableReserve = /** @class */ (function () {
17
+ function LocalTableReserve() {
18
+ }
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)({
21
+ type: "int",
22
+ comment: "Id único de cada registro.",
23
+ }),
24
+ __metadata("design:type", Number)
25
+ ], LocalTableReserve.prototype, "id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)({
28
+ length: 10,
29
+ type: "varchar",
30
+ unique: true,
31
+ comment: "Código único del registro.\r\nEste elemento nos sirve como identificador si se llega a necesitar.",
32
+ }),
33
+ __metadata("design:type", String)
34
+ ], LocalTableReserve.prototype, "code", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.ManyToOne)(function () { return __1.LocalTable; }, function (local) { return local.local_table_reserves; }, {
37
+ onDelete: "CASCADE",
38
+ onUpdate: "NO ACTION",
39
+ }),
40
+ (0, typeorm_1.JoinColumn)({ name: "local_table" }),
41
+ __metadata("design:type", __1.LocalTable)
42
+ ], LocalTableReserve.prototype, "local_table", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({
45
+ type: "varchar",
46
+ length: 100,
47
+ comment: "Nombre del usuario/cliente qué aparta.",
48
+ }),
49
+ __metadata("design:type", String)
50
+ ], LocalTableReserve.prototype, "user_name", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({
53
+ type: "varchar",
54
+ length: 14,
55
+ nullable: true,
56
+ default: null,
57
+ comment: "Número de celular del usuario/cliente si es necesario, para recordarle.",
58
+ }),
59
+ __metadata("design:type", Object)
60
+ ], LocalTableReserve.prototype, "user_phone", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({
63
+ type: "varchar",
64
+ length: 100,
65
+ nullable: true,
66
+ default: null,
67
+ comment: "Correo electrónico del usuario/cliente qué aparta, si es necesario, para recordarle.",
68
+ }),
69
+ __metadata("design:type", Object)
70
+ ], LocalTableReserve.prototype, "user_email", void 0);
71
+ __decorate([
72
+ (0, typeorm_1.ManyToOne)(function () { return __1.User; }, function (user) { return user.local_table_reserves; }, {
73
+ onDelete: "SET NULL",
74
+ onUpdate: "NO ACTION",
75
+ nullable: true,
76
+ }),
77
+ (0, typeorm_1.JoinColumn)({ name: "user" }),
78
+ __metadata("design:type", Object)
79
+ ], LocalTableReserve.prototype, "user", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.Column)({
82
+ type: "date",
83
+ comment: "Fecha de la reserva.",
84
+ }),
85
+ __metadata("design:type", Date)
86
+ ], LocalTableReserve.prototype, "date", void 0);
87
+ __decorate([
88
+ (0, typeorm_1.Column)({
89
+ type: "varchar",
90
+ length: 5,
91
+ comment: "Hora de inicio de la reserva.",
92
+ }),
93
+ __metadata("design:type", String)
94
+ ], LocalTableReserve.prototype, "start_time", void 0);
95
+ __decorate([
96
+ (0, typeorm_1.Column)({
97
+ type: "varchar",
98
+ length: 5,
99
+ comment: "Hora finalización de la reserva.",
100
+ }),
101
+ __metadata("design:type", String)
102
+ ], LocalTableReserve.prototype, "end_time", void 0);
103
+ __decorate([
104
+ (0, typeorm_1.Column)({
105
+ type: "varchar",
106
+ length: 400,
107
+ nullable: true,
108
+ default: null,
109
+ comment: "Hora finalización de la reserva.",
110
+ }),
111
+ __metadata("design:type", Object)
112
+ ], LocalTableReserve.prototype, "details", void 0);
113
+ __decorate([
114
+ (0, typeorm_1.ManyToOne)(function () { return __1.LocalDecorationReserve; }, function (localDecorationReserve) { return localDecorationReserve.local_table_reserves; }, {
115
+ onDelete: "SET NULL",
116
+ onUpdate: "NO ACTION",
117
+ }),
118
+ (0, typeorm_1.JoinColumn)({ name: "decoration" }),
119
+ __metadata("design:type", __1.LocalDecorationReserve)
120
+ ], LocalTableReserve.prototype, "decoration", void 0);
121
+ __decorate([
122
+ (0, typeorm_1.Column)({
123
+ type: "datetime",
124
+ comment: "Fecha creación del registro.",
125
+ transformer: new dateTransformer_1.DateTransformer(),
126
+ }),
127
+ __metadata("design:type", Date)
128
+ ], LocalTableReserve.prototype, "created", void 0);
129
+ __decorate([
130
+ (0, typeorm_1.Column)({
131
+ type: "datetime",
132
+ nullable: true,
133
+ default: null,
134
+ comment: "Fecha de actualización del registro.",
135
+ transformer: new dateTransformer_1.DateTransformer(),
136
+ }),
137
+ __metadata("design:type", Object)
138
+ ], LocalTableReserve.prototype, "updated", void 0);
139
+ __decorate([
140
+ (0, typeorm_1.Column)({
141
+ default: 1,
142
+ type: "int",
143
+ width: 1,
144
+ comment: "Estado del registro:\r\n0: Inactivo.\r\n1: Activo.",
145
+ }),
146
+ __metadata("design:type", Number)
147
+ ], LocalTableReserve.prototype, "status", void 0);
148
+ __decorate([
149
+ (0, typeorm_1.OneToMany)(function () { return __1.LocalTableReservePayment; }, function (localTableReservePayment) { return localTableReservePayment.local_table_reserve; }),
150
+ __metadata("design:type", Array)
151
+ ], LocalTableReserve.prototype, "local_table_reserve_payments", void 0);
152
+ LocalTableReserve = __decorate([
153
+ (0, typeorm_1.Entity)({
154
+ comment: "Reservas de mesas del local.",
155
+ name: "local_table_reserve",
156
+ })
157
+ ], LocalTableReserve);
158
+ return LocalTableReserve;
159
+ }());
160
+ exports.LocalTableReserve = LocalTableReserve;
@@ -0,0 +1,19 @@
1
+ import { LocalTableReserve, Partner, PaymentMethod, User, UserPaymentMethod } from "..";
2
+ export declare class LocalTableReservePayment {
3
+ id: number;
4
+ code: string;
5
+ local_table_reserve: LocalTableReserve;
6
+ payment_method: PaymentMethod;
7
+ amount_paid: number;
8
+ remaining_amount: number;
9
+ card_last_four_digits: string | null;
10
+ card_type: string | null;
11
+ card: UserPaymentMethod | null;
12
+ comments: string | null;
13
+ user: User | null;
14
+ status: number;
15
+ created: Date;
16
+ updated: Date | null;
17
+ partner: Partner | null;
18
+ user_ip: string | null;
19
+ }
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.LocalTableReservePayment = void 0;
13
+ var typeorm_1 = require("typeorm");
14
+ var __1 = require("..");
15
+ var dateTransformer_1 = require("../transformers/dateTransformer");
16
+ var LocalTableReservePayment = /** @class */ (function () {
17
+ function LocalTableReservePayment() {
18
+ }
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)({
21
+ type: "int",
22
+ comment: "ID único de cada registro.",
23
+ }),
24
+ __metadata("design:type", Number)
25
+ ], LocalTableReservePayment.prototype, "id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)({
28
+ length: 40,
29
+ type: "varchar",
30
+ unique: true,
31
+ comment: "Código único de cada registro.",
32
+ }),
33
+ __metadata("design:type", String)
34
+ ], LocalTableReservePayment.prototype, "code", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.ManyToOne)(function () { return __1.LocalTableReserve; }, function (localTableReserve) { return localTableReserve.local_table_reserve_payments; }, {
37
+ onDelete: "RESTRICT",
38
+ onUpdate: "NO ACTION",
39
+ }),
40
+ (0, typeorm_1.JoinColumn)({ name: "local_table_reserve" }),
41
+ __metadata("design:type", __1.LocalTableReserve)
42
+ ], LocalTableReservePayment.prototype, "local_table_reserve", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.ManyToOne)(function () { return __1.PaymentMethod; }, function (paymentMethod) { return paymentMethod.payment_methods; }, {
45
+ onDelete: "NO ACTION",
46
+ onUpdate: "NO ACTION",
47
+ }),
48
+ (0, typeorm_1.JoinColumn)({ name: "payment_method" }),
49
+ __metadata("design:type", __1.PaymentMethod)
50
+ ], LocalTableReservePayment.prototype, "payment_method", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({
53
+ type: "decimal",
54
+ precision: 10,
55
+ scale: 2,
56
+ comment: "Monto que se paga de la reserva.",
57
+ }),
58
+ __metadata("design:type", Number)
59
+ ], LocalTableReservePayment.prototype, "amount_paid", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({
62
+ type: "decimal",
63
+ precision: 10,
64
+ scale: 2,
65
+ nullable: true,
66
+ default: null,
67
+ comment: "Monto restante para pagar.",
68
+ }),
69
+ __metadata("design:type", Number)
70
+ ], LocalTableReservePayment.prototype, "remaining_amount", void 0);
71
+ __decorate([
72
+ (0, typeorm_1.Column)({
73
+ type: "varchar",
74
+ length: 4,
75
+ nullable: true,
76
+ default: null,
77
+ comment: "Si se paga con tarjeta, entonces se almacenan los últimos 4 dígitos de la tarjeta de crédito/débito con el que se paga.",
78
+ }),
79
+ __metadata("design:type", Object)
80
+ ], LocalTableReservePayment.prototype, "card_last_four_digits", void 0);
81
+ __decorate([
82
+ (0, typeorm_1.Column)({
83
+ type: "varchar",
84
+ length: 50,
85
+ nullable: true,
86
+ default: null,
87
+ comment: "Si se paga con tarjeta, entonces se guarda el tipo de tarjeta con la que se paga.",
88
+ }),
89
+ __metadata("design:type", Object)
90
+ ], LocalTableReservePayment.prototype, "card_type", void 0);
91
+ __decorate([
92
+ (0, typeorm_1.ManyToOne)(function () { return __1.UserPaymentMethod; }, function (card) { return card.local_table_reserve_payments; }, {
93
+ onDelete: "NO ACTION",
94
+ onUpdate: "NO ACTION",
95
+ nullable: true,
96
+ }),
97
+ (0, typeorm_1.JoinColumn)({ name: "card" }),
98
+ __metadata("design:type", Object)
99
+ ], LocalTableReservePayment.prototype, "card", void 0);
100
+ __decorate([
101
+ (0, typeorm_1.Column)({
102
+ type: "varchar",
103
+ length: 255,
104
+ nullable: true,
105
+ default: null,
106
+ comment: "Comentarios del pago, si aplica.",
107
+ }),
108
+ __metadata("design:type", Object)
109
+ ], LocalTableReservePayment.prototype, "comments", void 0);
110
+ __decorate([
111
+ (0, typeorm_1.ManyToOne)(function () { return __1.User; }, function (user) { return user.local_table_reserve_payments; }, {
112
+ onDelete: "NO ACTION",
113
+ onUpdate: "NO ACTION",
114
+ nullable: true,
115
+ }),
116
+ (0, typeorm_1.JoinColumn)({ name: "user" }),
117
+ __metadata("design:type", Object)
118
+ ], LocalTableReservePayment.prototype, "user", void 0);
119
+ __decorate([
120
+ (0, typeorm_1.Column)({
121
+ type: "int",
122
+ width: 1,
123
+ comment: "Estado del pago:\r\n1. Aprobado.\r\n2. Rechazado.\r\n3. Pendiente.",
124
+ default: 3,
125
+ }),
126
+ __metadata("design:type", Number)
127
+ ], LocalTableReservePayment.prototype, "status", void 0);
128
+ __decorate([
129
+ (0, typeorm_1.Column)({
130
+ type: "datetime",
131
+ transformer: new dateTransformer_1.DateTransformer(),
132
+ comment: "Fecha de creación del registro.",
133
+ }),
134
+ __metadata("design:type", Date)
135
+ ], LocalTableReservePayment.prototype, "created", void 0);
136
+ __decorate([
137
+ (0, typeorm_1.Column)({
138
+ type: "datetime",
139
+ nullable: true,
140
+ default: null,
141
+ transformer: new dateTransformer_1.DateTransformer(),
142
+ comment: "Fecha de actualización del registro.",
143
+ }),
144
+ __metadata("design:type", Object)
145
+ ], LocalTableReservePayment.prototype, "updated", void 0);
146
+ __decorate([
147
+ (0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.local_table_reserve_payments; }, {
148
+ onDelete: "NO ACTION",
149
+ onUpdate: "NO ACTION",
150
+ nullable: true,
151
+ }),
152
+ (0, typeorm_1.JoinColumn)({ name: "partner" }),
153
+ __metadata("design:type", Object)
154
+ ], LocalTableReservePayment.prototype, "partner", void 0);
155
+ __decorate([
156
+ (0, typeorm_1.Column)({
157
+ type: "varchar",
158
+ length: 45,
159
+ nullable: true,
160
+ comment: "Dirección ip donde se hace la solicitud del pago.",
161
+ }),
162
+ __metadata("design:type", Object)
163
+ ], LocalTableReservePayment.prototype, "user_ip", void 0);
164
+ LocalTableReservePayment = __decorate([
165
+ (0, typeorm_1.Entity)({
166
+ comment: "Registros de los pagos qué se han hecho de las reservas.",
167
+ name: "local_table_reserve_payment",
168
+ })
169
+ ], LocalTableReservePayment);
170
+ return LocalTableReservePayment;
171
+ }());
172
+ exports.LocalTableReservePayment = LocalTableReservePayment;
@@ -1,4 +1,4 @@
1
- import { Category, LocalTable, LocalTableZone, MasterNotification, PartnerSession, Product, RequestLocal, RequestLocalHistory, RequestLocalPayment, RequestPrint, VerifyLocal } from "..";
1
+ import { Category, LocalTable, LocalTableReservePayment, LocalTableZone, MasterNotification, PartnerSession, Product, RequestLocal, RequestLocalHistory, RequestLocalPayment, RequestPrint, VerifyLocal } from "..";
2
2
  import { City } from "./City";
3
3
  import { Company } from "./Company";
4
4
  import { DiscountCodeUser } from "./DiscountCodeUser";
@@ -43,4 +43,5 @@ export declare class Partner {
43
43
  partner_request_locals: RequestLocal[];
44
44
  local_table_zones: LocalTableZone[];
45
45
  local_tables: LocalTable[];
46
+ local_table_reserve_payments: LocalTableReservePayment[];
46
47
  }
@@ -277,6 +277,10 @@ var Partner = /** @class */ (function () {
277
277
  (0, typeorm_1.OneToMany)(function () { return __1.LocalTable; }, function (localTable) { return localTable.updated_by; }),
278
278
  __metadata("design:type", Array)
279
279
  ], Partner.prototype, "local_tables", void 0);
280
+ __decorate([
281
+ (0, typeorm_1.OneToMany)(function () { return __1.LocalTableReservePayment; }, function (LocalTableReservePayment) { return LocalTableReservePayment.partner; }),
282
+ __metadata("design:type", Array)
283
+ ], Partner.prototype, "local_table_reserve_payments", void 0);
280
284
  Partner = __decorate([
281
285
  (0, typeorm_1.Entity)({
282
286
  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.",
@@ -1,4 +1,4 @@
1
- import { RequestLocalPayment } from "..";
1
+ import { LocalTableReservePayment, RequestLocalPayment } from "..";
2
2
  import { Local } from "./Local";
3
3
  export declare class PaymentMethod {
4
4
  id: number;
@@ -9,4 +9,5 @@ export declare class PaymentMethod {
9
9
  status: number;
10
10
  locals: Local[];
11
11
  payment_methods: RequestLocalPayment[];
12
+ local_table_reserve_payments: LocalTableReservePayment[];
12
13
  }
@@ -89,6 +89,10 @@ var PaymentMethod = /** @class */ (function () {
89
89
  (0, typeorm_1.OneToMany)(function () { return __1.RequestLocalPayment; }, function (requestLocalPayment) { return requestLocalPayment.payment_method; }),
90
90
  __metadata("design:type", Array)
91
91
  ], PaymentMethod.prototype, "payment_methods", void 0);
92
+ __decorate([
93
+ (0, typeorm_1.OneToMany)(function () { return __1.LocalTableReservePayment; }, function (localTableReservePayment) { return localTableReservePayment.payment_method; }),
94
+ __metadata("design:type", Array)
95
+ ], PaymentMethod.prototype, "local_table_reserve_payments", void 0);
92
96
  PaymentMethod = __decorate([
93
97
  (0, typeorm_1.Entity)("payment_method", {
94
98
  comment: "Métodos de pago qué la plataforma tendrá disponible, estos serán visibles cuando un cliente (local) desee agregarlos para que se vean en los pedidos.",