test-entity-library-asm 3.4.8 → 3.5.0
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/LocalTable.d.ts +1 -0
- package/dist/entities/LocalTable.js +9 -0
- package/dist/entities/LocalTableReserve.d.ts +3 -1
- package/dist/entities/LocalTableReserve.js +19 -0
- package/dist/entities/Partner.d.ts +2 -1
- package/dist/entities/Partner.js +4 -0
- package/package.json +1 -1
- package/src/entities/LocalTable.ts +9 -0
- package/src/entities/LocalTableReserve.ts +18 -0
- package/src/entities/Partner.ts +7 -0
|
@@ -130,6 +130,15 @@ var LocalTable = /** @class */ (function () {
|
|
|
130
130
|
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
131
131
|
__metadata("design:type", Object)
|
|
132
132
|
], LocalTable.prototype, "updated_by", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, typeorm_1.Column)({
|
|
135
|
+
default: 1,
|
|
136
|
+
type: "int",
|
|
137
|
+
width: 1,
|
|
138
|
+
comment: "Columna para saber sí la mesa está:\r\n1: Disponible.\r\n2: No disponible.",
|
|
139
|
+
}),
|
|
140
|
+
__metadata("design:type", Number)
|
|
141
|
+
], LocalTable.prototype, "availability", void 0);
|
|
133
142
|
__decorate([
|
|
134
143
|
(0, typeorm_1.Column)({
|
|
135
144
|
default: 1,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { LocalDecorationReserve, LocalTable, LocalTableReservePayment, User } from "..";
|
|
1
|
+
import { LocalDecorationReserve, LocalTable, LocalTableReservePayment, Partner, User } from "..";
|
|
2
2
|
export declare class LocalTableReserve {
|
|
3
3
|
id: number;
|
|
4
4
|
code: string;
|
|
5
5
|
local_table: LocalTable;
|
|
6
|
+
user_document: string | null;
|
|
6
7
|
user_name: string;
|
|
7
8
|
user_phone: string | null;
|
|
8
9
|
user_email: string | null;
|
|
@@ -14,6 +15,7 @@ export declare class LocalTableReserve {
|
|
|
14
15
|
decoration: LocalDecorationReserve;
|
|
15
16
|
created: Date;
|
|
16
17
|
updated: Date | null;
|
|
18
|
+
partner: Partner | null;
|
|
17
19
|
status: number;
|
|
18
20
|
local_table_reserve_payments: LocalTableReservePayment[];
|
|
19
21
|
}
|
|
@@ -40,6 +40,16 @@ var LocalTableReserve = /** @class */ (function () {
|
|
|
40
40
|
(0, typeorm_1.JoinColumn)({ name: "local_table" }),
|
|
41
41
|
__metadata("design:type", __1.LocalTable)
|
|
42
42
|
], LocalTableReserve.prototype, "local_table", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({
|
|
45
|
+
type: "varchar",
|
|
46
|
+
length: 14,
|
|
47
|
+
nullable: true,
|
|
48
|
+
default: null,
|
|
49
|
+
comment: "Documento del usuario qué hace la reserva.",
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], LocalTableReserve.prototype, "user_document", void 0);
|
|
43
53
|
__decorate([
|
|
44
54
|
(0, typeorm_1.Column)({
|
|
45
55
|
type: "varchar",
|
|
@@ -136,6 +146,15 @@ var LocalTableReserve = /** @class */ (function () {
|
|
|
136
146
|
}),
|
|
137
147
|
__metadata("design:type", Object)
|
|
138
148
|
], LocalTableReserve.prototype, "updated", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.local_table_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
|
+
], LocalTableReserve.prototype, "partner", void 0);
|
|
139
158
|
__decorate([
|
|
140
159
|
(0, typeorm_1.Column)({
|
|
141
160
|
default: 1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Category, LocalTable, LocalTableReservePayment, LocalTableZone, MasterNotification, PartnerSession, Product, RequestLocal, RequestLocalHistory, RequestLocalPayment, RequestPrint, VerifyLocal } from "..";
|
|
1
|
+
import { Category, LocalTable, LocalTableReserve, 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,4 +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
|
+
local_table_reserves: LocalTableReserve[];
|
|
47
48
|
}
|
package/dist/entities/Partner.js
CHANGED
|
@@ -281,6 +281,10 @@ var Partner = /** @class */ (function () {
|
|
|
281
281
|
(0, typeorm_1.OneToMany)(function () { return __1.LocalTableReservePayment; }, function (LocalTableReservePayment) { return LocalTableReservePayment.partner; }),
|
|
282
282
|
__metadata("design:type", Array)
|
|
283
283
|
], Partner.prototype, "local_table_reserve_payments", void 0);
|
|
284
|
+
__decorate([
|
|
285
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalTableReserve; }, function (localTableReserve) { return localTableReserve.partner; }),
|
|
286
|
+
__metadata("design:type", Array)
|
|
287
|
+
], Partner.prototype, "local_table_reserves", void 0);
|
|
284
288
|
Partner = __decorate([
|
|
285
289
|
(0, typeorm_1.Entity)({
|
|
286
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/package.json
CHANGED
|
@@ -127,6 +127,15 @@ export class LocalTable {
|
|
|
127
127
|
@JoinColumn({ name: "updated_by" })
|
|
128
128
|
updated_by: Partner | null;
|
|
129
129
|
|
|
130
|
+
@Column({
|
|
131
|
+
default: 1,
|
|
132
|
+
type: "int",
|
|
133
|
+
width: 1,
|
|
134
|
+
comment:
|
|
135
|
+
"Columna para saber sí la mesa está:\r\n1: Disponible.\r\n2: No disponible.",
|
|
136
|
+
})
|
|
137
|
+
availability: number;
|
|
138
|
+
|
|
130
139
|
@Column({
|
|
131
140
|
default: 1,
|
|
132
141
|
type: "int",
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
LocalDecorationReserve,
|
|
11
11
|
LocalTable,
|
|
12
12
|
LocalTableReservePayment,
|
|
13
|
+
Partner,
|
|
13
14
|
User,
|
|
14
15
|
} from "..";
|
|
15
16
|
import { DateTransformer } from "../transformers/dateTransformer";
|
|
@@ -41,6 +42,15 @@ export class LocalTableReserve {
|
|
|
41
42
|
@JoinColumn({ name: "local_table" })
|
|
42
43
|
local_table: LocalTable;
|
|
43
44
|
|
|
45
|
+
@Column({
|
|
46
|
+
type: "varchar",
|
|
47
|
+
length: 14,
|
|
48
|
+
nullable: true,
|
|
49
|
+
default: null,
|
|
50
|
+
comment: "Documento del usuario qué hace la reserva.",
|
|
51
|
+
})
|
|
52
|
+
user_document: string | null;
|
|
53
|
+
|
|
44
54
|
@Column({
|
|
45
55
|
type: "varchar",
|
|
46
56
|
length: 100,
|
|
@@ -132,6 +142,14 @@ export class LocalTableReserve {
|
|
|
132
142
|
})
|
|
133
143
|
updated: Date | null;
|
|
134
144
|
|
|
145
|
+
@ManyToOne(() => Partner, (partner) => partner.local_table_reserves, {
|
|
146
|
+
onDelete: "SET NULL",
|
|
147
|
+
onUpdate: "NO ACTION",
|
|
148
|
+
nullable: true,
|
|
149
|
+
})
|
|
150
|
+
@JoinColumn({ name: "partner" })
|
|
151
|
+
partner: Partner | null;
|
|
152
|
+
|
|
135
153
|
@Column({
|
|
136
154
|
default: 1,
|
|
137
155
|
type: "int",
|
package/src/entities/Partner.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
Category,
|
|
13
13
|
LocalTable,
|
|
14
|
+
LocalTableReserve,
|
|
14
15
|
LocalTableReservePayment,
|
|
15
16
|
LocalTableZone,
|
|
16
17
|
MasterNotification,
|
|
@@ -282,4 +283,10 @@ export class Partner {
|
|
|
282
283
|
(LocalTableReservePayment) => LocalTableReservePayment.partner
|
|
283
284
|
)
|
|
284
285
|
local_table_reserve_payments: LocalTableReservePayment[];
|
|
286
|
+
|
|
287
|
+
@OneToMany(
|
|
288
|
+
() => LocalTableReserve,
|
|
289
|
+
(localTableReserve) => localTableReserve.partner
|
|
290
|
+
)
|
|
291
|
+
local_table_reserves: LocalTableReserve[];
|
|
285
292
|
}
|