test-entity-library-asm 3.6.4 → 3.6.6
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 +2 -2
- package/dist/entities/LocalTable.js +2 -2
- package/dist/entities/RequestLocal.d.ts +3 -2
- package/dist/entities/RequestLocal.js +9 -7
- package/dist/entities/RequestLocalTable.d.ts +7 -0
- package/dist/entities/RequestLocalTable.js +50 -0
- package/dist/entities.views.routes.d.ts +1 -0
- package/dist/entities.views.routes.js +3 -1
- package/dist/views/LocalReserves.d.ts +1 -0
- package/dist/views/LocalReserves.js +4 -0
- package/package.json +1 -1
- package/src/entities/LocalTable.ts +6 -3
- package/src/entities/RequestLocal.ts +12 -6
- package/src/entities/RequestLocalTable.ts +39 -0
- package/src/entities.views.routes.ts +1 -0
- package/src/views/LocalReserves.ts +3 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Local, LocalReserve, LocalTableZone, Partner,
|
|
1
|
+
import { Local, LocalReserve, LocalTableZone, Partner, RequestLocalTable } from "..";
|
|
2
2
|
export declare class LocalTable {
|
|
3
3
|
id: number;
|
|
4
4
|
code: string;
|
|
@@ -17,5 +17,5 @@ export declare class LocalTable {
|
|
|
17
17
|
availability: number;
|
|
18
18
|
status: number;
|
|
19
19
|
local_tables_reserves: LocalReserve[];
|
|
20
|
-
|
|
20
|
+
request_local_tables: RequestLocalTable[];
|
|
21
21
|
}
|
|
@@ -164,9 +164,9 @@ var LocalTable = /** @class */ (function () {
|
|
|
164
164
|
__metadata("design:type", Array)
|
|
165
165
|
], LocalTable.prototype, "local_tables_reserves", void 0);
|
|
166
166
|
__decorate([
|
|
167
|
-
(0, typeorm_1.OneToMany)(function () { return __1.
|
|
167
|
+
(0, typeorm_1.OneToMany)(function () { return __1.RequestLocalTable; }, function (requestLocalTable) { return requestLocalTable.local_table; }),
|
|
168
168
|
__metadata("design:type", Array)
|
|
169
|
-
], LocalTable.prototype, "
|
|
169
|
+
], LocalTable.prototype, "request_local_tables", void 0);
|
|
170
170
|
LocalTable = __decorate([
|
|
171
171
|
(0, typeorm_1.Entity)({
|
|
172
172
|
comment: "Mesas qué se encuentran en el local.",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Local,
|
|
1
|
+
import { Local, Partner, Request, RequestLocalHistory, RequestLocalPayment, RequestLocalTable } from "..";
|
|
2
2
|
export declare class RequestLocal {
|
|
3
3
|
id: number;
|
|
4
4
|
request: Request;
|
|
@@ -9,9 +9,10 @@ export declare class RequestLocal {
|
|
|
9
9
|
preparation_time: string | null;
|
|
10
10
|
updated: Date | null;
|
|
11
11
|
order_number: number;
|
|
12
|
-
|
|
12
|
+
order_number_day: number;
|
|
13
13
|
partner: Partner | null;
|
|
14
14
|
is_notified: number;
|
|
15
15
|
requests_local_history: RequestLocalHistory[];
|
|
16
16
|
payments_made: RequestLocalPayment[];
|
|
17
|
+
request_locals_table: RequestLocalTable[];
|
|
17
18
|
}
|
|
@@ -96,14 +96,12 @@ var RequestLocal = /** @class */ (function () {
|
|
|
96
96
|
__metadata("design:type", Number)
|
|
97
97
|
], RequestLocal.prototype, "order_number", void 0);
|
|
98
98
|
__decorate([
|
|
99
|
-
(0, typeorm_1.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
nullable: true,
|
|
99
|
+
(0, typeorm_1.Column)({
|
|
100
|
+
type: "int",
|
|
101
|
+
comment: "Número del pedido consecutivo por día, es decir, cada día que pase, se va resetean a 0.",
|
|
103
102
|
}),
|
|
104
|
-
(
|
|
105
|
-
|
|
106
|
-
], RequestLocal.prototype, "local_table", void 0);
|
|
103
|
+
__metadata("design:type", Number)
|
|
104
|
+
], RequestLocal.prototype, "order_number_day", void 0);
|
|
107
105
|
__decorate([
|
|
108
106
|
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.partner_request_locals; }, {
|
|
109
107
|
onDelete: "CASCADE",
|
|
@@ -130,6 +128,10 @@ var RequestLocal = /** @class */ (function () {
|
|
|
130
128
|
(0, typeorm_1.OneToMany)(function () { return __1.RequestLocalPayment; }, function (requestLocalPayment) { return requestLocalPayment.request_local; }),
|
|
131
129
|
__metadata("design:type", Array)
|
|
132
130
|
], RequestLocal.prototype, "payments_made", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, typeorm_1.OneToMany)(function () { return __1.RequestLocalTable; }, function (requestLocalTable) { return requestLocalTable.request_local; }),
|
|
133
|
+
__metadata("design:type", Array)
|
|
134
|
+
], RequestLocal.prototype, "request_locals_table", void 0);
|
|
133
135
|
RequestLocal = __decorate([
|
|
134
136
|
(0, typeorm_1.Entity)({
|
|
135
137
|
comment: "Tabla para guardar las relaciones de un pedido y los locales",
|
|
@@ -0,0 +1,50 @@
|
|
|
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.RequestLocalTable = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var RequestLocal_1 = require("./RequestLocal");
|
|
15
|
+
var LocalTable_1 = require("./LocalTable");
|
|
16
|
+
var RequestLocalTable = /** @class */ (function () {
|
|
17
|
+
function RequestLocalTable() {
|
|
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
|
+
], RequestLocalTable.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.ManyToOne)(function () { return RequestLocal_1.RequestLocal; }, function (requestLocal) { return requestLocal.request_locals_table; }, {
|
|
28
|
+
onDelete: "CASCADE",
|
|
29
|
+
onUpdate: "NO ACTION",
|
|
30
|
+
}),
|
|
31
|
+
(0, typeorm_1.JoinColumn)({ name: "request_local" }),
|
|
32
|
+
__metadata("design:type", RequestLocal_1.RequestLocal)
|
|
33
|
+
], RequestLocalTable.prototype, "request_local", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.ManyToOne)(function () { return LocalTable_1.LocalTable; }, function (localTable) { return localTable.request_local_tables; }, {
|
|
36
|
+
onDelete: "CASCADE",
|
|
37
|
+
onUpdate: "NO ACTION",
|
|
38
|
+
}),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: "local_table" }),
|
|
40
|
+
__metadata("design:type", LocalTable_1.LocalTable)
|
|
41
|
+
], RequestLocalTable.prototype, "local_table", void 0);
|
|
42
|
+
RequestLocalTable = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)({
|
|
44
|
+
comment: "Relación de la/s mesas y el local del cuál se está pidiendo.",
|
|
45
|
+
name: "request_local_table",
|
|
46
|
+
})
|
|
47
|
+
], RequestLocalTable);
|
|
48
|
+
return RequestLocalTable;
|
|
49
|
+
}());
|
|
50
|
+
exports.RequestLocalTable = RequestLocalTable;
|
|
@@ -65,6 +65,7 @@ export { LocalReserveStatus } from "./entities/LocalReserveStatus";
|
|
|
65
65
|
export { LocalTableReserve } from "./entities/LocalTableReserve";
|
|
66
66
|
export { RequestInvoice } from "./entities/RequestInvoice";
|
|
67
67
|
export { RequestInvoiceCategory } from "./entities/RequestInvoiceCategory";
|
|
68
|
+
export { RequestLocalTable } from "./entities/RequestLocalTable";
|
|
68
69
|
export { LocalsCompany } from "./views/LocalsCompany";
|
|
69
70
|
export { VerifyLocals } from "./views/VerifyLocals";
|
|
70
71
|
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.RequestInvoiceCategory = exports.RequestInvoice = exports.LocalTableReserve = 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;
|
|
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.RequestLocalTable = exports.RequestInvoiceCategory = exports.RequestInvoice = exports.LocalTableReserve = 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");
|
|
@@ -150,6 +150,8 @@ var RequestInvoice_1 = require("./entities/RequestInvoice");
|
|
|
150
150
|
Object.defineProperty(exports, "RequestInvoice", { enumerable: true, get: function () { return RequestInvoice_1.RequestInvoice; } });
|
|
151
151
|
var RequestInvoiceCategory_1 = require("./entities/RequestInvoiceCategory");
|
|
152
152
|
Object.defineProperty(exports, "RequestInvoiceCategory", { enumerable: true, get: function () { return RequestInvoiceCategory_1.RequestInvoiceCategory; } });
|
|
153
|
+
var RequestLocalTable_1 = require("./entities/RequestLocalTable");
|
|
154
|
+
Object.defineProperty(exports, "RequestLocalTable", { enumerable: true, get: function () { return RequestLocalTable_1.RequestLocalTable; } });
|
|
153
155
|
var LocalsCompany_1 = require("./views/LocalsCompany");
|
|
154
156
|
Object.defineProperty(exports, "LocalsCompany", { enumerable: true, get: function () { return LocalsCompany_1.LocalsCompany; } });
|
|
155
157
|
var VerifyLocals_1 = require("./views/VerifyLocals");
|
|
@@ -297,6 +297,10 @@ var LocalReserves = /** @class */ (function () {
|
|
|
297
297
|
(0, typeorm_1.ViewColumn)(),
|
|
298
298
|
__metadata("design:type", Object)
|
|
299
299
|
], LocalReserves.prototype, "user_table_status", void 0);
|
|
300
|
+
__decorate([
|
|
301
|
+
(0, typeorm_1.ViewColumn)(),
|
|
302
|
+
__metadata("design:type", Number)
|
|
303
|
+
], LocalReserves.prototype, "reserved_tables_count", void 0);
|
|
300
304
|
LocalReserves = __decorate([
|
|
301
305
|
(0, typeorm_1.ViewEntity)({
|
|
302
306
|
name: "local_reserves",
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
LocalReserve,
|
|
15
15
|
LocalTableZone,
|
|
16
16
|
Partner,
|
|
17
|
-
|
|
17
|
+
RequestLocalTable,
|
|
18
18
|
} from "..";
|
|
19
19
|
import { DateTransformer } from "../transformers/dateTransformer";
|
|
20
20
|
|
|
@@ -163,6 +163,9 @@ export class LocalTable {
|
|
|
163
163
|
})
|
|
164
164
|
local_tables_reserves: LocalReserve[];
|
|
165
165
|
|
|
166
|
-
@OneToMany(
|
|
167
|
-
|
|
166
|
+
@OneToMany(
|
|
167
|
+
() => RequestLocalTable,
|
|
168
|
+
(requestLocalTable) => requestLocalTable.local_table
|
|
169
|
+
)
|
|
170
|
+
request_local_tables: RequestLocalTable[];
|
|
168
171
|
}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
Request,
|
|
14
14
|
RequestLocalHistory,
|
|
15
15
|
RequestLocalPayment,
|
|
16
|
+
RequestLocalTable,
|
|
16
17
|
} from "..";
|
|
17
18
|
import { DateTransformer } from "../transformers/dateTransformer";
|
|
18
19
|
|
|
@@ -95,13 +96,12 @@ export class RequestLocal {
|
|
|
95
96
|
})
|
|
96
97
|
order_number: number;
|
|
97
98
|
|
|
98
|
-
@
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
@Column({
|
|
100
|
+
type: "int",
|
|
101
|
+
comment:
|
|
102
|
+
"Número del pedido consecutivo por día, es decir, cada día que pase, se va resetean a 0.",
|
|
102
103
|
})
|
|
103
|
-
|
|
104
|
-
local_table: LocalTable | null;
|
|
104
|
+
order_number_day: number;
|
|
105
105
|
|
|
106
106
|
@ManyToOne(() => Partner, (partner) => partner.partner_request_locals, {
|
|
107
107
|
onDelete: "CASCADE",
|
|
@@ -131,4 +131,10 @@ export class RequestLocal {
|
|
|
131
131
|
(requestLocalPayment) => requestLocalPayment.request_local
|
|
132
132
|
)
|
|
133
133
|
payments_made: RequestLocalPayment[];
|
|
134
|
+
|
|
135
|
+
@OneToMany(
|
|
136
|
+
() => RequestLocalTable,
|
|
137
|
+
(requestLocalTable) => requestLocalTable.request_local
|
|
138
|
+
)
|
|
139
|
+
request_locals_table: RequestLocalTable[];
|
|
134
140
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
|
2
|
+
import { RequestInvoice } from "./RequestInvoice";
|
|
3
|
+
import { Category } from "./Category";
|
|
4
|
+
import { RequestLocal } from "./RequestLocal";
|
|
5
|
+
import { LocalTable } from "./LocalTable";
|
|
6
|
+
|
|
7
|
+
@Entity({
|
|
8
|
+
comment: "Relación de la/s mesas y el local del cuál se está pidiendo.",
|
|
9
|
+
name: "request_local_table",
|
|
10
|
+
})
|
|
11
|
+
export class RequestLocalTable {
|
|
12
|
+
@PrimaryGeneratedColumn({
|
|
13
|
+
type: "int",
|
|
14
|
+
comment: "ID único de cada registro.",
|
|
15
|
+
})
|
|
16
|
+
id: number;
|
|
17
|
+
|
|
18
|
+
@ManyToOne(
|
|
19
|
+
() => RequestLocal,
|
|
20
|
+
(requestLocal) => requestLocal.request_locals_table,
|
|
21
|
+
{
|
|
22
|
+
onDelete: "CASCADE",
|
|
23
|
+
onUpdate: "NO ACTION",
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
@JoinColumn({ name: "request_local" })
|
|
27
|
+
request_local: RequestLocal;
|
|
28
|
+
|
|
29
|
+
@ManyToOne(
|
|
30
|
+
() => LocalTable,
|
|
31
|
+
(localTable) => localTable.request_local_tables,
|
|
32
|
+
{
|
|
33
|
+
onDelete: "CASCADE",
|
|
34
|
+
onUpdate: "NO ACTION",
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
@JoinColumn({ name: "local_table" })
|
|
38
|
+
local_table: LocalTable;
|
|
39
|
+
}
|
|
@@ -65,6 +65,7 @@ export { LocalReserveStatus } from "./entities/LocalReserveStatus";
|
|
|
65
65
|
export { LocalTableReserve } from "./entities/LocalTableReserve";
|
|
66
66
|
export { RequestInvoice } from "./entities/RequestInvoice";
|
|
67
67
|
export { RequestInvoiceCategory } from "./entities/RequestInvoiceCategory";
|
|
68
|
+
export { RequestLocalTable } from "./entities/RequestLocalTable";
|
|
68
69
|
|
|
69
70
|
export { LocalsCompany } from "./views/LocalsCompany";
|
|
70
71
|
export { VerifyLocals } from "./views/VerifyLocals";
|