test-entity-library-asm 3.4.1 → 3.4.3
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 +3 -1
- package/dist/entities/Local.js +8 -0
- package/dist/entities/LocalTable.d.ts +17 -0
- package/dist/entities/LocalTable.js +143 -0
- package/dist/entities/LocalTableZone.d.ts +12 -0
- package/dist/entities/LocalTableZone.js +100 -0
- package/dist/entities/Partner.d.ts +4 -1
- package/dist/entities/Partner.js +13 -1
- package/dist/entities/RequestLocal.d.ts +4 -1
- package/dist/entities/RequestLocal.js +25 -0
- package/dist/entities.views.routes.d.ts +2 -0
- package/dist/entities.views.routes.js +5 -1
- package/package.json +1 -1
- package/src/entities/Local.ts +8 -0
- package/src/entities/LocalTable.ts +122 -0
- package/src/entities/LocalTableZone.ts +80 -0
- package/src/entities/Partner.ts +15 -3
- package/src/entities/RequestLocal.ts +30 -1
- package/src/entities.views.routes.ts +2 -0
package/dist/entities/Local.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DiscountCodeUser, LocalPlan, PosSystem, ReceiptConfig, RequestLocal } from "..";
|
|
1
|
+
import { DiscountCodeUser, 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";
|
|
@@ -35,4 +35,6 @@ export declare class Local {
|
|
|
35
35
|
discount_code_locals: DiscountCodeUser[];
|
|
36
36
|
locals_plan: LocalPlan[];
|
|
37
37
|
receipts_local_config: ReceiptConfig[];
|
|
38
|
+
local_table_zones: LocalTableZone[];
|
|
39
|
+
local_tables: LocalTable[];
|
|
38
40
|
}
|
package/dist/entities/Local.js
CHANGED
|
@@ -219,6 +219,14 @@ var Local = /** @class */ (function () {
|
|
|
219
219
|
(0, typeorm_1.OneToMany)(function () { return __1.ReceiptConfig; }, function (receiptConfig) { return receiptConfig.local; }),
|
|
220
220
|
__metadata("design:type", Array)
|
|
221
221
|
], Local.prototype, "receipts_local_config", void 0);
|
|
222
|
+
__decorate([
|
|
223
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalTableZone; }, function (localTableZone) { return localTableZone.local; }),
|
|
224
|
+
__metadata("design:type", Array)
|
|
225
|
+
], Local.prototype, "local_table_zones", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalTable; }, function (localTable) { return localTable.local; }),
|
|
228
|
+
__metadata("design:type", Array)
|
|
229
|
+
], Local.prototype, "local_tables", void 0);
|
|
222
230
|
Local = __decorate([
|
|
223
231
|
(0, typeorm_1.Entity)({ comment: "Locales disponibles de las empresas (company)." })
|
|
224
232
|
], Local);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Local, LocalTableZone, Partner, RequestLocal } from "..";
|
|
2
|
+
export declare class LocalTable {
|
|
3
|
+
id: number;
|
|
4
|
+
code: string;
|
|
5
|
+
local: Local;
|
|
6
|
+
name: string;
|
|
7
|
+
capacity: number;
|
|
8
|
+
location_x: number;
|
|
9
|
+
location_y: number;
|
|
10
|
+
zone: LocalTableZone;
|
|
11
|
+
description: string | null;
|
|
12
|
+
created: Date;
|
|
13
|
+
updated: Date | null;
|
|
14
|
+
updated_by: Partner | null;
|
|
15
|
+
status: number;
|
|
16
|
+
request_locals: RequestLocal[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
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.LocalTable = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var __1 = require("..");
|
|
15
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
var LocalTable = /** @class */ (function () {
|
|
17
|
+
function LocalTable() {
|
|
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
|
+
], LocalTable.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 de cada mesa.",
|
|
32
|
+
}),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], LocalTable.prototype, "code", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Local; }, function (local) { return local.local_tables; }, {
|
|
37
|
+
onDelete: "CASCADE",
|
|
38
|
+
onUpdate: "NO ACTION",
|
|
39
|
+
}),
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
41
|
+
__metadata("design:type", __1.Local)
|
|
42
|
+
], LocalTable.prototype, "local", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({
|
|
45
|
+
type: "varchar",
|
|
46
|
+
length: 40,
|
|
47
|
+
unique: true,
|
|
48
|
+
comment: "Nombre de la mesa.",
|
|
49
|
+
}),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], LocalTable.prototype, "name", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({
|
|
54
|
+
type: "int",
|
|
55
|
+
comment: "Capacidad de personas en la mesa.",
|
|
56
|
+
}),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], LocalTable.prototype, "capacity", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({
|
|
61
|
+
type: "float",
|
|
62
|
+
nullable: true,
|
|
63
|
+
default: null,
|
|
64
|
+
comment: "Coordenada X de ubicación dentro del plano del local.",
|
|
65
|
+
}),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], LocalTable.prototype, "location_x", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({
|
|
70
|
+
type: "float",
|
|
71
|
+
nullable: true,
|
|
72
|
+
default: null,
|
|
73
|
+
comment: "Coordenada Y de ubicación dentro del plano.",
|
|
74
|
+
}),
|
|
75
|
+
__metadata("design:type", Number)
|
|
76
|
+
], LocalTable.prototype, "location_y", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.LocalTableZone; }, function (localTableZone) { return localTableZone.local_tables; }, {
|
|
79
|
+
onDelete: "CASCADE",
|
|
80
|
+
onUpdate: "NO ACTION",
|
|
81
|
+
}),
|
|
82
|
+
(0, typeorm_1.JoinColumn)({ name: "zone" }),
|
|
83
|
+
__metadata("design:type", __1.LocalTableZone)
|
|
84
|
+
], LocalTable.prototype, "zone", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({
|
|
87
|
+
type: "varchar",
|
|
88
|
+
length: 600,
|
|
89
|
+
nullable: true,
|
|
90
|
+
default: null,
|
|
91
|
+
comment: "Detalle adicional de la mesa.",
|
|
92
|
+
}),
|
|
93
|
+
__metadata("design:type", Object)
|
|
94
|
+
], LocalTable.prototype, "description", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, typeorm_1.Column)({
|
|
97
|
+
type: "datetime",
|
|
98
|
+
comment: "Fecha creación del registro.",
|
|
99
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
100
|
+
}),
|
|
101
|
+
__metadata("design:type", Date)
|
|
102
|
+
], LocalTable.prototype, "created", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.Column)({
|
|
105
|
+
type: "datetime",
|
|
106
|
+
nullable: true,
|
|
107
|
+
default: null,
|
|
108
|
+
comment: "Fecha de actualización del registro.",
|
|
109
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
110
|
+
}),
|
|
111
|
+
__metadata("design:type", Object)
|
|
112
|
+
], LocalTable.prototype, "updated", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.local_tables; }, {
|
|
115
|
+
onDelete: "SET NULL",
|
|
116
|
+
onUpdate: "NO ACTION",
|
|
117
|
+
nullable: true,
|
|
118
|
+
}),
|
|
119
|
+
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
120
|
+
__metadata("design:type", Object)
|
|
121
|
+
], LocalTable.prototype, "updated_by", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, typeorm_1.Column)({
|
|
124
|
+
default: 1,
|
|
125
|
+
type: "int",
|
|
126
|
+
width: 1,
|
|
127
|
+
comment: "Estado del registro:\r\n0: Inactivo.\r\n1: Activo.",
|
|
128
|
+
}),
|
|
129
|
+
__metadata("design:type", Number)
|
|
130
|
+
], LocalTable.prototype, "status", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, typeorm_1.OneToMany)(function () { return __1.RequestLocal; }, function (requestLocal) { return requestLocal.local_table; }),
|
|
133
|
+
__metadata("design:type", Array)
|
|
134
|
+
], LocalTable.prototype, "request_locals", void 0);
|
|
135
|
+
LocalTable = __decorate([
|
|
136
|
+
(0, typeorm_1.Entity)({
|
|
137
|
+
comment: "Mesas qué se encuentran en el local.",
|
|
138
|
+
name: "local_table",
|
|
139
|
+
})
|
|
140
|
+
], LocalTable);
|
|
141
|
+
return LocalTable;
|
|
142
|
+
}());
|
|
143
|
+
exports.LocalTable = LocalTable;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Local, LocalTable, Partner } from "..";
|
|
2
|
+
export declare class LocalTableZone {
|
|
3
|
+
id: number;
|
|
4
|
+
code: string;
|
|
5
|
+
local: Local;
|
|
6
|
+
name: string;
|
|
7
|
+
created: Date;
|
|
8
|
+
updated: Date | null;
|
|
9
|
+
updated_by: Partner | null;
|
|
10
|
+
status: number;
|
|
11
|
+
local_tables: LocalTable[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
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.LocalTableZone = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var __1 = require("..");
|
|
15
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
var LocalTableZone = /** @class */ (function () {
|
|
17
|
+
function LocalTableZone() {
|
|
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
|
+
], LocalTableZone.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 de cada registro.",
|
|
32
|
+
}),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], LocalTableZone.prototype, "code", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Local; }, function (local) { return local.local_table_zones; }, {
|
|
37
|
+
onDelete: "CASCADE",
|
|
38
|
+
onUpdate: "NO ACTION",
|
|
39
|
+
}),
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
41
|
+
__metadata("design:type", __1.Local)
|
|
42
|
+
], LocalTableZone.prototype, "local", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({
|
|
45
|
+
type: "varchar",
|
|
46
|
+
length: 40,
|
|
47
|
+
unique: true,
|
|
48
|
+
comment: "Nombre del registro.",
|
|
49
|
+
}),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], LocalTableZone.prototype, "name", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({
|
|
54
|
+
type: "datetime",
|
|
55
|
+
comment: "Fecha de creación del registro.",
|
|
56
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", Date)
|
|
59
|
+
], LocalTableZone.prototype, "created", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({
|
|
62
|
+
type: "datetime",
|
|
63
|
+
nullable: true,
|
|
64
|
+
default: null,
|
|
65
|
+
comment: "Fecha de actualización del registro.",
|
|
66
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], LocalTableZone.prototype, "updated", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.local_table_zones; }, {
|
|
72
|
+
onDelete: "SET NULL",
|
|
73
|
+
onUpdate: "NO ACTION",
|
|
74
|
+
nullable: true,
|
|
75
|
+
}),
|
|
76
|
+
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], LocalTableZone.prototype, "updated_by", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({
|
|
81
|
+
default: 1,
|
|
82
|
+
type: "int",
|
|
83
|
+
width: 1,
|
|
84
|
+
comment: "Estado del registro:\r\n0: Inactivo.\r\n1: Activo.",
|
|
85
|
+
}),
|
|
86
|
+
__metadata("design:type", Number)
|
|
87
|
+
], LocalTableZone.prototype, "status", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalTable; }, function (localTable) { return localTable.zone; }),
|
|
90
|
+
__metadata("design:type", Array)
|
|
91
|
+
], LocalTableZone.prototype, "local_tables", void 0);
|
|
92
|
+
LocalTableZone = __decorate([
|
|
93
|
+
(0, typeorm_1.Entity)({
|
|
94
|
+
comment: "Zonas donde están ubicadas las mesas.",
|
|
95
|
+
name: "local_table_zone",
|
|
96
|
+
})
|
|
97
|
+
], LocalTableZone);
|
|
98
|
+
return LocalTableZone;
|
|
99
|
+
}());
|
|
100
|
+
exports.LocalTableZone = LocalTableZone;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Category, MasterNotification, PartnerSession, Product, RequestLocalHistory, RequestLocalPayment, RequestPrint, VerifyLocal } from "..";
|
|
1
|
+
import { Category, LocalTable, 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";
|
|
@@ -40,4 +40,7 @@ export declare class Partner {
|
|
|
40
40
|
updated_by_history: RequestLocalHistory[];
|
|
41
41
|
requests_local_payment: RequestLocalPayment[];
|
|
42
42
|
partner_prints: RequestPrint[];
|
|
43
|
+
partner_request_locals: RequestLocal[];
|
|
44
|
+
local_table_zones: LocalTableZone[];
|
|
45
|
+
local_tables: LocalTable[];
|
|
43
46
|
}
|
package/dist/entities/Partner.js
CHANGED
|
@@ -262,9 +262,21 @@ var Partner = /** @class */ (function () {
|
|
|
262
262
|
__metadata("design:type", Array)
|
|
263
263
|
], Partner.prototype, "requests_local_payment", void 0);
|
|
264
264
|
__decorate([
|
|
265
|
-
(0, typeorm_1.OneToMany)(function () { return __1.RequestPrint; }, function (requestPrint) { return requestPrint.
|
|
265
|
+
(0, typeorm_1.OneToMany)(function () { return __1.RequestPrint; }, function (requestPrint) { return requestPrint.partner; }),
|
|
266
266
|
__metadata("design:type", Array)
|
|
267
267
|
], Partner.prototype, "partner_prints", void 0);
|
|
268
|
+
__decorate([
|
|
269
|
+
(0, typeorm_1.OneToMany)(function () { return __1.RequestLocal; }, function (requestLocal) { return requestLocal.partner; }),
|
|
270
|
+
__metadata("design:type", Array)
|
|
271
|
+
], Partner.prototype, "partner_request_locals", void 0);
|
|
272
|
+
__decorate([
|
|
273
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalTableZone; }, function (localTableZone) { return localTableZone.updated_by; }),
|
|
274
|
+
__metadata("design:type", Array)
|
|
275
|
+
], Partner.prototype, "local_table_zones", void 0);
|
|
276
|
+
__decorate([
|
|
277
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalTable; }, function (localTable) { return localTable.updated_by; }),
|
|
278
|
+
__metadata("design:type", Array)
|
|
279
|
+
], Partner.prototype, "local_tables", void 0);
|
|
268
280
|
Partner = __decorate([
|
|
269
281
|
(0, typeorm_1.Entity)({
|
|
270
282
|
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 { Local, Request, RequestLocalHistory, RequestLocalPayment } from "..";
|
|
1
|
+
import { Local, LocalTable, Partner, Request, RequestLocalHistory, RequestLocalPayment } from "..";
|
|
2
2
|
export declare class RequestLocal {
|
|
3
3
|
id: number;
|
|
4
4
|
request: Request;
|
|
@@ -8,6 +8,9 @@ export declare class RequestLocal {
|
|
|
8
8
|
status: number;
|
|
9
9
|
preparation_time: string | null;
|
|
10
10
|
updated: Date | null;
|
|
11
|
+
order_number: number;
|
|
12
|
+
local_table: LocalTable | null;
|
|
13
|
+
partner: Partner | null;
|
|
11
14
|
is_notified: number;
|
|
12
15
|
requests_local_history: RequestLocalHistory[];
|
|
13
16
|
payments_made: RequestLocalPayment[];
|
|
@@ -88,6 +88,31 @@ var RequestLocal = /** @class */ (function () {
|
|
|
88
88
|
}),
|
|
89
89
|
__metadata("design:type", Object)
|
|
90
90
|
], RequestLocal.prototype, "updated", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({
|
|
93
|
+
type: "int",
|
|
94
|
+
comment: "Número del pedido.",
|
|
95
|
+
}),
|
|
96
|
+
__metadata("design:type", Number)
|
|
97
|
+
], RequestLocal.prototype, "order_number", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.LocalTable; }, function (localTable) { return localTable.request_locals; }, {
|
|
100
|
+
onDelete: "SET NULL",
|
|
101
|
+
onUpdate: "NO ACTION",
|
|
102
|
+
nullable: true,
|
|
103
|
+
}),
|
|
104
|
+
(0, typeorm_1.JoinColumn)({ name: "local_table" }),
|
|
105
|
+
__metadata("design:type", Object)
|
|
106
|
+
], RequestLocal.prototype, "local_table", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.partner_request_locals; }, {
|
|
109
|
+
onDelete: "CASCADE",
|
|
110
|
+
onUpdate: "NO ACTION",
|
|
111
|
+
nullable: true,
|
|
112
|
+
}),
|
|
113
|
+
(0, typeorm_1.JoinColumn)({ name: "partner" }),
|
|
114
|
+
__metadata("design:type", Object)
|
|
115
|
+
], RequestLocal.prototype, "partner", void 0);
|
|
91
116
|
__decorate([
|
|
92
117
|
(0, typeorm_1.Column)({
|
|
93
118
|
default: 1,
|
|
@@ -55,6 +55,8 @@ export { UserPaymentMethod } from "./entities/UserPaymentMethod";
|
|
|
55
55
|
export { RequestLocalPayment } from "./entities/RequestLocalPayment";
|
|
56
56
|
export { ReceiptConfig } from "./entities/ReceiptConfig";
|
|
57
57
|
export { RequestPrint } from "./entities/RequestPrint";
|
|
58
|
+
export { LocalTableZone } from "./entities/LocalTableZone";
|
|
59
|
+
export { LocalTable } from "./entities/LocalTable";
|
|
58
60
|
export { LocalsCompany } from "./views/LocalsCompany";
|
|
59
61
|
export { VerifyLocals } from "./views/VerifyLocals";
|
|
60
62
|
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.RequestPrint = exports.ReceiptConfig = exports.RequestLocalPayment = exports.UserPaymentMethod = exports.RequestLocalHistory = exports.RequestLocal = exports.PartnerSession = void 0;
|
|
18
|
+
exports.CustomRepository = exports.PartnerNotifications = exports.DiscountsCodeUser = exports.Partners = exports.ViewLocalsCompanies = exports.MasterNotifications = exports.VerifyLocals = exports.LocalsCompany = 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");
|
|
@@ -130,6 +130,10 @@ var ReceiptConfig_1 = require("./entities/ReceiptConfig");
|
|
|
130
130
|
Object.defineProperty(exports, "ReceiptConfig", { enumerable: true, get: function () { return ReceiptConfig_1.ReceiptConfig; } });
|
|
131
131
|
var RequestPrint_1 = require("./entities/RequestPrint");
|
|
132
132
|
Object.defineProperty(exports, "RequestPrint", { enumerable: true, get: function () { return RequestPrint_1.RequestPrint; } });
|
|
133
|
+
var LocalTableZone_1 = require("./entities/LocalTableZone");
|
|
134
|
+
Object.defineProperty(exports, "LocalTableZone", { enumerable: true, get: function () { return LocalTableZone_1.LocalTableZone; } });
|
|
135
|
+
var LocalTable_1 = require("./entities/LocalTable");
|
|
136
|
+
Object.defineProperty(exports, "LocalTable", { enumerable: true, get: function () { return LocalTable_1.LocalTable; } });
|
|
133
137
|
var LocalsCompany_1 = require("./views/LocalsCompany");
|
|
134
138
|
Object.defineProperty(exports, "LocalsCompany", { enumerable: true, get: function () { return LocalsCompany_1.LocalsCompany; } });
|
|
135
139
|
var VerifyLocals_1 = require("./views/VerifyLocals");
|
package/package.json
CHANGED
package/src/entities/Local.ts
CHANGED
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
DiscountCodeUser,
|
|
13
13
|
LocalPlan,
|
|
14
|
+
LocalTable,
|
|
15
|
+
LocalTableZone,
|
|
14
16
|
PosSystem,
|
|
15
17
|
ReceiptConfig,
|
|
16
18
|
RequestLocal,
|
|
@@ -207,4 +209,10 @@ export class Local {
|
|
|
207
209
|
|
|
208
210
|
@OneToMany(() => ReceiptConfig, (receiptConfig) => receiptConfig.local)
|
|
209
211
|
receipts_local_config: ReceiptConfig[];
|
|
212
|
+
|
|
213
|
+
@OneToMany(() => LocalTableZone, (localTableZone) => localTableZone.local)
|
|
214
|
+
local_table_zones: LocalTableZone[];
|
|
215
|
+
|
|
216
|
+
@OneToMany(() => LocalTable, (localTable) => localTable.local)
|
|
217
|
+
local_tables: LocalTable[];
|
|
210
218
|
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Column,
|
|
3
|
+
Entity,
|
|
4
|
+
JoinColumn,
|
|
5
|
+
ManyToOne,
|
|
6
|
+
OneToMany,
|
|
7
|
+
PrimaryGeneratedColumn,
|
|
8
|
+
} from "typeorm";
|
|
9
|
+
import { Local, LocalTableZone, Partner, RequestLocal } from "..";
|
|
10
|
+
import { DateTransformer } from "../transformers/dateTransformer";
|
|
11
|
+
|
|
12
|
+
@Entity({
|
|
13
|
+
comment: "Mesas qué se encuentran en el local.",
|
|
14
|
+
name: "local_table",
|
|
15
|
+
})
|
|
16
|
+
export class LocalTable {
|
|
17
|
+
@PrimaryGeneratedColumn({
|
|
18
|
+
type: "int",
|
|
19
|
+
comment: "Id único de cada registro.",
|
|
20
|
+
})
|
|
21
|
+
id: number;
|
|
22
|
+
|
|
23
|
+
@Column({
|
|
24
|
+
length: 10,
|
|
25
|
+
type: "varchar",
|
|
26
|
+
unique: true,
|
|
27
|
+
comment: "Código único de cada mesa.",
|
|
28
|
+
})
|
|
29
|
+
code: string;
|
|
30
|
+
|
|
31
|
+
@ManyToOne(() => Local, (local) => local.local_tables, {
|
|
32
|
+
onDelete: "CASCADE",
|
|
33
|
+
onUpdate: "NO ACTION",
|
|
34
|
+
})
|
|
35
|
+
@JoinColumn({ name: "local" })
|
|
36
|
+
local: Local;
|
|
37
|
+
|
|
38
|
+
@Column({
|
|
39
|
+
type: "varchar",
|
|
40
|
+
length: 40,
|
|
41
|
+
unique: true,
|
|
42
|
+
comment: "Nombre de la mesa.",
|
|
43
|
+
})
|
|
44
|
+
name: string;
|
|
45
|
+
|
|
46
|
+
@Column({
|
|
47
|
+
type: "int",
|
|
48
|
+
comment: "Capacidad de personas en la mesa.",
|
|
49
|
+
})
|
|
50
|
+
capacity: number;
|
|
51
|
+
|
|
52
|
+
@Column({
|
|
53
|
+
type: "float",
|
|
54
|
+
nullable: true,
|
|
55
|
+
default: null,
|
|
56
|
+
comment: "Coordenada X de ubicación dentro del plano del local.",
|
|
57
|
+
})
|
|
58
|
+
location_x: number;
|
|
59
|
+
|
|
60
|
+
@Column({
|
|
61
|
+
type: "float",
|
|
62
|
+
nullable: true,
|
|
63
|
+
default: null,
|
|
64
|
+
comment: "Coordenada Y de ubicación dentro del plano.",
|
|
65
|
+
})
|
|
66
|
+
location_y: number;
|
|
67
|
+
|
|
68
|
+
@ManyToOne(
|
|
69
|
+
() => LocalTableZone,
|
|
70
|
+
(localTableZone) => localTableZone.local_tables,
|
|
71
|
+
{
|
|
72
|
+
onDelete: "CASCADE",
|
|
73
|
+
onUpdate: "NO ACTION",
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
@JoinColumn({ name: "zone" })
|
|
77
|
+
zone: LocalTableZone;
|
|
78
|
+
|
|
79
|
+
@Column({
|
|
80
|
+
type: "varchar",
|
|
81
|
+
length: 600,
|
|
82
|
+
nullable: true,
|
|
83
|
+
default: null,
|
|
84
|
+
comment: "Detalle adicional de la mesa.",
|
|
85
|
+
})
|
|
86
|
+
description: string | null;
|
|
87
|
+
|
|
88
|
+
@Column({
|
|
89
|
+
type: "datetime",
|
|
90
|
+
comment: "Fecha creación del registro.",
|
|
91
|
+
transformer: new DateTransformer(),
|
|
92
|
+
})
|
|
93
|
+
created: Date;
|
|
94
|
+
|
|
95
|
+
@Column({
|
|
96
|
+
type: "datetime",
|
|
97
|
+
nullable: true,
|
|
98
|
+
default: null,
|
|
99
|
+
comment: "Fecha de actualización del registro.",
|
|
100
|
+
transformer: new DateTransformer(),
|
|
101
|
+
})
|
|
102
|
+
updated: Date | null;
|
|
103
|
+
|
|
104
|
+
@ManyToOne(() => Partner, (partner) => partner.local_tables, {
|
|
105
|
+
onDelete: "SET NULL",
|
|
106
|
+
onUpdate: "NO ACTION",
|
|
107
|
+
nullable: true,
|
|
108
|
+
})
|
|
109
|
+
@JoinColumn({ name: "updated_by" })
|
|
110
|
+
updated_by: Partner | null;
|
|
111
|
+
|
|
112
|
+
@Column({
|
|
113
|
+
default: 1,
|
|
114
|
+
type: "int",
|
|
115
|
+
width: 1,
|
|
116
|
+
comment: "Estado del registro:\r\n0: Inactivo.\r\n1: Activo.",
|
|
117
|
+
})
|
|
118
|
+
status: number;
|
|
119
|
+
|
|
120
|
+
@OneToMany(() => RequestLocal, (requestLocal) => requestLocal.local_table)
|
|
121
|
+
request_locals: RequestLocal[];
|
|
122
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Column,
|
|
3
|
+
Entity,
|
|
4
|
+
JoinColumn,
|
|
5
|
+
ManyToOne,
|
|
6
|
+
OneToMany,
|
|
7
|
+
PrimaryGeneratedColumn,
|
|
8
|
+
} from "typeorm";
|
|
9
|
+
import { Local, LocalTable, Partner } from "..";
|
|
10
|
+
import { DateTransformer } from "../transformers/dateTransformer";
|
|
11
|
+
|
|
12
|
+
@Entity({
|
|
13
|
+
comment: "Zonas donde están ubicadas las mesas.",
|
|
14
|
+
name: "local_table_zone",
|
|
15
|
+
})
|
|
16
|
+
export class LocalTableZone {
|
|
17
|
+
@PrimaryGeneratedColumn({
|
|
18
|
+
type: "int",
|
|
19
|
+
comment: "Id único de cada registro.",
|
|
20
|
+
})
|
|
21
|
+
id: number;
|
|
22
|
+
|
|
23
|
+
@Column({
|
|
24
|
+
length: 10,
|
|
25
|
+
type: "varchar",
|
|
26
|
+
unique: true,
|
|
27
|
+
comment: "Código único de cada registro.",
|
|
28
|
+
})
|
|
29
|
+
code: string;
|
|
30
|
+
|
|
31
|
+
@ManyToOne(() => Local, (local) => local.local_table_zones, {
|
|
32
|
+
onDelete: "CASCADE",
|
|
33
|
+
onUpdate: "NO ACTION",
|
|
34
|
+
})
|
|
35
|
+
@JoinColumn({ name: "local" })
|
|
36
|
+
local: Local;
|
|
37
|
+
|
|
38
|
+
@Column({
|
|
39
|
+
type: "varchar",
|
|
40
|
+
length: 40,
|
|
41
|
+
unique: true,
|
|
42
|
+
comment: "Nombre del registro.",
|
|
43
|
+
})
|
|
44
|
+
name: string;
|
|
45
|
+
|
|
46
|
+
@Column({
|
|
47
|
+
type: "datetime",
|
|
48
|
+
comment: "Fecha de creación del registro.",
|
|
49
|
+
transformer: new DateTransformer(),
|
|
50
|
+
})
|
|
51
|
+
created: Date;
|
|
52
|
+
|
|
53
|
+
@Column({
|
|
54
|
+
type: "datetime",
|
|
55
|
+
nullable: true,
|
|
56
|
+
default: null,
|
|
57
|
+
comment: "Fecha de actualización del registro.",
|
|
58
|
+
transformer: new DateTransformer(),
|
|
59
|
+
})
|
|
60
|
+
updated: Date | null;
|
|
61
|
+
|
|
62
|
+
@ManyToOne(() => Partner, (partner) => partner.local_table_zones, {
|
|
63
|
+
onDelete: "SET NULL",
|
|
64
|
+
onUpdate: "NO ACTION",
|
|
65
|
+
nullable: true,
|
|
66
|
+
})
|
|
67
|
+
@JoinColumn({ name: "updated_by" })
|
|
68
|
+
updated_by: Partner | null;
|
|
69
|
+
|
|
70
|
+
@Column({
|
|
71
|
+
default: 1,
|
|
72
|
+
type: "int",
|
|
73
|
+
width: 1,
|
|
74
|
+
comment: "Estado del registro:\r\n0: Inactivo.\r\n1: Activo.",
|
|
75
|
+
})
|
|
76
|
+
status: number;
|
|
77
|
+
|
|
78
|
+
@OneToMany(() => LocalTable, (localTable) => localTable.zone)
|
|
79
|
+
local_tables: LocalTable[];
|
|
80
|
+
}
|
package/src/entities/Partner.ts
CHANGED
|
@@ -10,9 +10,12 @@ import {
|
|
|
10
10
|
} from "typeorm";
|
|
11
11
|
import {
|
|
12
12
|
Category,
|
|
13
|
+
LocalTable,
|
|
14
|
+
LocalTableZone,
|
|
13
15
|
MasterNotification,
|
|
14
16
|
PartnerSession,
|
|
15
17
|
Product,
|
|
18
|
+
RequestLocal,
|
|
16
19
|
RequestLocalHistory,
|
|
17
20
|
RequestLocalPayment,
|
|
18
21
|
RequestPrint,
|
|
@@ -258,9 +261,18 @@ export class Partner {
|
|
|
258
261
|
)
|
|
259
262
|
requests_local_payment: RequestLocalPayment[];
|
|
260
263
|
|
|
264
|
+
@OneToMany(() => RequestPrint, (requestPrint) => requestPrint.partner)
|
|
265
|
+
partner_prints: RequestPrint[];
|
|
266
|
+
|
|
267
|
+
@OneToMany(() => RequestLocal, (requestLocal) => requestLocal.partner)
|
|
268
|
+
partner_request_locals: RequestLocal[];
|
|
269
|
+
|
|
261
270
|
@OneToMany(
|
|
262
|
-
() =>
|
|
263
|
-
(
|
|
271
|
+
() => LocalTableZone,
|
|
272
|
+
(localTableZone) => localTableZone.updated_by
|
|
264
273
|
)
|
|
265
|
-
|
|
274
|
+
local_table_zones: LocalTableZone[];
|
|
275
|
+
|
|
276
|
+
@OneToMany(() => LocalTable, (localTable) => localTable.updated_by)
|
|
277
|
+
local_tables: LocalTable[];
|
|
266
278
|
}
|
|
@@ -6,7 +6,14 @@ import {
|
|
|
6
6
|
OneToMany,
|
|
7
7
|
PrimaryGeneratedColumn,
|
|
8
8
|
} from "typeorm";
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
Local,
|
|
11
|
+
LocalTable,
|
|
12
|
+
Partner,
|
|
13
|
+
Request,
|
|
14
|
+
RequestLocalHistory,
|
|
15
|
+
RequestLocalPayment,
|
|
16
|
+
} from "..";
|
|
10
17
|
import { DateTransformer } from "../transformers/dateTransformer";
|
|
11
18
|
|
|
12
19
|
@Entity({
|
|
@@ -82,6 +89,28 @@ export class RequestLocal {
|
|
|
82
89
|
})
|
|
83
90
|
updated: Date | null;
|
|
84
91
|
|
|
92
|
+
@Column({
|
|
93
|
+
type: "int",
|
|
94
|
+
comment: "Número del pedido.",
|
|
95
|
+
})
|
|
96
|
+
order_number: number;
|
|
97
|
+
|
|
98
|
+
@ManyToOne(() => LocalTable, (localTable) => localTable.request_locals, {
|
|
99
|
+
onDelete: "SET NULL",
|
|
100
|
+
onUpdate: "NO ACTION",
|
|
101
|
+
nullable: true,
|
|
102
|
+
})
|
|
103
|
+
@JoinColumn({ name: "local_table" })
|
|
104
|
+
local_table: LocalTable | null;
|
|
105
|
+
|
|
106
|
+
@ManyToOne(() => Partner, (partner) => partner.partner_request_locals, {
|
|
107
|
+
onDelete: "CASCADE",
|
|
108
|
+
onUpdate: "NO ACTION",
|
|
109
|
+
nullable: true,
|
|
110
|
+
})
|
|
111
|
+
@JoinColumn({ name: "partner" })
|
|
112
|
+
partner: Partner | null;
|
|
113
|
+
|
|
85
114
|
@Column({
|
|
86
115
|
default: 1,
|
|
87
116
|
type: "int",
|
|
@@ -55,6 +55,8 @@ export { UserPaymentMethod } from "./entities/UserPaymentMethod";
|
|
|
55
55
|
export { RequestLocalPayment } from "./entities/RequestLocalPayment";
|
|
56
56
|
export { ReceiptConfig } from "./entities/ReceiptConfig";
|
|
57
57
|
export { RequestPrint } from "./entities/RequestPrint";
|
|
58
|
+
export { LocalTableZone } from "./entities/LocalTableZone";
|
|
59
|
+
export { LocalTable } from "./entities/LocalTable";
|
|
58
60
|
|
|
59
61
|
export { LocalsCompany } from "./views/LocalsCompany";
|
|
60
62
|
export { VerifyLocals } from "./views/VerifyLocals";
|