test-entity-library-asm 3.5.0 → 3.5.2
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/LocalDecorationReserve.d.ts +2 -2
- package/dist/entities/LocalDecorationReserve.js +2 -2
- package/dist/entities/LocalReserve.d.ts +22 -0
- package/dist/entities/LocalReserve.js +194 -0
- package/dist/entities/LocalTable.d.ts +2 -2
- package/dist/entities/LocalTable.js +15 -4
- package/dist/entities/LocalTableReservePayment.d.ts +2 -2
- package/dist/entities/LocalTableReservePayment.js +4 -4
- package/dist/entities/Partner.d.ts +2 -2
- package/dist/entities/Partner.js +2 -2
- package/dist/entities/User.d.ts +2 -2
- package/dist/entities/User.js +3 -3
- package/dist/entities.views.routes.d.ts +1 -1
- package/dist/entities.views.routes.js +3 -3
- package/package.json +2 -1
- package/src/entities/LocalDecorationReserve.ts +3 -6
- package/src/entities/{LocalTableReserve.ts → LocalReserve.ts} +33 -14
- package/src/entities/LocalTable.ts +21 -8
- package/src/entities/LocalTableReservePayment.ts +5 -5
- package/src/entities/Partner.ts +3 -6
- package/src/entities/User.ts +4 -7
- package/src/entities.views.routes.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DecorationReserve, Local,
|
|
1
|
+
import { DecorationReserve, Local, LocalReserve } from "..";
|
|
2
2
|
export declare class LocalDecorationReserve {
|
|
3
3
|
id: number;
|
|
4
4
|
code: string;
|
|
@@ -6,5 +6,5 @@ export declare class LocalDecorationReserve {
|
|
|
6
6
|
name: DecorationReserve;
|
|
7
7
|
price: number;
|
|
8
8
|
status: number;
|
|
9
|
-
|
|
9
|
+
local_reserves: LocalReserve[];
|
|
10
10
|
}
|
|
@@ -66,9 +66,9 @@ var LocalDecorationReserve = /** @class */ (function () {
|
|
|
66
66
|
__metadata("design:type", Number)
|
|
67
67
|
], LocalDecorationReserve.prototype, "status", void 0);
|
|
68
68
|
__decorate([
|
|
69
|
-
(0, typeorm_1.OneToMany)(function () { return __1.
|
|
69
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalReserve; }, function (localReserve) { return localReserve.decoration; }),
|
|
70
70
|
__metadata("design:type", Array)
|
|
71
|
-
], LocalDecorationReserve.prototype, "
|
|
71
|
+
], LocalDecorationReserve.prototype, "local_reserves", void 0);
|
|
72
72
|
LocalDecorationReserve = __decorate([
|
|
73
73
|
(0, typeorm_1.Entity)({
|
|
74
74
|
comment: "Tipos de decoración qué tiene el local.",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LocalDecorationReserve, LocalTable, LocalTableReservePayment, Partner, User } from "..";
|
|
2
|
+
export declare class LocalReserve {
|
|
3
|
+
id: number;
|
|
4
|
+
code: string;
|
|
5
|
+
user_document: string | null;
|
|
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
|
+
persons: number;
|
|
16
|
+
created: Date;
|
|
17
|
+
updated: Date | null;
|
|
18
|
+
partner: Partner | null;
|
|
19
|
+
status: number;
|
|
20
|
+
local_tables_reserves: LocalTable[];
|
|
21
|
+
local_reserve_payments: LocalTableReservePayment[];
|
|
22
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
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.LocalReserve = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var __1 = require("..");
|
|
15
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
var LocalReserve = /** @class */ (function () {
|
|
17
|
+
function LocalReserve() {
|
|
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
|
+
], LocalReserve.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
|
+
], LocalReserve.prototype, "code", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({
|
|
37
|
+
type: "varchar",
|
|
38
|
+
length: 14,
|
|
39
|
+
nullable: true,
|
|
40
|
+
default: null,
|
|
41
|
+
comment: "Documento del usuario qué hace la reserva.",
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], LocalReserve.prototype, "user_document", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({
|
|
47
|
+
type: "varchar",
|
|
48
|
+
length: 100,
|
|
49
|
+
comment: "Nombre del usuario/cliente qué aparta.",
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], LocalReserve.prototype, "user_name", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({
|
|
55
|
+
type: "varchar",
|
|
56
|
+
length: 14,
|
|
57
|
+
nullable: true,
|
|
58
|
+
default: null,
|
|
59
|
+
comment: "Número de celular del usuario/cliente si es necesario, para recordarle.",
|
|
60
|
+
}),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], LocalReserve.prototype, "user_phone", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({
|
|
65
|
+
type: "varchar",
|
|
66
|
+
length: 100,
|
|
67
|
+
nullable: true,
|
|
68
|
+
default: null,
|
|
69
|
+
comment: "Correo electrónico del usuario/cliente qué aparta, si es necesario, para recordarle.",
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", Object)
|
|
72
|
+
], LocalReserve.prototype, "user_email", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.User; }, function (user) { return user.local_reserves; }, {
|
|
75
|
+
onDelete: "SET NULL",
|
|
76
|
+
onUpdate: "NO ACTION",
|
|
77
|
+
nullable: true,
|
|
78
|
+
}),
|
|
79
|
+
(0, typeorm_1.JoinColumn)({ name: "user" }),
|
|
80
|
+
__metadata("design:type", Object)
|
|
81
|
+
], LocalReserve.prototype, "user", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({
|
|
84
|
+
type: "date",
|
|
85
|
+
comment: "Fecha de la reserva.",
|
|
86
|
+
}),
|
|
87
|
+
__metadata("design:type", Date)
|
|
88
|
+
], LocalReserve.prototype, "date", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.Column)({
|
|
91
|
+
type: "varchar",
|
|
92
|
+
length: 5,
|
|
93
|
+
comment: "Hora de inicio de la reserva.",
|
|
94
|
+
}),
|
|
95
|
+
__metadata("design:type", String)
|
|
96
|
+
], LocalReserve.prototype, "start_time", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typeorm_1.Column)({
|
|
99
|
+
type: "varchar",
|
|
100
|
+
length: 5,
|
|
101
|
+
comment: "Hora finalización de la reserva.",
|
|
102
|
+
}),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], LocalReserve.prototype, "end_time", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, typeorm_1.Column)({
|
|
107
|
+
type: "varchar",
|
|
108
|
+
length: 400,
|
|
109
|
+
nullable: true,
|
|
110
|
+
default: null,
|
|
111
|
+
comment: "Hora finalización de la reserva.",
|
|
112
|
+
}),
|
|
113
|
+
__metadata("design:type", Object)
|
|
114
|
+
], LocalReserve.prototype, "details", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.LocalDecorationReserve; }, function (localDecorationReserve) { return localDecorationReserve.local_reserves; }, {
|
|
117
|
+
onDelete: "SET NULL",
|
|
118
|
+
onUpdate: "NO ACTION",
|
|
119
|
+
}),
|
|
120
|
+
(0, typeorm_1.JoinColumn)({ name: "decoration" }),
|
|
121
|
+
__metadata("design:type", __1.LocalDecorationReserve)
|
|
122
|
+
], LocalReserve.prototype, "decoration", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, typeorm_1.Column)({
|
|
125
|
+
default: 1,
|
|
126
|
+
type: "int",
|
|
127
|
+
comment: "Cantidad de personas que van a estar en la reserva.",
|
|
128
|
+
}),
|
|
129
|
+
__metadata("design:type", Number)
|
|
130
|
+
], LocalReserve.prototype, "persons", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, typeorm_1.Column)({
|
|
133
|
+
type: "datetime",
|
|
134
|
+
comment: "Fecha creación del registro.",
|
|
135
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
136
|
+
}),
|
|
137
|
+
__metadata("design:type", Date)
|
|
138
|
+
], LocalReserve.prototype, "created", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, typeorm_1.Column)({
|
|
141
|
+
type: "datetime",
|
|
142
|
+
nullable: true,
|
|
143
|
+
default: null,
|
|
144
|
+
comment: "Fecha de actualización del registro.",
|
|
145
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
146
|
+
}),
|
|
147
|
+
__metadata("design:type", Object)
|
|
148
|
+
], LocalReserve.prototype, "updated", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.local_reserves; }, {
|
|
151
|
+
onDelete: "SET NULL",
|
|
152
|
+
onUpdate: "NO ACTION",
|
|
153
|
+
nullable: true,
|
|
154
|
+
}),
|
|
155
|
+
(0, typeorm_1.JoinColumn)({ name: "partner" }),
|
|
156
|
+
__metadata("design:type", Object)
|
|
157
|
+
], LocalReserve.prototype, "partner", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
(0, typeorm_1.Column)({
|
|
160
|
+
default: 1,
|
|
161
|
+
type: "int",
|
|
162
|
+
width: 1,
|
|
163
|
+
comment: "Estado del registro:\r\n0: Inactivo.\r\n1: Activo.",
|
|
164
|
+
}),
|
|
165
|
+
__metadata("design:type", Number)
|
|
166
|
+
], LocalReserve.prototype, "status", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
(0, typeorm_1.ManyToMany)(function () { return __1.LocalTable; }, function (localTable) { return localTable.local_tables_reserves; }),
|
|
169
|
+
(0, typeorm_1.JoinTable)({
|
|
170
|
+
name: "local_table_reserve",
|
|
171
|
+
joinColumn: {
|
|
172
|
+
name: "local_reserve",
|
|
173
|
+
referencedColumnName: "id",
|
|
174
|
+
},
|
|
175
|
+
inverseJoinColumn: {
|
|
176
|
+
name: "local_table",
|
|
177
|
+
referencedColumnName: "id",
|
|
178
|
+
},
|
|
179
|
+
}),
|
|
180
|
+
__metadata("design:type", Array)
|
|
181
|
+
], LocalReserve.prototype, "local_tables_reserves", void 0);
|
|
182
|
+
__decorate([
|
|
183
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalTableReservePayment; }, function (localTableReservePayment) { return localTableReservePayment.local_reserve; }),
|
|
184
|
+
__metadata("design:type", Array)
|
|
185
|
+
], LocalReserve.prototype, "local_reserve_payments", void 0);
|
|
186
|
+
LocalReserve = __decorate([
|
|
187
|
+
(0, typeorm_1.Entity)({
|
|
188
|
+
comment: "Reservas de mesas del local.",
|
|
189
|
+
name: "local_reserve",
|
|
190
|
+
})
|
|
191
|
+
], LocalReserve);
|
|
192
|
+
return LocalReserve;
|
|
193
|
+
}());
|
|
194
|
+
exports.LocalReserve = LocalReserve;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Local,
|
|
1
|
+
import { Local, LocalReserve, LocalTableZone, Partner, RequestLocal } from "..";
|
|
2
2
|
export declare class LocalTable {
|
|
3
3
|
id: number;
|
|
4
4
|
code: string;
|
|
@@ -16,6 +16,6 @@ export declare class LocalTable {
|
|
|
16
16
|
updated_by: Partner | null;
|
|
17
17
|
availability: number;
|
|
18
18
|
status: number;
|
|
19
|
+
local_tables_reserves: LocalReserve[];
|
|
19
20
|
request_locals: RequestLocal[];
|
|
20
|
-
local_table_reserves: LocalTableReserve[];
|
|
21
21
|
}
|
|
@@ -149,13 +149,24 @@ var LocalTable = /** @class */ (function () {
|
|
|
149
149
|
__metadata("design:type", Number)
|
|
150
150
|
], LocalTable.prototype, "status", void 0);
|
|
151
151
|
__decorate([
|
|
152
|
-
(0, typeorm_1.
|
|
152
|
+
(0, typeorm_1.ManyToMany)(function () { return __1.LocalReserve; }, function (localReserve) { return localReserve.local_tables_reserves; }),
|
|
153
|
+
(0, typeorm_1.JoinTable)({
|
|
154
|
+
name: "local_table_reserve",
|
|
155
|
+
joinColumn: {
|
|
156
|
+
name: "local_table",
|
|
157
|
+
referencedColumnName: "id",
|
|
158
|
+
},
|
|
159
|
+
inverseJoinColumn: {
|
|
160
|
+
name: "local_reserve",
|
|
161
|
+
referencedColumnName: "id",
|
|
162
|
+
},
|
|
163
|
+
}),
|
|
153
164
|
__metadata("design:type", Array)
|
|
154
|
-
], LocalTable.prototype, "
|
|
165
|
+
], LocalTable.prototype, "local_tables_reserves", void 0);
|
|
155
166
|
__decorate([
|
|
156
|
-
(0, typeorm_1.OneToMany)(function () { return __1.
|
|
167
|
+
(0, typeorm_1.OneToMany)(function () { return __1.RequestLocal; }, function (requestLocal) { return requestLocal.local_table; }),
|
|
157
168
|
__metadata("design:type", Array)
|
|
158
|
-
], LocalTable.prototype, "
|
|
169
|
+
], LocalTable.prototype, "request_locals", void 0);
|
|
159
170
|
LocalTable = __decorate([
|
|
160
171
|
(0, typeorm_1.Entity)({
|
|
161
172
|
comment: "Mesas qué se encuentran en el local.",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LocalReserve, Partner, PaymentMethod, User, UserPaymentMethod } from "..";
|
|
2
2
|
export declare class LocalTableReservePayment {
|
|
3
3
|
id: number;
|
|
4
4
|
code: string;
|
|
5
|
-
|
|
5
|
+
local_reserve: LocalReserve;
|
|
6
6
|
payment_method: PaymentMethod;
|
|
7
7
|
amount_paid: number;
|
|
8
8
|
remaining_amount: number;
|
|
@@ -33,13 +33,13 @@ var LocalTableReservePayment = /** @class */ (function () {
|
|
|
33
33
|
__metadata("design:type", String)
|
|
34
34
|
], LocalTableReservePayment.prototype, "code", void 0);
|
|
35
35
|
__decorate([
|
|
36
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.
|
|
36
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.LocalReserve; }, function (localReserve) { return localReserve.local_reserve_payments; }, {
|
|
37
37
|
onDelete: "RESTRICT",
|
|
38
38
|
onUpdate: "NO ACTION",
|
|
39
39
|
}),
|
|
40
|
-
(0, typeorm_1.JoinColumn)({ name: "
|
|
41
|
-
__metadata("design:type", __1.
|
|
42
|
-
], LocalTableReservePayment.prototype, "
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: "local_reserve" }),
|
|
41
|
+
__metadata("design:type", __1.LocalReserve)
|
|
42
|
+
], LocalTableReservePayment.prototype, "local_reserve", void 0);
|
|
43
43
|
__decorate([
|
|
44
44
|
(0, typeorm_1.ManyToOne)(function () { return __1.PaymentMethod; }, function (paymentMethod) { return paymentMethod.payment_methods; }, {
|
|
45
45
|
onDelete: "NO ACTION",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Category,
|
|
1
|
+
import { Category, LocalReserve, 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";
|
|
@@ -44,5 +44,5 @@ export declare class Partner {
|
|
|
44
44
|
local_table_zones: LocalTableZone[];
|
|
45
45
|
local_tables: LocalTable[];
|
|
46
46
|
local_table_reserve_payments: LocalTableReservePayment[];
|
|
47
|
-
|
|
47
|
+
local_reserves: LocalReserve[];
|
|
48
48
|
}
|
package/dist/entities/Partner.js
CHANGED
|
@@ -282,9 +282,9 @@ var Partner = /** @class */ (function () {
|
|
|
282
282
|
__metadata("design:type", Array)
|
|
283
283
|
], Partner.prototype, "local_table_reserve_payments", void 0);
|
|
284
284
|
__decorate([
|
|
285
|
-
(0, typeorm_1.OneToMany)(function () { return __1.
|
|
285
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalReserve; }, function (localReserve) { return localReserve.partner; }),
|
|
286
286
|
__metadata("design:type", Array)
|
|
287
|
-
], Partner.prototype, "
|
|
287
|
+
], Partner.prototype, "local_reserves", void 0);
|
|
288
288
|
Partner = __decorate([
|
|
289
289
|
(0, typeorm_1.Entity)({
|
|
290
290
|
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.",
|
package/dist/entities/User.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LocalReserve, LocalTableReservePayment, ReceiptConfig, RequestLocalPayment, UserPaymentMethod } from "..";
|
|
2
2
|
import { City } from "./City";
|
|
3
3
|
import { CodeRedemptionHistoryUser } from "./CodeRedemptionHistoryUser";
|
|
4
4
|
import { Local } from "./Local";
|
|
@@ -37,6 +37,6 @@ export declare class User {
|
|
|
37
37
|
user_favorite_locals: Local[];
|
|
38
38
|
user_favorite_products: Product[];
|
|
39
39
|
receipts_user_config: ReceiptConfig[];
|
|
40
|
-
|
|
40
|
+
local_reserves: LocalReserve[];
|
|
41
41
|
local_table_reserve_payments: LocalTableReservePayment[];
|
|
42
42
|
}
|
package/dist/entities/User.js
CHANGED
|
@@ -13,6 +13,7 @@ exports.User = void 0;
|
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
14
|
var __1 = require("..");
|
|
15
15
|
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
16
17
|
var City_1 = require("./City");
|
|
17
18
|
var CodeRedemptionHistoryUser_1 = require("./CodeRedemptionHistoryUser");
|
|
18
19
|
var Local_1 = require("./Local");
|
|
@@ -23,7 +24,6 @@ var RequestProduct_1 = require("./RequestProduct");
|
|
|
23
24
|
var RequestProductGroupComplement_1 = require("./RequestProductGroupComplement");
|
|
24
25
|
var Square_1 = require("./Square");
|
|
25
26
|
var UserAddress_1 = require("./UserAddress");
|
|
26
|
-
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
27
27
|
var User = /** @class */ (function () {
|
|
28
28
|
function User() {
|
|
29
29
|
}
|
|
@@ -235,9 +235,9 @@ var User = /** @class */ (function () {
|
|
|
235
235
|
__metadata("design:type", Array)
|
|
236
236
|
], User.prototype, "receipts_user_config", void 0);
|
|
237
237
|
__decorate([
|
|
238
|
-
(0, typeorm_1.OneToMany)(function () { return __1.
|
|
238
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalReserve; }, function (localReserve) { return localReserve.user; }),
|
|
239
239
|
__metadata("design:type", Array)
|
|
240
|
-
], User.prototype, "
|
|
240
|
+
], User.prototype, "local_reserves", void 0);
|
|
241
241
|
__decorate([
|
|
242
242
|
(0, typeorm_1.OneToMany)(function () { return __1.LocalTableReservePayment; }, function (localTableReservePayment) { return localTableReservePayment.user; }),
|
|
243
243
|
__metadata("design:type", Array)
|
|
@@ -57,10 +57,10 @@ export { ReceiptConfig } from "./entities/ReceiptConfig";
|
|
|
57
57
|
export { RequestPrint } from "./entities/RequestPrint";
|
|
58
58
|
export { LocalTableZone } from "./entities/LocalTableZone";
|
|
59
59
|
export { LocalTable } from "./entities/LocalTable";
|
|
60
|
-
export { LocalTableReserve } from "./entities/LocalTableReserve";
|
|
61
60
|
export { LocalDecorationReserve } from "./entities/LocalDecorationReserve";
|
|
62
61
|
export { DecorationReserve } from "./entities/DecorationReserve";
|
|
63
62
|
export { LocalTableReservePayment } from "./entities/LocalTableReservePayment";
|
|
63
|
+
export { LocalReserve } from "./entities/LocalReserve";
|
|
64
64
|
export { LocalsCompany } from "./views/LocalsCompany";
|
|
65
65
|
export { VerifyLocals } from "./views/VerifyLocals";
|
|
66
66
|
export { MasterNotifications } from "./views/MasterNotifications";
|
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.ToppingImage = exports.ProductDate = exports.ProductSchedule = exports.CategoryDate = exports.Bank = exports.ServicePlan = exports.PartnerPlatform = exports.PartnerPermissionSection = exports.LocalPlan = exports.MasterNotification = exports.VerifyLocal = exports.PosSystem = exports.AuthenticationCredential = exports.BusinessType = exports.UserAddress = exports.User = exports.TypeMeasureIngredient = exports.Square = exports.RequestProductGroupComplement = exports.RequestProduct = exports.Request = exports.Region = exports.ProductTopping = exports.ProductIngredient = exports.ProductGroupComplement = exports.ProductGroup = exports.Product = exports.Plan = exports.PaymentMethod = exports.PartnerRole = exports.PartnerPermission = exports.PartnerNotification = exports.Partner = exports.MasterRole = exports.MasterPermission = exports.Master = exports.LocalQualification = exports.Local = exports.DiscountCodeUser = exports.DiscountCodeCompany = exports.Day = exports.Country = exports.Configuration = exports.Company = exports.CodeRedemptionHistoryUser = exports.CodeRedemptionHistoryCompany = exports.City = exports.ScheduleCategory = exports.Category = exports.BusinessTypeProduct = void 0;
|
|
18
|
-
exports.CustomRepository = exports.PartnerNotifications = exports.DiscountsCodeUser = exports.Partners = exports.ViewLocalsCompanies = exports.MasterNotifications = exports.VerifyLocals = exports.LocalsCompany = exports.
|
|
18
|
+
exports.CustomRepository = exports.PartnerNotifications = exports.DiscountsCodeUser = exports.Partners = exports.ViewLocalsCompanies = exports.MasterNotifications = exports.VerifyLocals = exports.LocalsCompany = exports.LocalReserve = exports.LocalTableReservePayment = exports.DecorationReserve = exports.LocalDecorationReserve = exports.LocalTable = exports.LocalTableZone = exports.RequestPrint = exports.ReceiptConfig = exports.RequestLocalPayment = exports.UserPaymentMethod = exports.RequestLocalHistory = exports.RequestLocal = exports.PartnerSession = void 0;
|
|
19
19
|
var BusinessTypeProduct_1 = require("./entities/BusinessTypeProduct");
|
|
20
20
|
Object.defineProperty(exports, "BusinessTypeProduct", { enumerable: true, get: function () { return BusinessTypeProduct_1.BusinessTypeProduct; } });
|
|
21
21
|
var Category_1 = require("./entities/Category");
|
|
@@ -134,14 +134,14 @@ var LocalTableZone_1 = require("./entities/LocalTableZone");
|
|
|
134
134
|
Object.defineProperty(exports, "LocalTableZone", { enumerable: true, get: function () { return LocalTableZone_1.LocalTableZone; } });
|
|
135
135
|
var LocalTable_1 = require("./entities/LocalTable");
|
|
136
136
|
Object.defineProperty(exports, "LocalTable", { enumerable: true, get: function () { return LocalTable_1.LocalTable; } });
|
|
137
|
-
var LocalTableReserve_1 = require("./entities/LocalTableReserve");
|
|
138
|
-
Object.defineProperty(exports, "LocalTableReserve", { enumerable: true, get: function () { return LocalTableReserve_1.LocalTableReserve; } });
|
|
139
137
|
var LocalDecorationReserve_1 = require("./entities/LocalDecorationReserve");
|
|
140
138
|
Object.defineProperty(exports, "LocalDecorationReserve", { enumerable: true, get: function () { return LocalDecorationReserve_1.LocalDecorationReserve; } });
|
|
141
139
|
var DecorationReserve_1 = require("./entities/DecorationReserve");
|
|
142
140
|
Object.defineProperty(exports, "DecorationReserve", { enumerable: true, get: function () { return DecorationReserve_1.DecorationReserve; } });
|
|
143
141
|
var LocalTableReservePayment_1 = require("./entities/LocalTableReservePayment");
|
|
144
142
|
Object.defineProperty(exports, "LocalTableReservePayment", { enumerable: true, get: function () { return LocalTableReservePayment_1.LocalTableReservePayment; } });
|
|
143
|
+
var LocalReserve_1 = require("./entities/LocalReserve");
|
|
144
|
+
Object.defineProperty(exports, "LocalReserve", { enumerable: true, get: function () { return LocalReserve_1.LocalReserve; } });
|
|
145
145
|
var LocalsCompany_1 = require("./views/LocalsCompany");
|
|
146
146
|
Object.defineProperty(exports, "LocalsCompany", { enumerable: true, get: function () { return LocalsCompany_1.LocalsCompany; } });
|
|
147
147
|
var VerifyLocals_1 = require("./views/VerifyLocals");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "test-entity-library-asm",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"description": "Entidades de ejemplo para una base de datos",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"dotenv": "^16.4.5",
|
|
15
15
|
"express": "^4.19.2",
|
|
16
16
|
"moment-timezone": "^0.5.45",
|
|
17
|
+
"mysql2": "^3.14.1",
|
|
17
18
|
"typeorm": "^0.3.20"
|
|
18
19
|
},
|
|
19
20
|
"devDependencies": {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
OneToMany,
|
|
7
7
|
PrimaryGeneratedColumn,
|
|
8
8
|
} from "typeorm";
|
|
9
|
-
import { DecorationReserve, Local,
|
|
9
|
+
import { DecorationReserve, Local, LocalReserve } from "..";
|
|
10
10
|
|
|
11
11
|
@Entity({
|
|
12
12
|
comment: "Tipos de decoración qué tiene el local.",
|
|
@@ -61,9 +61,6 @@ export class LocalDecorationReserve {
|
|
|
61
61
|
})
|
|
62
62
|
status: number;
|
|
63
63
|
|
|
64
|
-
@OneToMany(
|
|
65
|
-
|
|
66
|
-
(localTableReserve) => localTableReserve.decoration
|
|
67
|
-
)
|
|
68
|
-
local_table_reserves: LocalTableReserve[];
|
|
64
|
+
@OneToMany(() => LocalReserve, (localReserve) => localReserve.decoration)
|
|
65
|
+
local_reserves: LocalReserve[];
|
|
69
66
|
}
|
|
@@ -2,6 +2,8 @@ import {
|
|
|
2
2
|
Column,
|
|
3
3
|
Entity,
|
|
4
4
|
JoinColumn,
|
|
5
|
+
JoinTable,
|
|
6
|
+
ManyToMany,
|
|
5
7
|
ManyToOne,
|
|
6
8
|
OneToMany,
|
|
7
9
|
PrimaryGeneratedColumn,
|
|
@@ -17,9 +19,9 @@ import { DateTransformer } from "../transformers/dateTransformer";
|
|
|
17
19
|
|
|
18
20
|
@Entity({
|
|
19
21
|
comment: "Reservas de mesas del local.",
|
|
20
|
-
name: "
|
|
22
|
+
name: "local_reserve",
|
|
21
23
|
})
|
|
22
|
-
export class
|
|
24
|
+
export class LocalReserve {
|
|
23
25
|
@PrimaryGeneratedColumn({
|
|
24
26
|
type: "int",
|
|
25
27
|
comment: "Id único de cada registro.",
|
|
@@ -35,13 +37,6 @@ export class LocalTableReserve {
|
|
|
35
37
|
})
|
|
36
38
|
code: string;
|
|
37
39
|
|
|
38
|
-
@ManyToOne(() => LocalTable, (local) => local.local_table_reserves, {
|
|
39
|
-
onDelete: "CASCADE",
|
|
40
|
-
onUpdate: "NO ACTION",
|
|
41
|
-
})
|
|
42
|
-
@JoinColumn({ name: "local_table" })
|
|
43
|
-
local_table: LocalTable;
|
|
44
|
-
|
|
45
40
|
@Column({
|
|
46
41
|
type: "varchar",
|
|
47
42
|
length: 14,
|
|
@@ -78,7 +73,7 @@ export class LocalTableReserve {
|
|
|
78
73
|
})
|
|
79
74
|
user_email: string | null;
|
|
80
75
|
|
|
81
|
-
@ManyToOne(() => User, (user) => user.
|
|
76
|
+
@ManyToOne(() => User, (user) => user.local_reserves, {
|
|
82
77
|
onDelete: "SET NULL",
|
|
83
78
|
onUpdate: "NO ACTION",
|
|
84
79
|
nullable: true,
|
|
@@ -117,7 +112,7 @@ export class LocalTableReserve {
|
|
|
117
112
|
|
|
118
113
|
@ManyToOne(
|
|
119
114
|
() => LocalDecorationReserve,
|
|
120
|
-
(localDecorationReserve) => localDecorationReserve.
|
|
115
|
+
(localDecorationReserve) => localDecorationReserve.local_reserves,
|
|
121
116
|
{
|
|
122
117
|
onDelete: "SET NULL",
|
|
123
118
|
onUpdate: "NO ACTION",
|
|
@@ -126,6 +121,13 @@ export class LocalTableReserve {
|
|
|
126
121
|
@JoinColumn({ name: "decoration" })
|
|
127
122
|
decoration: LocalDecorationReserve;
|
|
128
123
|
|
|
124
|
+
@Column({
|
|
125
|
+
default: 1,
|
|
126
|
+
type: "int",
|
|
127
|
+
comment: "Cantidad de personas que van a estar en la reserva.",
|
|
128
|
+
})
|
|
129
|
+
persons: number;
|
|
130
|
+
|
|
129
131
|
@Column({
|
|
130
132
|
type: "datetime",
|
|
131
133
|
comment: "Fecha creación del registro.",
|
|
@@ -142,7 +144,7 @@ export class LocalTableReserve {
|
|
|
142
144
|
})
|
|
143
145
|
updated: Date | null;
|
|
144
146
|
|
|
145
|
-
@ManyToOne(() => Partner, (partner) => partner.
|
|
147
|
+
@ManyToOne(() => Partner, (partner) => partner.local_reserves, {
|
|
146
148
|
onDelete: "SET NULL",
|
|
147
149
|
onUpdate: "NO ACTION",
|
|
148
150
|
nullable: true,
|
|
@@ -158,9 +160,26 @@ export class LocalTableReserve {
|
|
|
158
160
|
})
|
|
159
161
|
status: number;
|
|
160
162
|
|
|
163
|
+
@ManyToMany(
|
|
164
|
+
() => LocalTable,
|
|
165
|
+
(localTable) => localTable.local_tables_reserves
|
|
166
|
+
)
|
|
167
|
+
@JoinTable({
|
|
168
|
+
name: "local_table_reserve",
|
|
169
|
+
joinColumn: {
|
|
170
|
+
name: "local_reserve",
|
|
171
|
+
referencedColumnName: "id",
|
|
172
|
+
},
|
|
173
|
+
inverseJoinColumn: {
|
|
174
|
+
name: "local_table",
|
|
175
|
+
referencedColumnName: "id",
|
|
176
|
+
},
|
|
177
|
+
})
|
|
178
|
+
local_tables_reserves: LocalTable[];
|
|
179
|
+
|
|
161
180
|
@OneToMany(
|
|
162
181
|
() => LocalTableReservePayment,
|
|
163
|
-
(localTableReservePayment) => localTableReservePayment.
|
|
182
|
+
(localTableReservePayment) => localTableReservePayment.local_reserve
|
|
164
183
|
)
|
|
165
|
-
|
|
184
|
+
local_reserve_payments: LocalTableReservePayment[];
|
|
166
185
|
}
|
|
@@ -2,6 +2,8 @@ import {
|
|
|
2
2
|
Column,
|
|
3
3
|
Entity,
|
|
4
4
|
JoinColumn,
|
|
5
|
+
JoinTable,
|
|
6
|
+
ManyToMany,
|
|
5
7
|
ManyToOne,
|
|
6
8
|
OneToMany,
|
|
7
9
|
PrimaryGeneratedColumn,
|
|
@@ -9,10 +11,10 @@ import {
|
|
|
9
11
|
} from "typeorm";
|
|
10
12
|
import {
|
|
11
13
|
Local,
|
|
12
|
-
|
|
14
|
+
LocalReserve,
|
|
13
15
|
LocalTableZone,
|
|
14
16
|
Partner,
|
|
15
|
-
RequestLocal
|
|
17
|
+
RequestLocal
|
|
16
18
|
} from "..";
|
|
17
19
|
import { DateTransformer } from "../transformers/dateTransformer";
|
|
18
20
|
|
|
@@ -144,12 +146,23 @@ export class LocalTable {
|
|
|
144
146
|
})
|
|
145
147
|
status: number;
|
|
146
148
|
|
|
149
|
+
@ManyToMany(
|
|
150
|
+
() => LocalReserve,
|
|
151
|
+
(localReserve) => localReserve.local_tables_reserves
|
|
152
|
+
)
|
|
153
|
+
@JoinTable({
|
|
154
|
+
name: "local_table_reserve",
|
|
155
|
+
joinColumn: {
|
|
156
|
+
name: "local_table",
|
|
157
|
+
referencedColumnName: "id",
|
|
158
|
+
},
|
|
159
|
+
inverseJoinColumn: {
|
|
160
|
+
name: "local_reserve",
|
|
161
|
+
referencedColumnName: "id",
|
|
162
|
+
},
|
|
163
|
+
})
|
|
164
|
+
local_tables_reserves: LocalReserve[];
|
|
165
|
+
|
|
147
166
|
@OneToMany(() => RequestLocal, (requestLocal) => requestLocal.local_table)
|
|
148
167
|
request_locals: RequestLocal[];
|
|
149
|
-
|
|
150
|
-
@OneToMany(
|
|
151
|
-
() => LocalTableReserve,
|
|
152
|
-
(localTableReserve) => localTableReserve.local_table
|
|
153
|
-
)
|
|
154
|
-
local_table_reserves: LocalTableReserve[];
|
|
155
168
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
PrimaryGeneratedColumn,
|
|
7
7
|
} from "typeorm";
|
|
8
8
|
import {
|
|
9
|
-
|
|
9
|
+
LocalReserve,
|
|
10
10
|
Partner,
|
|
11
11
|
PaymentMethod,
|
|
12
12
|
User,
|
|
@@ -34,15 +34,15 @@ export class LocalTableReservePayment {
|
|
|
34
34
|
code: string;
|
|
35
35
|
|
|
36
36
|
@ManyToOne(
|
|
37
|
-
() =>
|
|
38
|
-
(
|
|
37
|
+
() => LocalReserve,
|
|
38
|
+
(localReserve) => localReserve.local_reserve_payments,
|
|
39
39
|
{
|
|
40
40
|
onDelete: "RESTRICT",
|
|
41
41
|
onUpdate: "NO ACTION",
|
|
42
42
|
}
|
|
43
43
|
)
|
|
44
|
-
@JoinColumn({ name: "
|
|
45
|
-
|
|
44
|
+
@JoinColumn({ name: "local_reserve" })
|
|
45
|
+
local_reserve: LocalReserve;
|
|
46
46
|
|
|
47
47
|
@ManyToOne(
|
|
48
48
|
() => PaymentMethod,
|
package/src/entities/Partner.ts
CHANGED
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
} from "typeorm";
|
|
11
11
|
import {
|
|
12
12
|
Category,
|
|
13
|
+
LocalReserve,
|
|
13
14
|
LocalTable,
|
|
14
|
-
LocalTableReserve,
|
|
15
15
|
LocalTableReservePayment,
|
|
16
16
|
LocalTableZone,
|
|
17
17
|
MasterNotification,
|
|
@@ -284,9 +284,6 @@ export class Partner {
|
|
|
284
284
|
)
|
|
285
285
|
local_table_reserve_payments: LocalTableReservePayment[];
|
|
286
286
|
|
|
287
|
-
@OneToMany(
|
|
288
|
-
|
|
289
|
-
(localTableReserve) => localTableReserve.partner
|
|
290
|
-
)
|
|
291
|
-
local_table_reserves: LocalTableReserve[];
|
|
287
|
+
@OneToMany(() => LocalReserve, (localReserve) => localReserve.partner)
|
|
288
|
+
local_reserves: LocalReserve[];
|
|
292
289
|
}
|
package/src/entities/User.ts
CHANGED
|
@@ -9,13 +9,14 @@ import {
|
|
|
9
9
|
PrimaryGeneratedColumn,
|
|
10
10
|
} from "typeorm";
|
|
11
11
|
import {
|
|
12
|
-
|
|
12
|
+
LocalReserve,
|
|
13
13
|
LocalTableReservePayment,
|
|
14
14
|
ReceiptConfig,
|
|
15
15
|
RequestLocalPayment,
|
|
16
16
|
UserPaymentMethod,
|
|
17
17
|
} from "..";
|
|
18
18
|
import { DateTransformer } from "../transformers/dateTransformer";
|
|
19
|
+
import { jsonTransformer } from "../transformers/jsonTransformer";
|
|
19
20
|
import { City } from "./City";
|
|
20
21
|
import { CodeRedemptionHistoryUser } from "./CodeRedemptionHistoryUser";
|
|
21
22
|
import { Local } from "./Local";
|
|
@@ -26,7 +27,6 @@ import { RequestProduct } from "./RequestProduct";
|
|
|
26
27
|
import { RequestProductGroupComplement } from "./RequestProductGroupComplement";
|
|
27
28
|
import { Square } from "./Square";
|
|
28
29
|
import { UserAddress } from "./UserAddress";
|
|
29
|
-
import { jsonTransformer } from "../transformers/jsonTransformer";
|
|
30
30
|
|
|
31
31
|
@Entity({ comment: "Usuarios registrados en la plataforma." })
|
|
32
32
|
export class User {
|
|
@@ -227,11 +227,8 @@ export class User {
|
|
|
227
227
|
@OneToMany(() => ReceiptConfig, (receiptConfig) => receiptConfig.updated_by)
|
|
228
228
|
receipts_user_config: ReceiptConfig[];
|
|
229
229
|
|
|
230
|
-
@OneToMany(
|
|
231
|
-
|
|
232
|
-
(localTableReserve) => localTableReserve.user
|
|
233
|
-
)
|
|
234
|
-
local_table_reserves: LocalTableReserve[];
|
|
230
|
+
@OneToMany(() => LocalReserve, (localReserve) => localReserve.user)
|
|
231
|
+
local_reserves: LocalReserve[];
|
|
235
232
|
|
|
236
233
|
@OneToMany(
|
|
237
234
|
() => LocalTableReservePayment,
|
|
@@ -57,10 +57,10 @@ export { ReceiptConfig } from "./entities/ReceiptConfig";
|
|
|
57
57
|
export { RequestPrint } from "./entities/RequestPrint";
|
|
58
58
|
export { LocalTableZone } from "./entities/LocalTableZone";
|
|
59
59
|
export { LocalTable } from "./entities/LocalTable";
|
|
60
|
-
export { LocalTableReserve } from "./entities/LocalTableReserve";
|
|
61
60
|
export { LocalDecorationReserve } from "./entities/LocalDecorationReserve";
|
|
62
61
|
export { DecorationReserve } from "./entities/DecorationReserve";
|
|
63
62
|
export { LocalTableReservePayment } from "./entities/LocalTableReservePayment";
|
|
63
|
+
export { LocalReserve } from "./entities/LocalReserve";
|
|
64
64
|
|
|
65
65
|
export { LocalsCompany } from "./views/LocalsCompany";
|
|
66
66
|
export { VerifyLocals } from "./views/VerifyLocals";
|