test-entity-library-asm 3.5.8 → 3.6.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/Local.d.ts +2 -1
- package/dist/entities/Local.js +4 -0
- package/dist/entities/LocalReserve.d.ts +2 -2
- package/dist/entities/LocalReserve.js +5 -6
- package/dist/entities/LocalReserveStatus.d.ts +14 -0
- package/dist/entities/LocalReserveStatus.js +101 -0
- package/dist/entities/Partner.d.ts +2 -1
- package/dist/entities/Partner.js +4 -0
- package/dist/entities.views.routes.d.ts +1 -0
- package/dist/entities.views.routes.js +3 -1
- package/dist/filters/LocalReservesInformation.js +1 -0
- package/dist/views/LocalReserves.d.ts +2 -2
- package/dist/views/LocalReserves.js +2 -2
- package/package.json +1 -1
- package/src/entities/Local.ts +11 -1
- package/src/entities/LocalReserve.ts +11 -7
- package/src/entities/LocalReserveStatus.ts +82 -0
- package/src/entities/Partner.ts +7 -0
- package/src/entities.views.routes.ts +1 -0
- package/src/filters/LocalReservesInformation.ts +2 -0
- package/src/views/LocalReserves.ts +2 -2
package/dist/entities/Local.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DiscountCodeUser, LocalDecorationReserve, LocalPlan, LocalTable, LocalTableZone, PosSystem, ReceiptConfig, RequestLocal } from "..";
|
|
1
|
+
import { DiscountCodeUser, LocalDecorationReserve, LocalPlan, LocalReserveStatus, LocalTable, LocalTableZone, PosSystem, ReceiptConfig, RequestLocal } from "..";
|
|
2
2
|
import { BusinessTypeProduct } from "./BusinessTypeProduct";
|
|
3
3
|
import { Category } from "./Category";
|
|
4
4
|
import { City } from "./City";
|
|
@@ -38,4 +38,5 @@ export declare class Local {
|
|
|
38
38
|
local_table_zones: LocalTableZone[];
|
|
39
39
|
local_tables: LocalTable[];
|
|
40
40
|
local_decorations_reserve: LocalDecorationReserve[];
|
|
41
|
+
local_reserve_status: LocalReserveStatus[];
|
|
41
42
|
}
|
package/dist/entities/Local.js
CHANGED
|
@@ -231,6 +231,10 @@ var Local = /** @class */ (function () {
|
|
|
231
231
|
(0, typeorm_1.OneToMany)(function () { return __1.LocalDecorationReserve; }, function (localDecorationReserve) { return localDecorationReserve.local; }),
|
|
232
232
|
__metadata("design:type", Array)
|
|
233
233
|
], Local.prototype, "local_decorations_reserve", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalReserveStatus; }, function (localReserveStatus) { return localReserveStatus.local; }),
|
|
236
|
+
__metadata("design:type", Array)
|
|
237
|
+
], Local.prototype, "local_reserve_status", void 0);
|
|
234
238
|
Local = __decorate([
|
|
235
239
|
(0, typeorm_1.Entity)({ comment: "Locales disponibles de las empresas (company)." })
|
|
236
240
|
], Local);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LocalDecorationReserve, LocalTable, LocalTableReservePayment, Partner, User } from "..";
|
|
1
|
+
import { LocalDecorationReserve, LocalReserveStatus, LocalTable, LocalTableReservePayment, Partner, User } from "..";
|
|
2
2
|
export declare class LocalReserve {
|
|
3
3
|
id: number;
|
|
4
4
|
code: string;
|
|
@@ -16,7 +16,7 @@ export declare class LocalReserve {
|
|
|
16
16
|
created: Date;
|
|
17
17
|
updated: Date | null;
|
|
18
18
|
partner: Partner | null;
|
|
19
|
-
status:
|
|
19
|
+
status: LocalReserveStatus;
|
|
20
20
|
local_tables_reserves: LocalTable[];
|
|
21
21
|
local_reserve_payments: LocalTableReservePayment[];
|
|
22
22
|
}
|
|
@@ -156,13 +156,12 @@ var LocalReserve = /** @class */ (function () {
|
|
|
156
156
|
__metadata("design:type", Object)
|
|
157
157
|
], LocalReserve.prototype, "partner", void 0);
|
|
158
158
|
__decorate([
|
|
159
|
-
(0, typeorm_1.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
width: 1,
|
|
163
|
-
comment: "Estado del registro:\r\n0: Inactivo.\r\n1: Activo.",
|
|
159
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.LocalReserveStatus; }, function (localReserveStatus) { return localReserveStatus.local_reserves; }, {
|
|
160
|
+
onDelete: "RESTRICT",
|
|
161
|
+
onUpdate: "NO ACTION",
|
|
164
162
|
}),
|
|
165
|
-
|
|
163
|
+
(0, typeorm_1.JoinColumn)({ name: "status" }),
|
|
164
|
+
__metadata("design:type", __1.LocalReserveStatus)
|
|
166
165
|
], LocalReserve.prototype, "status", void 0);
|
|
167
166
|
__decorate([
|
|
168
167
|
(0, typeorm_1.ManyToMany)(function () { return __1.LocalTable; }, function (localTable) { return localTable.local_tables_reserves; }),
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Local } from "./Local";
|
|
2
|
+
import { Partner } from "./Partner";
|
|
3
|
+
import { LocalReserve } from "./LocalReserve";
|
|
4
|
+
export declare class LocalReserveStatus {
|
|
5
|
+
id: number;
|
|
6
|
+
local: Local;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string | null;
|
|
9
|
+
color: string;
|
|
10
|
+
updated: Date | null;
|
|
11
|
+
updated_by: Partner;
|
|
12
|
+
status: number;
|
|
13
|
+
local_reserves: LocalReserve[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
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.LocalReserveStatus = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var Local_1 = require("./Local");
|
|
15
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
var Partner_1 = require("./Partner");
|
|
17
|
+
var LocalReserve_1 = require("./LocalReserve");
|
|
18
|
+
var LocalReserveStatus = /** @class */ (function () {
|
|
19
|
+
function LocalReserveStatus() {
|
|
20
|
+
}
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
23
|
+
type: "int",
|
|
24
|
+
comment: "Id único de cada registro.",
|
|
25
|
+
}),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], LocalReserveStatus.prototype, "id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(function () { return Local_1.Local; }, function (local) { return local.local_reserve_status; }, {
|
|
30
|
+
onDelete: "CASCADE",
|
|
31
|
+
onUpdate: "NO ACTION",
|
|
32
|
+
}),
|
|
33
|
+
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
34
|
+
__metadata("design:type", Local_1.Local)
|
|
35
|
+
], LocalReserveStatus.prototype, "local", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({
|
|
38
|
+
type: "varchar",
|
|
39
|
+
length: 50,
|
|
40
|
+
comment: "Nombre del estado para la reserva.",
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], LocalReserveStatus.prototype, "name", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({
|
|
46
|
+
type: "varchar",
|
|
47
|
+
length: 200,
|
|
48
|
+
comment: "Descripción del estado para la reserva.",
|
|
49
|
+
nullable: true,
|
|
50
|
+
default: null,
|
|
51
|
+
}),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], LocalReserveStatus.prototype, "description", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({
|
|
56
|
+
type: "varchar",
|
|
57
|
+
length: 7,
|
|
58
|
+
comment: "Color que va a tener el estado.",
|
|
59
|
+
}),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], LocalReserveStatus.prototype, "color", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({
|
|
64
|
+
type: "datetime",
|
|
65
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
66
|
+
nullable: true,
|
|
67
|
+
default: null,
|
|
68
|
+
comment: "Fecha de actualización del registro.",
|
|
69
|
+
}),
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
|
+
], LocalReserveStatus.prototype, "updated", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.ManyToOne)(function () { return Partner_1.Partner; }, function (partner) { return partner.local_reserve_status; }, {
|
|
74
|
+
onDelete: "NO ACTION",
|
|
75
|
+
onUpdate: "NO ACTION",
|
|
76
|
+
}),
|
|
77
|
+
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
78
|
+
__metadata("design:type", Partner_1.Partner)
|
|
79
|
+
], LocalReserveStatus.prototype, "updated_by", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({
|
|
82
|
+
default: 1,
|
|
83
|
+
type: "int",
|
|
84
|
+
width: 1,
|
|
85
|
+
comment: "Estado del estado de la reserva.\r\n0: Inactivo.\r\n1: Activo.",
|
|
86
|
+
}),
|
|
87
|
+
__metadata("design:type", Number)
|
|
88
|
+
], LocalReserveStatus.prototype, "status", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.OneToMany)(function () { return LocalReserve_1.LocalReserve; }, function (localReserve) { return localReserve.status; }),
|
|
91
|
+
__metadata("design:type", Array)
|
|
92
|
+
], LocalReserveStatus.prototype, "local_reserves", void 0);
|
|
93
|
+
LocalReserveStatus = __decorate([
|
|
94
|
+
(0, typeorm_1.Entity)({
|
|
95
|
+
comment: "Tabla para agregar los estados y color que van a tener las reservas.",
|
|
96
|
+
name: "local_reserve_status",
|
|
97
|
+
})
|
|
98
|
+
], LocalReserveStatus);
|
|
99
|
+
return LocalReserveStatus;
|
|
100
|
+
}());
|
|
101
|
+
exports.LocalReserveStatus = LocalReserveStatus;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Category, LocalReserve, LocalTable, LocalTableReservePayment, LocalTableZone, MasterNotification, PartnerSession, Product, RequestLocal, RequestLocalHistory, RequestLocalPayment, RequestPrint, VerifyLocal } from "..";
|
|
1
|
+
import { Category, LocalReserve, LocalReserveStatus, 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";
|
|
@@ -45,4 +45,5 @@ export declare class Partner {
|
|
|
45
45
|
local_tables: LocalTable[];
|
|
46
46
|
local_table_reserve_payments: LocalTableReservePayment[];
|
|
47
47
|
local_reserves: LocalReserve[];
|
|
48
|
+
local_reserve_status: LocalReserveStatus[];
|
|
48
49
|
}
|
package/dist/entities/Partner.js
CHANGED
|
@@ -285,6 +285,10 @@ var Partner = /** @class */ (function () {
|
|
|
285
285
|
(0, typeorm_1.OneToMany)(function () { return __1.LocalReserve; }, function (localReserve) { return localReserve.partner; }),
|
|
286
286
|
__metadata("design:type", Array)
|
|
287
287
|
], Partner.prototype, "local_reserves", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalReserveStatus; }, function (localReserveStatus) { return localReserveStatus.updated_by; }),
|
|
290
|
+
__metadata("design:type", Array)
|
|
291
|
+
], Partner.prototype, "local_reserve_status", void 0);
|
|
288
292
|
Partner = __decorate([
|
|
289
293
|
(0, typeorm_1.Entity)({
|
|
290
294
|
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.",
|
|
@@ -61,6 +61,7 @@ export { LocalDecorationReserve } from "./entities/LocalDecorationReserve";
|
|
|
61
61
|
export { DecorationReserve } from "./entities/DecorationReserve";
|
|
62
62
|
export { LocalTableReservePayment } from "./entities/LocalTableReservePayment";
|
|
63
63
|
export { LocalReserve } from "./entities/LocalReserve";
|
|
64
|
+
export { LocalReserveStatus } from "./entities/LocalReserveStatus";
|
|
64
65
|
export { LocalsCompany } from "./views/LocalsCompany";
|
|
65
66
|
export { VerifyLocals } from "./views/VerifyLocals";
|
|
66
67
|
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.getLocalReservesInformation = exports.getVerifyLocalsInformation = exports.getLocalsCompanyInformation = exports.getDiscountsCodeUserInformation = exports.getDiscountsCodeCompanyInformation = exports.LocalReserves = exports.LocalTableZonesFilter = 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;
|
|
18
|
+
exports.CustomRepository = exports.getLocalReservesInformation = exports.getVerifyLocalsInformation = exports.getLocalsCompanyInformation = exports.getDiscountsCodeUserInformation = exports.getDiscountsCodeCompanyInformation = exports.LocalReserves = exports.LocalTableZonesFilter = exports.PartnerNotifications = exports.DiscountsCodeUser = exports.Partners = exports.ViewLocalsCompanies = exports.MasterNotifications = exports.VerifyLocals = exports.LocalsCompany = exports.LocalReserveStatus = 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");
|
|
@@ -142,6 +142,8 @@ var LocalTableReservePayment_1 = require("./entities/LocalTableReservePayment");
|
|
|
142
142
|
Object.defineProperty(exports, "LocalTableReservePayment", { enumerable: true, get: function () { return LocalTableReservePayment_1.LocalTableReservePayment; } });
|
|
143
143
|
var LocalReserve_1 = require("./entities/LocalReserve");
|
|
144
144
|
Object.defineProperty(exports, "LocalReserve", { enumerable: true, get: function () { return LocalReserve_1.LocalReserve; } });
|
|
145
|
+
var LocalReserveStatus_1 = require("./entities/LocalReserveStatus");
|
|
146
|
+
Object.defineProperty(exports, "LocalReserveStatus", { enumerable: true, get: function () { return LocalReserveStatus_1.LocalReserveStatus; } });
|
|
145
147
|
var LocalsCompany_1 = require("./views/LocalsCompany");
|
|
146
148
|
Object.defineProperty(exports, "LocalsCompany", { enumerable: true, get: function () { return LocalsCompany_1.LocalsCompany; } });
|
|
147
149
|
var VerifyLocals_1 = require("./views/VerifyLocals");
|
|
@@ -28,8 +28,8 @@ export declare class LocalReserves {
|
|
|
28
28
|
start: string | null;
|
|
29
29
|
end: string | null;
|
|
30
30
|
title: string;
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
start_time_reserve: string | null;
|
|
32
|
+
end_time_reserve: string | null;
|
|
33
33
|
local_table_zone_id: number;
|
|
34
34
|
local_table_zone_code: string;
|
|
35
35
|
local_table_zone_name: string;
|
|
@@ -156,11 +156,11 @@ var LocalReserves = /** @class */ (function () {
|
|
|
156
156
|
__decorate([
|
|
157
157
|
(0, typeorm_1.ViewColumn)(),
|
|
158
158
|
__metadata("design:type", Object)
|
|
159
|
-
], LocalReserves.prototype, "
|
|
159
|
+
], LocalReserves.prototype, "start_time_reserve", void 0);
|
|
160
160
|
__decorate([
|
|
161
161
|
(0, typeorm_1.ViewColumn)(),
|
|
162
162
|
__metadata("design:type", Object)
|
|
163
|
-
], LocalReserves.prototype, "
|
|
163
|
+
], LocalReserves.prototype, "end_time_reserve", void 0);
|
|
164
164
|
__decorate([
|
|
165
165
|
(0, typeorm_1.ViewColumn)(),
|
|
166
166
|
__metadata("design:type", Number)
|
package/package.json
CHANGED
package/src/entities/Local.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
DiscountCodeUser,
|
|
13
13
|
LocalDecorationReserve,
|
|
14
14
|
LocalPlan,
|
|
15
|
+
LocalReserveStatus,
|
|
15
16
|
LocalTable,
|
|
16
17
|
LocalTableZone,
|
|
17
18
|
PosSystem,
|
|
@@ -217,6 +218,15 @@ export class Local {
|
|
|
217
218
|
@OneToMany(() => LocalTable, (localTable) => localTable.local)
|
|
218
219
|
local_tables: LocalTable[];
|
|
219
220
|
|
|
220
|
-
@OneToMany(
|
|
221
|
+
@OneToMany(
|
|
222
|
+
() => LocalDecorationReserve,
|
|
223
|
+
(localDecorationReserve) => localDecorationReserve.local
|
|
224
|
+
)
|
|
221
225
|
local_decorations_reserve: LocalDecorationReserve[];
|
|
226
|
+
|
|
227
|
+
@OneToMany(
|
|
228
|
+
() => LocalReserveStatus,
|
|
229
|
+
(localReserveStatus) => localReserveStatus.local
|
|
230
|
+
)
|
|
231
|
+
local_reserve_status: LocalReserveStatus[];
|
|
222
232
|
}
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
} from "typeorm";
|
|
11
11
|
import {
|
|
12
12
|
LocalDecorationReserve,
|
|
13
|
+
LocalReserveStatus,
|
|
13
14
|
LocalTable,
|
|
14
15
|
LocalTableReservePayment,
|
|
15
16
|
Partner,
|
|
@@ -152,13 +153,16 @@ export class LocalReserve {
|
|
|
152
153
|
@JoinColumn({ name: "partner" })
|
|
153
154
|
partner: Partner | null;
|
|
154
155
|
|
|
155
|
-
@
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
156
|
+
@ManyToOne(
|
|
157
|
+
() => LocalReserveStatus,
|
|
158
|
+
(localReserveStatus) => localReserveStatus.local_reserves,
|
|
159
|
+
{
|
|
160
|
+
onDelete: "RESTRICT",
|
|
161
|
+
onUpdate: "NO ACTION",
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
@JoinColumn({ name: "status" })
|
|
165
|
+
status: LocalReserveStatus;
|
|
162
166
|
|
|
163
167
|
@ManyToMany(
|
|
164
168
|
() => LocalTable,
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Column,
|
|
3
|
+
Entity,
|
|
4
|
+
JoinColumn,
|
|
5
|
+
ManyToOne,
|
|
6
|
+
OneToMany,
|
|
7
|
+
PrimaryGeneratedColumn,
|
|
8
|
+
} from "typeorm";
|
|
9
|
+
import { Local } from "./Local";
|
|
10
|
+
import { DateTransformer } from "../transformers/dateTransformer";
|
|
11
|
+
import { Partner } from "./Partner";
|
|
12
|
+
import { LocalReserve } from "./LocalReserve";
|
|
13
|
+
|
|
14
|
+
@Entity({
|
|
15
|
+
comment:
|
|
16
|
+
"Tabla para agregar los estados y color que van a tener las reservas.",
|
|
17
|
+
name: "local_reserve_status",
|
|
18
|
+
})
|
|
19
|
+
export class LocalReserveStatus {
|
|
20
|
+
@PrimaryGeneratedColumn({
|
|
21
|
+
type: "int",
|
|
22
|
+
comment: "Id único de cada registro.",
|
|
23
|
+
})
|
|
24
|
+
id: number;
|
|
25
|
+
|
|
26
|
+
@ManyToOne(() => Local, (local) => local.local_reserve_status, {
|
|
27
|
+
onDelete: "CASCADE",
|
|
28
|
+
onUpdate: "NO ACTION",
|
|
29
|
+
})
|
|
30
|
+
@JoinColumn({ name: "local" })
|
|
31
|
+
local: Local;
|
|
32
|
+
|
|
33
|
+
@Column({
|
|
34
|
+
type: "varchar",
|
|
35
|
+
length: 50,
|
|
36
|
+
comment: "Nombre del estado para la reserva.",
|
|
37
|
+
})
|
|
38
|
+
name: string;
|
|
39
|
+
|
|
40
|
+
@Column({
|
|
41
|
+
type: "varchar",
|
|
42
|
+
length: 200,
|
|
43
|
+
comment: "Descripción del estado para la reserva.",
|
|
44
|
+
nullable: true,
|
|
45
|
+
default: null,
|
|
46
|
+
})
|
|
47
|
+
description: string | null;
|
|
48
|
+
|
|
49
|
+
@Column({
|
|
50
|
+
type: "varchar",
|
|
51
|
+
length: 7,
|
|
52
|
+
comment: "Color que va a tener el estado.",
|
|
53
|
+
})
|
|
54
|
+
color: string;
|
|
55
|
+
|
|
56
|
+
@Column({
|
|
57
|
+
type: "datetime",
|
|
58
|
+
transformer: new DateTransformer(),
|
|
59
|
+
nullable: true,
|
|
60
|
+
default: null,
|
|
61
|
+
comment: "Fecha de actualización del registro.",
|
|
62
|
+
})
|
|
63
|
+
updated: Date | null;
|
|
64
|
+
|
|
65
|
+
@ManyToOne(() => Partner, (partner) => partner.local_reserve_status, {
|
|
66
|
+
onDelete: "NO ACTION",
|
|
67
|
+
onUpdate: "NO ACTION",
|
|
68
|
+
})
|
|
69
|
+
@JoinColumn({ name: "updated_by" })
|
|
70
|
+
updated_by: Partner;
|
|
71
|
+
|
|
72
|
+
@Column({
|
|
73
|
+
default: 1,
|
|
74
|
+
type: "int",
|
|
75
|
+
width: 1,
|
|
76
|
+
comment: "Estado del estado de la reserva.\r\n0: Inactivo.\r\n1: Activo.",
|
|
77
|
+
})
|
|
78
|
+
status: number;
|
|
79
|
+
|
|
80
|
+
@OneToMany(() => LocalReserve, (localReserve) => localReserve.status)
|
|
81
|
+
local_reserves: LocalReserve[];
|
|
82
|
+
}
|
package/src/entities/Partner.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
Category,
|
|
13
13
|
LocalReserve,
|
|
14
|
+
LocalReserveStatus,
|
|
14
15
|
LocalTable,
|
|
15
16
|
LocalTableReservePayment,
|
|
16
17
|
LocalTableZone,
|
|
@@ -286,4 +287,10 @@ export class Partner {
|
|
|
286
287
|
|
|
287
288
|
@OneToMany(() => LocalReserve, (localReserve) => localReserve.partner)
|
|
288
289
|
local_reserves: LocalReserve[];
|
|
290
|
+
|
|
291
|
+
@OneToMany(
|
|
292
|
+
() => LocalReserveStatus,
|
|
293
|
+
(localReserveStatus) => localReserveStatus.updated_by
|
|
294
|
+
)
|
|
295
|
+
local_reserve_status: LocalReserveStatus[];
|
|
289
296
|
}
|
|
@@ -61,6 +61,7 @@ export { LocalDecorationReserve } from "./entities/LocalDecorationReserve";
|
|
|
61
61
|
export { DecorationReserve } from "./entities/DecorationReserve";
|
|
62
62
|
export { LocalTableReservePayment } from "./entities/LocalTableReservePayment";
|
|
63
63
|
export { LocalReserve } from "./entities/LocalReserve";
|
|
64
|
+
export { LocalReserveStatus } from "./entities/LocalReserveStatus";
|
|
64
65
|
|
|
65
66
|
export { LocalsCompany } from "./views/LocalsCompany";
|
|
66
67
|
export { VerifyLocals } from "./views/VerifyLocals";
|
|
@@ -116,10 +116,10 @@ export class LocalReserves {
|
|
|
116
116
|
title: string;
|
|
117
117
|
|
|
118
118
|
@ViewColumn()
|
|
119
|
-
|
|
119
|
+
start_time_reserve: string | null;
|
|
120
120
|
|
|
121
121
|
@ViewColumn()
|
|
122
|
-
|
|
122
|
+
end_time_reserve: string | null;
|
|
123
123
|
|
|
124
124
|
@ViewColumn()
|
|
125
125
|
local_table_zone_id: number;
|