test-entity-library-asm 3.6.0 → 3.6.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.
@@ -1,4 +1,4 @@
1
- import { CategoryDate, Partner, ScheduleCategory } from "..";
1
+ import { CategoryDate, Partner, RequestInvoiceCategory, ScheduleCategory } from "..";
2
2
  import { Local } from "./Local";
3
3
  import { Product } from "./Product";
4
4
  export declare class Category {
@@ -19,4 +19,5 @@ export declare class Category {
19
19
  products: Product[];
20
20
  category_schedules: ScheduleCategory[];
21
21
  category_dates: CategoryDate[];
22
+ request_invoice_categories: RequestInvoiceCategory[];
22
23
  }
@@ -150,6 +150,10 @@ var Category = /** @class */ (function () {
150
150
  (0, typeorm_1.OneToMany)(function () { return __1.CategoryDate; }, function (categoryDate) { return categoryDate.category; }),
151
151
  __metadata("design:type", Array)
152
152
  ], Category.prototype, "category_dates", void 0);
153
+ __decorate([
154
+ (0, typeorm_1.OneToMany)(function () { return __1.RequestInvoiceCategory; }, function (requestInvoiceCategory) { return requestInvoiceCategory.category; }),
155
+ __metadata("design:type", Array)
156
+ ], Category.prototype, "request_invoice_categories", void 0);
153
157
  Category = __decorate([
154
158
  (0, typeorm_1.Entity)({
155
159
  comment: "Lista de categorías que tiene un local en su menú: promos, de la semana, completo...\r\n\r\nEsas categorías será visibles a nivel app como un menu horizontal donde cada categoría tendrá sus productos.",
@@ -1,4 +1,4 @@
1
- import { DiscountCodeUser, LocalDecorationReserve, LocalPlan, LocalReserveStatus, LocalTable, LocalTableZone, PosSystem, ReceiptConfig, RequestLocal } from "..";
1
+ import { DiscountCodeUser, LocalDecorationReserve, LocalPlan, LocalReserveStatus, LocalTable, LocalTableZone, PosSystem, ReceiptConfig, RequestInvoice, RequestLocal } from "..";
2
2
  import { BusinessTypeProduct } from "./BusinessTypeProduct";
3
3
  import { Category } from "./Category";
4
4
  import { City } from "./City";
@@ -39,4 +39,5 @@ export declare class Local {
39
39
  local_tables: LocalTable[];
40
40
  local_decorations_reserve: LocalDecorationReserve[];
41
41
  local_reserve_status: LocalReserveStatus[];
42
+ request_invoices: RequestInvoice[];
42
43
  }
@@ -235,6 +235,10 @@ var Local = /** @class */ (function () {
235
235
  (0, typeorm_1.OneToMany)(function () { return __1.LocalReserveStatus; }, function (localReserveStatus) { return localReserveStatus.local; }),
236
236
  __metadata("design:type", Array)
237
237
  ], Local.prototype, "local_reserve_status", void 0);
238
+ __decorate([
239
+ (0, typeorm_1.OneToMany)(function () { return __1.RequestInvoice; }, function (requestInvoice) { return requestInvoice.local; }),
240
+ __metadata("design:type", Array)
241
+ ], Local.prototype, "request_invoices", void 0);
238
242
  Local = __decorate([
239
243
  (0, typeorm_1.Entity)({ comment: "Locales disponibles de las empresas (company)." })
240
244
  ], Local);
@@ -1,21 +1,7 @@
1
- import { LocalDecorationReserve, LocalTable, LocalTableReservePayment, Partner, User } from "..";
1
+ import { LocalReserve } from "./LocalReserve";
2
+ import { LocalTable } from "./LocalTable";
2
3
  export declare class LocalTableReserve {
3
4
  id: number;
4
- code: string;
5
5
  local_table: LocalTable;
6
- user_document: string | null;
7
- user_name: string;
8
- user_phone: string | null;
9
- user_email: string | null;
10
- user: User | null;
11
- date: Date;
12
- start_time: string;
13
- end_time: string;
14
- details: string | null;
15
- decoration: LocalDecorationReserve;
16
- created: Date;
17
- updated: Date | null;
18
- partner: Partner | null;
19
- status: number;
20
- local_table_reserve_payments: LocalTableReservePayment[];
6
+ local_reserve: LocalReserve;
21
7
  }
@@ -11,168 +11,27 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.LocalTableReserve = void 0;
13
13
  var typeorm_1 = require("typeorm");
14
- var __1 = require("..");
15
- var dateTransformer_1 = require("../transformers/dateTransformer");
14
+ var LocalReserve_1 = require("./LocalReserve");
15
+ var LocalTable_1 = require("./LocalTable");
16
16
  var LocalTableReserve = /** @class */ (function () {
17
17
  function LocalTableReserve() {
18
18
  }
19
19
  __decorate([
20
- (0, typeorm_1.PrimaryGeneratedColumn)({
21
- type: "int",
22
- comment: "Id único de cada registro.",
23
- }),
20
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
24
21
  __metadata("design:type", Number)
25
22
  ], LocalTableReserve.prototype, "id", void 0);
26
23
  __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
- ], LocalTableReserve.prototype, "code", void 0);
35
- __decorate([
36
- (0, typeorm_1.ManyToOne)(function () { return __1.LocalTable; }, function (local) { return local.local_table_reserves; }, {
37
- onDelete: "CASCADE",
38
- onUpdate: "NO ACTION",
39
- }),
24
+ (0, typeorm_1.ManyToOne)(function () { return LocalTable_1.LocalTable; }, { onDelete: "CASCADE" }),
40
25
  (0, typeorm_1.JoinColumn)({ name: "local_table" }),
41
- __metadata("design:type", __1.LocalTable)
26
+ __metadata("design:type", LocalTable_1.LocalTable)
42
27
  ], LocalTableReserve.prototype, "local_table", void 0);
43
28
  __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);
53
- __decorate([
54
- (0, typeorm_1.Column)({
55
- type: "varchar",
56
- length: 100,
57
- comment: "Nombre del usuario/cliente qué aparta.",
58
- }),
59
- __metadata("design:type", String)
60
- ], LocalTableReserve.prototype, "user_name", void 0);
61
- __decorate([
62
- (0, typeorm_1.Column)({
63
- type: "varchar",
64
- length: 14,
65
- nullable: true,
66
- default: null,
67
- comment: "Número de celular del usuario/cliente si es necesario, para recordarle.",
68
- }),
69
- __metadata("design:type", Object)
70
- ], LocalTableReserve.prototype, "user_phone", void 0);
71
- __decorate([
72
- (0, typeorm_1.Column)({
73
- type: "varchar",
74
- length: 100,
75
- nullable: true,
76
- default: null,
77
- comment: "Correo electrónico del usuario/cliente qué aparta, si es necesario, para recordarle.",
78
- }),
79
- __metadata("design:type", Object)
80
- ], LocalTableReserve.prototype, "user_email", void 0);
81
- __decorate([
82
- (0, typeorm_1.ManyToOne)(function () { return __1.User; }, function (user) { return user.local_table_reserves; }, {
83
- onDelete: "SET NULL",
84
- onUpdate: "NO ACTION",
85
- nullable: true,
86
- }),
87
- (0, typeorm_1.JoinColumn)({ name: "user" }),
88
- __metadata("design:type", Object)
89
- ], LocalTableReserve.prototype, "user", void 0);
90
- __decorate([
91
- (0, typeorm_1.Column)({
92
- type: "date",
93
- comment: "Fecha de la reserva.",
94
- }),
95
- __metadata("design:type", Date)
96
- ], LocalTableReserve.prototype, "date", void 0);
97
- __decorate([
98
- (0, typeorm_1.Column)({
99
- type: "varchar",
100
- length: 5,
101
- comment: "Hora de inicio de la reserva.",
102
- }),
103
- __metadata("design:type", String)
104
- ], LocalTableReserve.prototype, "start_time", void 0);
105
- __decorate([
106
- (0, typeorm_1.Column)({
107
- type: "varchar",
108
- length: 5,
109
- comment: "Hora finalización de la reserva.",
110
- }),
111
- __metadata("design:type", String)
112
- ], LocalTableReserve.prototype, "end_time", void 0);
113
- __decorate([
114
- (0, typeorm_1.Column)({
115
- type: "varchar",
116
- length: 400,
117
- nullable: true,
118
- default: null,
119
- comment: "Hora finalización de la reserva.",
120
- }),
121
- __metadata("design:type", Object)
122
- ], LocalTableReserve.prototype, "details", void 0);
123
- __decorate([
124
- (0, typeorm_1.ManyToOne)(function () { return __1.LocalDecorationReserve; }, function (localDecorationReserve) { return localDecorationReserve.local_table_reserves; }, {
125
- onDelete: "SET NULL",
126
- onUpdate: "NO ACTION",
127
- }),
128
- (0, typeorm_1.JoinColumn)({ name: "decoration" }),
129
- __metadata("design:type", __1.LocalDecorationReserve)
130
- ], LocalTableReserve.prototype, "decoration", 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
- ], LocalTableReserve.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
- ], 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);
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
- ], LocalTableReserve.prototype, "status", void 0);
167
- __decorate([
168
- (0, typeorm_1.OneToMany)(function () { return __1.LocalTableReservePayment; }, function (localTableReservePayment) { return localTableReservePayment.local_table_reserve; }),
169
- __metadata("design:type", Array)
170
- ], LocalTableReserve.prototype, "local_table_reserve_payments", void 0);
29
+ (0, typeorm_1.ManyToOne)(function () { return LocalReserve_1.LocalReserve; }, { onDelete: "CASCADE" }),
30
+ (0, typeorm_1.JoinColumn)({ name: "local_reserve" }),
31
+ __metadata("design:type", LocalReserve_1.LocalReserve)
32
+ ], LocalTableReserve.prototype, "local_reserve", void 0);
171
33
  LocalTableReserve = __decorate([
172
- (0, typeorm_1.Entity)({
173
- comment: "Reservas de mesas del local.",
174
- name: "local_table_reserve",
175
- })
34
+ (0, typeorm_1.Entity)({ name: "local_table_reserve" })
176
35
  ], LocalTableReserve);
177
36
  return LocalTableReserve;
178
37
  }());
@@ -1,4 +1,4 @@
1
- import { Category, LocalReserve, LocalReserveStatus, LocalTable, LocalTableReservePayment, LocalTableZone, MasterNotification, PartnerSession, Product, RequestLocal, RequestLocalHistory, RequestLocalPayment, RequestPrint, VerifyLocal } from "..";
1
+ import { Category, LocalReserve, LocalReserveStatus, LocalTable, LocalTableReservePayment, LocalTableZone, MasterNotification, PartnerSession, Product, RequestInvoice, RequestLocal, RequestLocalHistory, RequestLocalPayment, RequestPrint, VerifyLocal } from "..";
2
2
  import { City } from "./City";
3
3
  import { Company } from "./Company";
4
4
  import { DiscountCodeUser } from "./DiscountCodeUser";
@@ -46,4 +46,5 @@ export declare class Partner {
46
46
  local_table_reserve_payments: LocalTableReservePayment[];
47
47
  local_reserves: LocalReserve[];
48
48
  local_reserve_status: LocalReserveStatus[];
49
+ request_invoices: RequestInvoice[];
49
50
  }
@@ -289,6 +289,10 @@ var Partner = /** @class */ (function () {
289
289
  (0, typeorm_1.OneToMany)(function () { return __1.LocalReserveStatus; }, function (localReserveStatus) { return localReserveStatus.updated_by; }),
290
290
  __metadata("design:type", Array)
291
291
  ], Partner.prototype, "local_reserve_status", void 0);
292
+ __decorate([
293
+ (0, typeorm_1.OneToMany)(function () { return __1.RequestInvoice; }, function (RequestInvoice) { return RequestInvoice.updated_by; }),
294
+ __metadata("design:type", Array)
295
+ ], Partner.prototype, "request_invoices", void 0);
292
296
  Partner = __decorate([
293
297
  (0, typeorm_1.Entity)({
294
298
  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.",
@@ -0,0 +1,18 @@
1
+ import { Local } from "./Local";
2
+ import { Partner } from "./Partner";
3
+ import { RequestInvoiceCategory } from "./RequestInvoiceCategory";
4
+ export declare class RequestInvoice {
5
+ id: number;
6
+ code: string;
7
+ local: Local;
8
+ name: string;
9
+ description: string | null;
10
+ keyboard_shortcut: string;
11
+ request_status: string;
12
+ print_quantity: number;
13
+ created: Date;
14
+ updated: Date | null;
15
+ updated_by: Partner | null;
16
+ status: number;
17
+ request_invoice_categories: RequestInvoiceCategory[];
18
+ }
@@ -0,0 +1,132 @@
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.RequestInvoice = void 0;
13
+ var typeorm_1 = require("typeorm");
14
+ var dateTransformer_1 = require("../transformers/dateTransformer");
15
+ var Local_1 = require("./Local");
16
+ var Partner_1 = require("./Partner");
17
+ var RequestInvoiceCategory_1 = require("./RequestInvoiceCategory");
18
+ var RequestInvoice = /** @class */ (function () {
19
+ function RequestInvoice() {
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
+ ], RequestInvoice.prototype, "id", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({
30
+ length: 10,
31
+ unique: true,
32
+ type: "varchar",
33
+ comment: "Código único de cada registro.",
34
+ }),
35
+ __metadata("design:type", String)
36
+ ], RequestInvoice.prototype, "code", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.ManyToOne)(function () { return Local_1.Local; }, function (local) { return local.request_invoices; }, {
39
+ onDelete: "CASCADE",
40
+ onUpdate: "NO ACTION",
41
+ }),
42
+ (0, typeorm_1.JoinColumn)({ name: "local" }),
43
+ __metadata("design:type", Local_1.Local)
44
+ ], RequestInvoice.prototype, "local", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ length: 50, type: "varchar", comment: "Nombre del registro." }),
47
+ __metadata("design:type", String)
48
+ ], RequestInvoice.prototype, "name", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({
51
+ length: 300,
52
+ nullable: true,
53
+ default: null,
54
+ type: "varchar",
55
+ comment: "Nombre del registro.",
56
+ }),
57
+ __metadata("design:type", Object)
58
+ ], RequestInvoice.prototype, "description", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({
61
+ length: 100,
62
+ type: "varchar",
63
+ unique: true,
64
+ comment: "Atajo de teclado para cada registro, cada atajo de teclado debe ser único.",
65
+ }),
66
+ __metadata("design:type", String)
67
+ ], RequestInvoice.prototype, "keyboard_shortcut", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({
70
+ length: 20,
71
+ type: "varchar",
72
+ comment: "Estados donde se va a mostrar la factura, esto se guarda como una cadena de números (estado) separado por , '1,3,5,6'.",
73
+ }),
74
+ __metadata("design:type", String)
75
+ ], RequestInvoice.prototype, "request_status", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)({
78
+ default: 1,
79
+ type: "int",
80
+ comment: "Cantidad de veces qué se va a imprimir cada registro, por defecto es 1.",
81
+ }),
82
+ __metadata("design:type", Number)
83
+ ], RequestInvoice.prototype, "print_quantity", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({
86
+ type: "datetime",
87
+ transformer: new dateTransformer_1.DateTransformer(),
88
+ comment: "Fecha de creación del registro.",
89
+ }),
90
+ __metadata("design:type", Date)
91
+ ], RequestInvoice.prototype, "created", void 0);
92
+ __decorate([
93
+ (0, typeorm_1.Column)({
94
+ type: "datetime",
95
+ transformer: new dateTransformer_1.DateTransformer(),
96
+ nullable: true,
97
+ default: null,
98
+ comment: "Fecha de actualización del registro.",
99
+ }),
100
+ __metadata("design:type", Object)
101
+ ], RequestInvoice.prototype, "updated", void 0);
102
+ __decorate([
103
+ (0, typeorm_1.ManyToOne)(function () { return Partner_1.Partner; }, function (partner) { return partner.request_invoices; }, {
104
+ onDelete: "RESTRICT",
105
+ onUpdate: "NO ACTION",
106
+ nullable: true,
107
+ }),
108
+ (0, typeorm_1.JoinColumn)({ name: "updated_by" }),
109
+ __metadata("design:type", Object)
110
+ ], RequestInvoice.prototype, "updated_by", void 0);
111
+ __decorate([
112
+ (0, typeorm_1.Column)({
113
+ default: 1,
114
+ type: "int",
115
+ width: 1,
116
+ comment: "Estado del registro, es decir:\r\n0: Inactivo.\r\n1: Activo.",
117
+ }),
118
+ __metadata("design:type", Number)
119
+ ], RequestInvoice.prototype, "status", void 0);
120
+ __decorate([
121
+ (0, typeorm_1.OneToMany)(function () { return RequestInvoiceCategory_1.RequestInvoiceCategory; }, function (requestInvoiceCategory) { return requestInvoiceCategory.request_invoice; }),
122
+ __metadata("design:type", Array)
123
+ ], RequestInvoice.prototype, "request_invoice_categories", void 0);
124
+ RequestInvoice = __decorate([
125
+ (0, typeorm_1.Entity)({
126
+ comment: "Facturas que se agregan para imprimir en los pedidos.",
127
+ name: "request_invoice",
128
+ })
129
+ ], RequestInvoice);
130
+ return RequestInvoice;
131
+ }());
132
+ exports.RequestInvoice = RequestInvoice;
@@ -0,0 +1,7 @@
1
+ import { RequestInvoice } from "./RequestInvoice";
2
+ import { Category } from "./Category";
3
+ export declare class RequestInvoiceCategory {
4
+ id: number;
5
+ request_invoice: RequestInvoice;
6
+ category: Category;
7
+ }
@@ -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.RequestInvoiceCategory = void 0;
13
+ var typeorm_1 = require("typeorm");
14
+ var RequestInvoice_1 = require("./RequestInvoice");
15
+ var Category_1 = require("./Category");
16
+ var RequestInvoiceCategory = /** @class */ (function () {
17
+ function RequestInvoiceCategory() {
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
+ ], RequestInvoiceCategory.prototype, "id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.ManyToOne)(function () { return RequestInvoice_1.RequestInvoice; }, function (requestInvoice) { return requestInvoice.request_invoice_categories; }, {
28
+ onDelete: "CASCADE",
29
+ onUpdate: "NO ACTION",
30
+ }),
31
+ (0, typeorm_1.JoinColumn)({ name: "request_invoice" }),
32
+ __metadata("design:type", RequestInvoice_1.RequestInvoice)
33
+ ], RequestInvoiceCategory.prototype, "request_invoice", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.ManyToOne)(function () { return Category_1.Category; }, function (category) { return category.request_invoice_categories; }, {
36
+ onDelete: "CASCADE",
37
+ onUpdate: "NO ACTION",
38
+ }),
39
+ (0, typeorm_1.JoinColumn)({ name: "category" }),
40
+ __metadata("design:type", Category_1.Category)
41
+ ], RequestInvoiceCategory.prototype, "category", void 0);
42
+ RequestInvoiceCategory = __decorate([
43
+ (0, typeorm_1.Entity)({
44
+ comment: "Facturas que se agregan para imprimir en los pedidos.",
45
+ name: "request_invoice",
46
+ })
47
+ ], RequestInvoiceCategory);
48
+ return RequestInvoiceCategory;
49
+ }());
50
+ exports.RequestInvoiceCategory = RequestInvoiceCategory;
@@ -62,6 +62,9 @@ export { DecorationReserve } from "./entities/DecorationReserve";
62
62
  export { LocalTableReservePayment } from "./entities/LocalTableReservePayment";
63
63
  export { LocalReserve } from "./entities/LocalReserve";
64
64
  export { LocalReserveStatus } from "./entities/LocalReserveStatus";
65
+ export { LocalTableReserve } from "./entities/LocalTableReserve";
66
+ export { RequestInvoice } from "./entities/RequestInvoice";
67
+ export { RequestInvoiceCategory } from "./entities/RequestInvoiceCategory";
65
68
  export { LocalsCompany } from "./views/LocalsCompany";
66
69
  export { VerifyLocals } from "./views/VerifyLocals";
67
70
  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.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.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");
@@ -144,6 +144,12 @@ var LocalReserve_1 = require("./entities/LocalReserve");
144
144
  Object.defineProperty(exports, "LocalReserve", { enumerable: true, get: function () { return LocalReserve_1.LocalReserve; } });
145
145
  var LocalReserveStatus_1 = require("./entities/LocalReserveStatus");
146
146
  Object.defineProperty(exports, "LocalReserveStatus", { enumerable: true, get: function () { return LocalReserveStatus_1.LocalReserveStatus; } });
147
+ var LocalTableReserve_1 = require("./entities/LocalTableReserve");
148
+ Object.defineProperty(exports, "LocalTableReserve", { enumerable: true, get: function () { return LocalTableReserve_1.LocalTableReserve; } });
149
+ var RequestInvoice_1 = require("./entities/RequestInvoice");
150
+ Object.defineProperty(exports, "RequestInvoice", { enumerable: true, get: function () { return RequestInvoice_1.RequestInvoice; } });
151
+ var RequestInvoiceCategory_1 = require("./entities/RequestInvoiceCategory");
152
+ Object.defineProperty(exports, "RequestInvoiceCategory", { enumerable: true, get: function () { return RequestInvoiceCategory_1.RequestInvoiceCategory; } });
147
153
  var LocalsCompany_1 = require("./views/LocalsCompany");
148
154
  Object.defineProperty(exports, "LocalsCompany", { enumerable: true, get: function () { return LocalsCompany_1.LocalsCompany; } });
149
155
  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.6.0",
3
+ "version": "3.6.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",
@@ -6,7 +6,12 @@ import {
6
6
  OneToMany,
7
7
  PrimaryGeneratedColumn,
8
8
  } from "typeorm";
9
- import { CategoryDate, Partner, ScheduleCategory } from "..";
9
+ import {
10
+ CategoryDate,
11
+ Partner,
12
+ RequestInvoiceCategory,
13
+ ScheduleCategory,
14
+ } from "..";
10
15
  import { DateTransformer } from "../transformers/dateTransformer";
11
16
  import { jsonTransformer } from "../transformers/jsonTransformer";
12
17
  import { Local } from "./Local";
@@ -138,4 +143,10 @@ export class Category {
138
143
 
139
144
  @OneToMany(() => CategoryDate, (categoryDate) => categoryDate.category)
140
145
  category_dates: CategoryDate[];
146
+
147
+ @OneToMany(
148
+ () => RequestInvoiceCategory,
149
+ (requestInvoiceCategory) => requestInvoiceCategory.category
150
+ )
151
+ request_invoice_categories: RequestInvoiceCategory[];
141
152
  }
@@ -17,6 +17,7 @@ import {
17
17
  LocalTableZone,
18
18
  PosSystem,
19
19
  ReceiptConfig,
20
+ RequestInvoice,
20
21
  RequestLocal,
21
22
  } from "..";
22
23
  import { DateTransformer } from "../transformers/dateTransformer";
@@ -229,4 +230,7 @@ export class Local {
229
230
  (localReserveStatus) => localReserveStatus.local
230
231
  )
231
232
  local_reserve_status: LocalReserveStatus[];
233
+
234
+ @OneToMany(() => RequestInvoice, (requestInvoice) => requestInvoice.local)
235
+ request_invoices: RequestInvoice[];
232
236
  }
@@ -0,0 +1,23 @@
1
+ import {
2
+ Column,
3
+ Entity,
4
+ JoinColumn,
5
+ ManyToOne,
6
+ PrimaryGeneratedColumn,
7
+ } from "typeorm";
8
+ import { LocalReserve } from "./LocalReserve";
9
+ import { LocalTable } from "./LocalTable";
10
+
11
+ @Entity({ name: "local_table_reserve" })
12
+ export class LocalTableReserve {
13
+ @PrimaryGeneratedColumn()
14
+ id: number;
15
+
16
+ @ManyToOne(() => LocalTable, { onDelete: "CASCADE" })
17
+ @JoinColumn({ name: "local_table" })
18
+ local_table: LocalTable;
19
+
20
+ @ManyToOne(() => LocalReserve, { onDelete: "CASCADE" })
21
+ @JoinColumn({ name: "local_reserve" })
22
+ local_reserve: LocalReserve;
23
+ }
@@ -18,6 +18,7 @@ import {
18
18
  MasterNotification,
19
19
  PartnerSession,
20
20
  Product,
21
+ RequestInvoice,
21
22
  RequestLocal,
22
23
  RequestLocalHistory,
23
24
  RequestLocalPayment,
@@ -293,4 +294,10 @@ export class Partner {
293
294
  (localReserveStatus) => localReserveStatus.updated_by
294
295
  )
295
296
  local_reserve_status: LocalReserveStatus[];
297
+
298
+ @OneToMany(
299
+ () => RequestInvoice,
300
+ (RequestInvoice) => RequestInvoice.updated_by
301
+ )
302
+ request_invoices: RequestInvoice[];
296
303
  }
@@ -0,0 +1,114 @@
1
+ import {
2
+ Column,
3
+ Entity,
4
+ JoinColumn,
5
+ ManyToOne,
6
+ OneToMany,
7
+ PrimaryGeneratedColumn,
8
+ } from "typeorm";
9
+ import { DateTransformer } from "../transformers/dateTransformer";
10
+ import { Local } from "./Local";
11
+ import { Partner } from "./Partner";
12
+ import { RequestInvoiceCategory } from "./RequestInvoiceCategory";
13
+
14
+ @Entity({
15
+ comment: "Facturas que se agregan para imprimir en los pedidos.",
16
+ name: "request_invoice",
17
+ })
18
+ export class RequestInvoice {
19
+ @PrimaryGeneratedColumn({
20
+ type: "int",
21
+ comment: "Id único de cada registro.",
22
+ })
23
+ id: number;
24
+
25
+ @Column({
26
+ length: 10,
27
+ unique: true,
28
+ type: "varchar",
29
+ comment: "Código único de cada registro.",
30
+ })
31
+ code: string;
32
+
33
+ @ManyToOne(() => Local, (local) => local.request_invoices, {
34
+ onDelete: "CASCADE",
35
+ onUpdate: "NO ACTION",
36
+ })
37
+ @JoinColumn({ name: "local" })
38
+ local: Local;
39
+
40
+ @Column({ length: 50, type: "varchar", comment: "Nombre del registro." })
41
+ name: string;
42
+
43
+ @Column({
44
+ length: 300,
45
+ nullable: true,
46
+ default: null,
47
+ type: "varchar",
48
+ comment: "Nombre del registro.",
49
+ })
50
+ description: string | null;
51
+
52
+ @Column({
53
+ length: 100,
54
+ type: "varchar",
55
+ unique: true,
56
+ comment:
57
+ "Atajo de teclado para cada registro, cada atajo de teclado debe ser único.",
58
+ })
59
+ keyboard_shortcut: string;
60
+
61
+ @Column({
62
+ length: 20,
63
+ type: "varchar",
64
+ comment:
65
+ "Estados donde se va a mostrar la factura, esto se guarda como una cadena de números (estado) separado por , '1,3,5,6'.",
66
+ })
67
+ request_status: string;
68
+
69
+ @Column({
70
+ default: 1,
71
+ type: "int",
72
+ comment:
73
+ "Cantidad de veces qué se va a imprimir cada registro, por defecto es 1.",
74
+ })
75
+ print_quantity: number;
76
+
77
+ @Column({
78
+ type: "datetime",
79
+ transformer: new DateTransformer(),
80
+ comment: "Fecha de creación del registro.",
81
+ })
82
+ created: Date;
83
+
84
+ @Column({
85
+ type: "datetime",
86
+ transformer: new DateTransformer(),
87
+ nullable: true,
88
+ default: null,
89
+ comment: "Fecha de actualización del registro.",
90
+ })
91
+ updated: Date | null;
92
+
93
+ @ManyToOne(() => Partner, (partner) => partner.request_invoices, {
94
+ onDelete: "RESTRICT",
95
+ onUpdate: "NO ACTION",
96
+ nullable: true,
97
+ })
98
+ @JoinColumn({ name: "updated_by" })
99
+ updated_by: Partner | null;
100
+
101
+ @Column({
102
+ default: 1,
103
+ type: "int",
104
+ width: 1,
105
+ comment: "Estado del registro, es decir:\r\n0: Inactivo.\r\n1: Activo.",
106
+ })
107
+ status: number;
108
+
109
+ @OneToMany(
110
+ () => RequestInvoiceCategory,
111
+ (requestInvoiceCategory) => requestInvoiceCategory.request_invoice
112
+ )
113
+ request_invoice_categories: RequestInvoiceCategory[];
114
+ }
@@ -0,0 +1,37 @@
1
+ import { Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
2
+ import { RequestInvoice } from "./RequestInvoice";
3
+ import { Category } from "./Category";
4
+
5
+ @Entity({
6
+ comment: "Facturas que se agregan para imprimir en los pedidos.",
7
+ name: "request_invoice",
8
+ })
9
+ export class RequestInvoiceCategory {
10
+ @PrimaryGeneratedColumn({
11
+ type: "int",
12
+ comment: "Id único de cada registro.",
13
+ })
14
+ id: number;
15
+
16
+ @ManyToOne(
17
+ () => RequestInvoice,
18
+ (requestInvoice) => requestInvoice.request_invoice_categories,
19
+ {
20
+ onDelete: "CASCADE",
21
+ onUpdate: "NO ACTION",
22
+ }
23
+ )
24
+ @JoinColumn({ name: "request_invoice" })
25
+ request_invoice: RequestInvoice;
26
+
27
+ @ManyToOne(
28
+ () => Category,
29
+ (category) => category.request_invoice_categories,
30
+ {
31
+ onDelete: "CASCADE",
32
+ onUpdate: "NO ACTION",
33
+ }
34
+ )
35
+ @JoinColumn({ name: "category" })
36
+ category: Category;
37
+ }
@@ -62,6 +62,9 @@ export { DecorationReserve } from "./entities/DecorationReserve";
62
62
  export { LocalTableReservePayment } from "./entities/LocalTableReservePayment";
63
63
  export { LocalReserve } from "./entities/LocalReserve";
64
64
  export { LocalReserveStatus } from "./entities/LocalReserveStatus";
65
+ export { LocalTableReserve } from "./entities/LocalTableReserve";
66
+ export { RequestInvoice } from "./entities/RequestInvoice";
67
+ export { RequestInvoiceCategory } from "./entities/RequestInvoiceCategory";
65
68
 
66
69
  export { LocalsCompany } from "./views/LocalsCompany";
67
70
  export { VerifyLocals } from "./views/VerifyLocals";