test-entity-library-asm 3.6.8 → 3.7.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.
@@ -1,4 +1,4 @@
1
- import { DiscountCodeUser, Gallery, LocalDecorationReserve, LocalPlan, LocalReserveStatus, LocalTable, LocalTableZone, PosSystem, ReceiptConfig, RequestInvoice, RequestLocal } from "..";
1
+ import { DiscountCodeUser, Gallery, LocalDecorationReserve, LocalPaymentMethod, 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";
@@ -41,4 +41,5 @@ export declare class Local {
41
41
  local_reserve_status: LocalReserveStatus[];
42
42
  request_invoices: RequestInvoice[];
43
43
  galleries: Gallery[];
44
+ locals_payment_method: LocalPaymentMethod[];
44
45
  }
@@ -243,6 +243,10 @@ var Local = /** @class */ (function () {
243
243
  (0, typeorm_1.OneToMany)(function () { return __1.Gallery; }, function (gallery) { return gallery.local; }),
244
244
  __metadata("design:type", Array)
245
245
  ], Local.prototype, "galleries", void 0);
246
+ __decorate([
247
+ (0, typeorm_1.OneToMany)(function () { return __1.LocalPaymentMethod; }, function (localPaymentMethod) { return localPaymentMethod.local; }),
248
+ __metadata("design:type", Array)
249
+ ], Local.prototype, "locals_payment_method", void 0);
246
250
  Local = __decorate([
247
251
  (0, typeorm_1.Entity)({ comment: "Locales disponibles de las empresas (company)." })
248
252
  ], Local);
@@ -0,0 +1,8 @@
1
+ import { Local, LocalTableReservePayment, PaymentMethod, RequestLocalPayment } from "..";
2
+ export declare class LocalPaymentMethod {
3
+ id: number;
4
+ local: Local;
5
+ payment_method: PaymentMethod;
6
+ request_payment_methods: RequestLocalPayment[];
7
+ local_table_reserves_payment: LocalTableReservePayment[];
8
+ }
@@ -0,0 +1,57 @@
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.LocalPaymentMethod = void 0;
13
+ var typeorm_1 = require("typeorm");
14
+ var __1 = require("..");
15
+ var LocalPaymentMethod = /** @class */ (function () {
16
+ function LocalPaymentMethod() {
17
+ }
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)({
20
+ type: "int",
21
+ comment: "Número de identificación (ID) único de cada registro.",
22
+ }),
23
+ __metadata("design:type", Number)
24
+ ], LocalPaymentMethod.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.ManyToOne)(function () { return __1.Local; }, function (local) { return local.locals_payment_method; }, {
27
+ onDelete: "CASCADE",
28
+ onUpdate: "NO ACTION",
29
+ }),
30
+ (0, typeorm_1.JoinColumn)({ name: "local" }),
31
+ __metadata("design:type", __1.Local)
32
+ ], LocalPaymentMethod.prototype, "local", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.ManyToOne)(function () { return __1.PaymentMethod; }, function (paymentMethod) { return paymentMethod.payments_method; }, {
35
+ onDelete: "CASCADE",
36
+ onUpdate: "NO ACTION",
37
+ }),
38
+ (0, typeorm_1.JoinColumn)({ name: "payment_method" }),
39
+ __metadata("design:type", __1.PaymentMethod)
40
+ ], LocalPaymentMethod.prototype, "payment_method", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.OneToMany)(function () { return __1.RequestLocalPayment; }, function (requestLocalPayment) { return requestLocalPayment.payment_method; }),
43
+ __metadata("design:type", Array)
44
+ ], LocalPaymentMethod.prototype, "request_payment_methods", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.OneToMany)(function () { return __1.LocalTableReservePayment; }, function (localTableReservePayment) { return localTableReservePayment.payment_method; }),
47
+ __metadata("design:type", Array)
48
+ ], LocalPaymentMethod.prototype, "local_table_reserves_payment", void 0);
49
+ LocalPaymentMethod = __decorate([
50
+ (0, typeorm_1.Entity)({
51
+ comment: "Métodos de pago de los locales. \n\nHay qué tener en cuenta que cuando se crea un local, este debería agregar todos los métodos de pago y el usuario/administrador deberá, si es el caso, agregar los métodos de pagos específicos.",
52
+ name: "local_payment_method",
53
+ })
54
+ ], LocalPaymentMethod);
55
+ return LocalPaymentMethod;
56
+ }());
57
+ exports.LocalPaymentMethod = LocalPaymentMethod;
@@ -1,9 +1,9 @@
1
- import { LocalReserve, Partner, PaymentMethod, User, UserPaymentMethod } from "..";
1
+ import { LocalPaymentMethod, LocalReserve, Partner, User, UserPaymentMethod } from "..";
2
2
  export declare class LocalTableReservePayment {
3
3
  id: number;
4
4
  code: string;
5
5
  local_reserve: LocalReserve;
6
- payment_method: PaymentMethod;
6
+ payment_method: LocalPaymentMethod;
7
7
  amount_paid: number;
8
8
  remaining_amount: number;
9
9
  card_last_four_digits: string | null;
@@ -41,12 +41,12 @@ var LocalTableReservePayment = /** @class */ (function () {
41
41
  __metadata("design:type", __1.LocalReserve)
42
42
  ], LocalTableReservePayment.prototype, "local_reserve", void 0);
43
43
  __decorate([
44
- (0, typeorm_1.ManyToOne)(function () { return __1.PaymentMethod; }, function (paymentMethod) { return paymentMethod.payment_methods; }, {
45
- onDelete: "NO ACTION",
44
+ (0, typeorm_1.ManyToOne)(function () { return __1.LocalPaymentMethod; }, function (localPaymentMethod) { return localPaymentMethod.local_table_reserves_payment; }, {
45
+ onDelete: "RESTRICT",
46
46
  onUpdate: "NO ACTION",
47
47
  }),
48
48
  (0, typeorm_1.JoinColumn)({ name: "payment_method" }),
49
- __metadata("design:type", __1.PaymentMethod)
49
+ __metadata("design:type", __1.LocalPaymentMethod)
50
50
  ], LocalTableReservePayment.prototype, "payment_method", void 0);
51
51
  __decorate([
52
52
  (0, typeorm_1.Column)({
@@ -1,4 +1,4 @@
1
- import { LocalTableReservePayment, RequestLocalPayment } from "..";
1
+ import { LocalPaymentMethod, LocalTableReservePayment, RequestLocalPayment } from "..";
2
2
  import { Local } from "./Local";
3
3
  export declare class PaymentMethod {
4
4
  id: number;
@@ -10,4 +10,5 @@ export declare class PaymentMethod {
10
10
  locals: Local[];
11
11
  payment_methods: RequestLocalPayment[];
12
12
  local_table_reserve_payments: LocalTableReservePayment[];
13
+ payments_method: LocalPaymentMethod[];
13
14
  }
@@ -93,6 +93,10 @@ var PaymentMethod = /** @class */ (function () {
93
93
  (0, typeorm_1.OneToMany)(function () { return __1.LocalTableReservePayment; }, function (localTableReservePayment) { return localTableReservePayment.payment_method; }),
94
94
  __metadata("design:type", Array)
95
95
  ], PaymentMethod.prototype, "local_table_reserve_payments", void 0);
96
+ __decorate([
97
+ (0, typeorm_1.OneToMany)(function () { return __1.LocalPaymentMethod; }, function (localPaymentMethod) { return localPaymentMethod.payment_method; }),
98
+ __metadata("design:type", Array)
99
+ ], PaymentMethod.prototype, "payments_method", void 0);
96
100
  PaymentMethod = __decorate([
97
101
  (0, typeorm_1.Entity)("payment_method", {
98
102
  comment: "Métodos de pago qué la plataforma tendrá disponible, estos serán visibles cuando un cliente (local) desee agregarlos para que se vean en los pedidos.",
@@ -1,10 +1,10 @@
1
- import { Partner, PaymentMethod, RequestLocal, User, UserPaymentMethod } from "..";
1
+ import { LocalPaymentMethod, Partner, RequestLocal, User, UserPaymentMethod } from "..";
2
2
  export declare class RequestLocalPayment {
3
3
  id: number;
4
4
  code: string;
5
5
  user: User | null;
6
6
  request_local: RequestLocal;
7
- payment_method: PaymentMethod;
7
+ payment_method: LocalPaymentMethod;
8
8
  amount_paid: number;
9
9
  remaining_amount: number;
10
10
  card_last_four_digits: string | null;
@@ -50,12 +50,12 @@ var RequestLocalPayment = /** @class */ (function () {
50
50
  __metadata("design:type", __1.RequestLocal)
51
51
  ], RequestLocalPayment.prototype, "request_local", void 0);
52
52
  __decorate([
53
- (0, typeorm_1.ManyToOne)(function () { return __1.PaymentMethod; }, function (paymentMethod) { return paymentMethod.payment_methods; }, {
54
- onDelete: "NO ACTION",
53
+ (0, typeorm_1.ManyToOne)(function () { return __1.LocalPaymentMethod; }, function (LocalPaymentMethod) { return LocalPaymentMethod.request_payment_methods; }, {
54
+ onDelete: "RESTRICT",
55
55
  onUpdate: "NO ACTION",
56
56
  }),
57
57
  (0, typeorm_1.JoinColumn)({ name: "payment_method" }),
58
- __metadata("design:type", __1.PaymentMethod)
58
+ __metadata("design:type", __1.LocalPaymentMethod)
59
59
  ], RequestLocalPayment.prototype, "payment_method", void 0);
60
60
  __decorate([
61
61
  (0, typeorm_1.Column)({
@@ -5,7 +5,7 @@ export declare class RequestProduct {
5
5
  id: number;
6
6
  request: Request;
7
7
  product: Product;
8
- user: User;
8
+ user: User | null;
9
9
  quantity: number;
10
10
  comments: string;
11
11
  }
@@ -44,9 +44,10 @@ var RequestProduct = /** @class */ (function () {
44
44
  (0, typeorm_1.ManyToOne)(function () { return User_1.User; }, function (user) { return user.request_products; }, {
45
45
  onDelete: "CASCADE",
46
46
  onUpdate: "NO ACTION",
47
+ nullable: true,
47
48
  }),
48
49
  (0, typeorm_1.JoinColumn)({ name: "user" }),
49
- __metadata("design:type", User_1.User)
50
+ __metadata("design:type", Object)
50
51
  ], RequestProduct.prototype, "user", void 0);
51
52
  __decorate([
52
53
  (0, typeorm_1.Column)({ type: "int", comment: "Cantidad del producto (product)." }),
@@ -5,6 +5,6 @@ export declare class RequestProductGroupComplement {
5
5
  id: number;
6
6
  request: Request;
7
7
  product_group_complement: ProductGroupComplement;
8
- user: User;
8
+ user: User | null;
9
9
  quantity: number;
10
10
  }
@@ -46,9 +46,10 @@ var RequestProductGroupComplement = /** @class */ (function () {
46
46
  (0, typeorm_1.ManyToOne)(function () { return User_1.User; }, function (user) { return user.request_product_group_complements; }, {
47
47
  onDelete: "CASCADE",
48
48
  onUpdate: "NO ACTION",
49
+ nullable: true,
49
50
  }),
50
51
  (0, typeorm_1.JoinColumn)({ name: "user" }),
51
- __metadata("design:type", User_1.User)
52
+ __metadata("design:type", Object)
52
53
  ], RequestProductGroupComplement.prototype, "user", void 0);
53
54
  __decorate([
54
55
  (0, typeorm_1.Column)({ type: "int", comment: "Cantidad de cada complemento." }),
@@ -68,6 +68,7 @@ export { RequestInvoiceCategory } from "./entities/RequestInvoiceCategory";
68
68
  export { RequestLocalTable } from "./entities/RequestLocalTable";
69
69
  export { Gallery } from "./entities/Gallery";
70
70
  export { ProductImage } from "./entities/ProductImage";
71
+ export { LocalPaymentMethod } from "./entities/LocalPaymentMethod";
71
72
  export { LocalsCompany } from "./views/LocalsCompany";
72
73
  export { VerifyLocals } from "./views/VerifyLocals";
73
74
  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.ProductImage = exports.Gallery = 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;
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.LocalPaymentMethod = exports.ProductImage = exports.Gallery = 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");
@@ -156,6 +156,8 @@ var Gallery_1 = require("./entities/Gallery");
156
156
  Object.defineProperty(exports, "Gallery", { enumerable: true, get: function () { return Gallery_1.Gallery; } });
157
157
  var ProductImage_1 = require("./entities/ProductImage");
158
158
  Object.defineProperty(exports, "ProductImage", { enumerable: true, get: function () { return ProductImage_1.ProductImage; } });
159
+ var LocalPaymentMethod_1 = require("./entities/LocalPaymentMethod");
160
+ Object.defineProperty(exports, "LocalPaymentMethod", { enumerable: true, get: function () { return LocalPaymentMethod_1.LocalPaymentMethod; } });
159
161
  var LocalsCompany_1 = require("./views/LocalsCompany");
160
162
  Object.defineProperty(exports, "LocalsCompany", { enumerable: true, get: function () { return LocalsCompany_1.LocalsCompany; } });
161
163
  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.8",
3
+ "version": "3.7.0",
4
4
  "description": "Entidades de ejemplo para una base de datos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,6 +12,7 @@ import {
12
12
  DiscountCodeUser,
13
13
  Gallery,
14
14
  LocalDecorationReserve,
15
+ LocalPaymentMethod,
15
16
  LocalPlan,
16
17
  LocalReserveStatus,
17
18
  LocalTable,
@@ -237,4 +238,10 @@ export class Local {
237
238
 
238
239
  @OneToMany(() => Gallery, (gallery) => gallery.local)
239
240
  galleries: Gallery[];
241
+
242
+ @OneToMany(
243
+ () => LocalPaymentMethod,
244
+ (localPaymentMethod) => localPaymentMethod.local
245
+ )
246
+ locals_payment_method: LocalPaymentMethod[];
240
247
  }
@@ -0,0 +1,56 @@
1
+ import {
2
+ Entity,
3
+ JoinColumn,
4
+ ManyToOne,
5
+ OneToMany,
6
+ PrimaryGeneratedColumn,
7
+ } from "typeorm";
8
+ import {
9
+ Local,
10
+ LocalTableReservePayment,
11
+ PaymentMethod,
12
+ RequestLocalPayment,
13
+ } from "..";
14
+
15
+ @Entity({
16
+ comment:
17
+ "Métodos de pago de los locales. \n\nHay qué tener en cuenta que cuando se crea un local, este debería agregar todos los métodos de pago y el usuario/administrador deberá, si es el caso, agregar los métodos de pagos específicos.",
18
+ name: "local_payment_method",
19
+ })
20
+ export class LocalPaymentMethod {
21
+ @PrimaryGeneratedColumn({
22
+ type: "int",
23
+ comment: "Número de identificación (ID) único de cada registro.",
24
+ })
25
+ id: number;
26
+
27
+ @ManyToOne(() => Local, (local) => local.locals_payment_method, {
28
+ onDelete: "CASCADE",
29
+ onUpdate: "NO ACTION",
30
+ })
31
+ @JoinColumn({ name: "local" })
32
+ local: Local;
33
+
34
+ @ManyToOne(
35
+ () => PaymentMethod,
36
+ (paymentMethod) => paymentMethod.payments_method,
37
+ {
38
+ onDelete: "CASCADE",
39
+ onUpdate: "NO ACTION",
40
+ }
41
+ )
42
+ @JoinColumn({ name: "payment_method" })
43
+ payment_method: PaymentMethod;
44
+
45
+ @OneToMany(
46
+ () => RequestLocalPayment,
47
+ (requestLocalPayment) => requestLocalPayment.payment_method
48
+ )
49
+ request_payment_methods: RequestLocalPayment[];
50
+
51
+ @OneToMany(
52
+ () => LocalTableReservePayment,
53
+ (localTableReservePayment) => localTableReservePayment.payment_method
54
+ )
55
+ local_table_reserves_payment: LocalTableReservePayment[];
56
+ }
@@ -6,11 +6,11 @@ import {
6
6
  PrimaryGeneratedColumn,
7
7
  } from "typeorm";
8
8
  import {
9
+ LocalPaymentMethod,
9
10
  LocalReserve,
10
11
  Partner,
11
- PaymentMethod,
12
12
  User,
13
- UserPaymentMethod,
13
+ UserPaymentMethod
14
14
  } from "..";
15
15
  import { DateTransformer } from "../transformers/dateTransformer";
16
16
 
@@ -45,15 +45,15 @@ export class LocalTableReservePayment {
45
45
  local_reserve: LocalReserve;
46
46
 
47
47
  @ManyToOne(
48
- () => PaymentMethod,
49
- (paymentMethod) => paymentMethod.payment_methods,
48
+ () => LocalPaymentMethod,
49
+ (localPaymentMethod) => localPaymentMethod.local_table_reserves_payment,
50
50
  {
51
- onDelete: "NO ACTION",
51
+ onDelete: "RESTRICT",
52
52
  onUpdate: "NO ACTION",
53
53
  }
54
54
  )
55
55
  @JoinColumn({ name: "payment_method" })
56
- payment_method: PaymentMethod;
56
+ payment_method: LocalPaymentMethod;
57
57
 
58
58
  @Column({
59
59
  type: "decimal",
@@ -6,7 +6,11 @@ import {
6
6
  OneToMany,
7
7
  PrimaryColumn,
8
8
  } from "typeorm";
9
- import { LocalTableReservePayment, RequestLocalPayment } from "..";
9
+ import {
10
+ LocalPaymentMethod,
11
+ LocalTableReservePayment,
12
+ RequestLocalPayment,
13
+ } from "..";
10
14
  import { DateTransformer } from "../transformers/dateTransformer";
11
15
  import { Local } from "./Local";
12
16
  import { jsonTransformer } from "../transformers/jsonTransformer";
@@ -91,4 +95,10 @@ export class PaymentMethod {
91
95
  (localTableReservePayment) => localTableReservePayment.payment_method
92
96
  )
93
97
  local_table_reserve_payments: LocalTableReservePayment[];
98
+
99
+ @OneToMany(
100
+ () => LocalPaymentMethod,
101
+ (localPaymentMethod) => localPaymentMethod.payment_method
102
+ )
103
+ payments_method: LocalPaymentMethod[];
94
104
  }
@@ -6,11 +6,11 @@ import {
6
6
  PrimaryGeneratedColumn,
7
7
  } from "typeorm";
8
8
  import {
9
+ LocalPaymentMethod,
9
10
  Partner,
10
- PaymentMethod,
11
11
  RequestLocal,
12
12
  User,
13
- UserPaymentMethod,
13
+ UserPaymentMethod
14
14
  } from "..";
15
15
  import { DateTransformer } from "../transformers/dateTransformer";
16
16
 
@@ -50,15 +50,15 @@ export class RequestLocalPayment {
50
50
  request_local: RequestLocal;
51
51
 
52
52
  @ManyToOne(
53
- () => PaymentMethod,
54
- (paymentMethod) => paymentMethod.payment_methods,
53
+ () => LocalPaymentMethod,
54
+ (LocalPaymentMethod) => LocalPaymentMethod.request_payment_methods,
55
55
  {
56
- onDelete: "NO ACTION",
56
+ onDelete: "RESTRICT",
57
57
  onUpdate: "NO ACTION",
58
58
  }
59
59
  )
60
60
  @JoinColumn({ name: "payment_method" })
61
- payment_method: PaymentMethod;
61
+ payment_method: LocalPaymentMethod;
62
62
 
63
63
  @Column({
64
64
  type: "decimal",
@@ -36,9 +36,10 @@ export class RequestProduct {
36
36
  @ManyToOne(() => User, (user) => user.request_products, {
37
37
  onDelete: "CASCADE",
38
38
  onUpdate: "NO ACTION",
39
+ nullable: true,
39
40
  })
40
41
  @JoinColumn({ name: "user" })
41
- user: User;
42
+ user: User | null;
42
43
 
43
44
  @Column({ type: "int", comment: "Cantidad del producto (product)." })
44
45
  quantity: number;
@@ -46,9 +46,10 @@ export class RequestProductGroupComplement {
46
46
  @ManyToOne(() => User, (user) => user.request_product_group_complements, {
47
47
  onDelete: "CASCADE",
48
48
  onUpdate: "NO ACTION",
49
+ nullable: true,
49
50
  })
50
51
  @JoinColumn({ name: "user" })
51
- user: User;
52
+ user: User | null;
52
53
 
53
54
  @Column({ type: "int", comment: "Cantidad de cada complemento." })
54
55
  quantity: number;
@@ -68,6 +68,7 @@ export { RequestInvoiceCategory } from "./entities/RequestInvoiceCategory";
68
68
  export { RequestLocalTable } from "./entities/RequestLocalTable";
69
69
  export { Gallery } from "./entities/Gallery";
70
70
  export { ProductImage } from "./entities/ProductImage";
71
+ export { LocalPaymentMethod } from "./entities/LocalPaymentMethod";
71
72
 
72
73
  export { LocalsCompany } from "./views/LocalsCompany";
73
74
  export { VerifyLocals } from "./views/VerifyLocals";