test-entity-library-asm 3.2.9 → 3.2.11
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/BusinessType.d.ts +2 -2
- package/dist/entities/BusinessType.js +10 -8
- package/dist/entities/BusinessTypeProduct.d.ts +2 -2
- package/dist/entities/BusinessTypeProduct.js +2 -2
- package/dist/entities/Category.d.ts +6 -6
- package/dist/entities/Category.js +12 -6
- package/dist/entities/Company.d.ts +6 -6
- package/dist/entities/Company.js +3 -3
- package/dist/entities/Country.d.ts +1 -1
- package/dist/entities/DiscountCodeCompany.d.ts +8 -8
- package/dist/entities/DiscountCodeCompany.js +26 -24
- package/dist/entities/DiscountCodeUser.d.ts +9 -9
- package/dist/entities/DiscountCodeUser.js +35 -33
- package/dist/entities/Local.d.ts +2 -2
- package/dist/entities/Local.js +1 -1
- package/dist/entities/LocalPlan.d.ts +2 -2
- package/dist/entities/LocalPlan.js +18 -18
- package/dist/entities/LocalQualification.d.ts +3 -3
- package/dist/entities/LocalQualification.js +17 -12
- package/dist/entities/Master.d.ts +2 -2
- package/dist/entities/Master.js +1 -1
- package/dist/entities/MasterNotification.d.ts +4 -4
- package/dist/entities/MasterNotification.js +3 -3
- package/dist/entities/MasterRole.d.ts +1 -1
- package/dist/entities/MasterRole.js +1 -1
- package/dist/entities/Partner.d.ts +6 -5
- package/dist/entities/Partner.js +7 -3
- package/dist/entities/PartnerNotification.d.ts +4 -4
- package/dist/entities/PartnerNotification.js +3 -3
- package/dist/entities/PartnerPermission.d.ts +4 -4
- package/dist/entities/PartnerPermission.js +18 -18
- package/dist/entities/PartnerPermissionSection.d.ts +3 -3
- package/dist/entities/PartnerPermissionSection.js +13 -13
- package/dist/entities/PartnerPlatform.d.ts +3 -3
- package/dist/entities/PartnerPlatform.js +10 -10
- package/dist/entities/PartnerRole.d.ts +5 -5
- package/dist/entities/PartnerRole.js +22 -22
- package/dist/entities/PartnerSession.d.ts +1 -1
- package/dist/entities/PartnerSession.js +1 -4
- package/dist/entities/PaymentMethod.d.ts +4 -6
- package/dist/entities/PaymentMethod.js +11 -22
- package/dist/entities/Plan.d.ts +3 -3
- package/dist/entities/Plan.js +19 -14
- package/dist/entities/PosSystem.d.ts +2 -2
- package/dist/entities/PosSystem.js +12 -12
- package/dist/entities/Product.d.ts +5 -5
- package/dist/entities/Product.js +14 -5
- package/dist/entities/ProductTopping.d.ts +3 -3
- package/dist/entities/ProductTopping.js +9 -9
- package/dist/entities/Request.d.ts +2 -5
- package/dist/entities/Request.js +2 -18
- package/dist/entities/RequestLocal.d.ts +2 -1
- package/dist/entities/RequestLocal.js +4 -0
- package/dist/entities/RequestLocalHistory.d.ts +2 -2
- package/dist/entities/RequestLocalHistory.js +2 -2
- package/dist/entities/RequestLocalPayment.d.ts +19 -0
- package/dist/entities/RequestLocalPayment.js +159 -0
- package/dist/entities/ServicePlan.d.ts +4 -4
- package/dist/entities/ServicePlan.js +21 -23
- package/dist/entities/Square.d.ts +6 -6
- package/dist/entities/Square.js +18 -18
- package/dist/entities/ToppingImage.d.ts +1 -1
- package/dist/entities/ToppingImage.js +1 -1
- package/dist/entities/User.d.ts +7 -6
- package/dist/entities/User.js +22 -20
- package/dist/entities/UserAddress.d.ts +2 -2
- package/dist/entities/UserAddress.js +2 -3
- package/dist/entities/UserPaymentMethod.d.ts +17 -0
- package/dist/entities/UserPaymentMethod.js +118 -0
- package/dist/entities/VerifyLocal.d.ts +4 -4
- package/dist/entities/VerifyLocal.js +32 -32
- package/dist/entities/productGroupComplement.d.ts +5 -5
- package/dist/entities/productGroupComplement.js +3 -3
- 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/BusinessType.ts +16 -15
- package/src/entities/BusinessTypeProduct.ts +2 -2
- package/src/entities/Category.ts +13 -7
- package/src/entities/Company.ts +8 -8
- package/src/entities/Country.ts +1 -1
- package/src/entities/DiscountCodeCompany.ts +43 -42
- package/src/entities/DiscountCodeUser.ts +52 -50
- package/src/entities/Local.ts +2 -15
- package/src/entities/LocalPlan.ts +31 -31
- package/src/entities/LocalQualification.ts +24 -25
- package/src/entities/Master.ts +2 -2
- package/src/entities/MasterNotification.ts +4 -4
- package/src/entities/MasterRole.ts +1 -1
- package/src/entities/Partner.ts +11 -4
- package/src/entities/PartnerNotification.ts +4 -4
- package/src/entities/PartnerPermission.ts +27 -27
- package/src/entities/PartnerPermissionSection.ts +21 -21
- package/src/entities/PartnerPlatform.ts +17 -17
- package/src/entities/PartnerRole.ts +30 -30
- package/src/entities/PartnerSession.ts +4 -11
- package/src/entities/PaymentMethod.ts +14 -21
- package/src/entities/Plan.ts +31 -26
- package/src/entities/PosSystem.ts +21 -21
- package/src/entities/Product.ts +16 -7
- package/src/entities/ProductTopping.ts +17 -17
- package/src/entities/Request.ts +3 -32
- package/src/entities/RequestLocal.ts +7 -1
- package/src/entities/RequestLocalHistory.ts +2 -2
- package/src/entities/RequestLocalPayment.ts +145 -0
- package/src/entities/ServicePlan.ts +40 -41
- package/src/entities/Square.ts +31 -31
- package/src/entities/ToppingImage.ts +1 -1
- package/src/entities/User.ts +26 -22
- package/src/entities/UserAddress.ts +2 -3
- package/src/entities/UserPaymentMethod.ts +99 -0
- package/src/entities/VerifyLocal.ts +51 -51
- package/src/entities/productGroupComplement.ts +5 -5
- package/src/entities.views.routes.ts +2 -0
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import { RequestLocal, UserAddress } from "..";
|
|
2
|
-
import { PaymentMethod } from "./PaymentMethod";
|
|
3
2
|
import { RequestProduct } from "./RequestProduct";
|
|
4
3
|
import { RequestProductGroupComplement } from "./RequestProductGroupComplement";
|
|
5
4
|
import { User } from "./User";
|
|
6
5
|
export declare class Request {
|
|
7
6
|
id: number;
|
|
8
7
|
code: string;
|
|
9
|
-
user: User;
|
|
8
|
+
user: User | null;
|
|
10
9
|
address: UserAddress | null;
|
|
11
10
|
order_mode: number;
|
|
12
11
|
order_type: number;
|
|
13
|
-
payment_method: PaymentMethod;
|
|
14
12
|
order_cost: string;
|
|
15
|
-
paid_status: number;
|
|
16
13
|
status: number;
|
|
17
14
|
details: string;
|
|
18
15
|
comments: string;
|
|
19
16
|
created: Date;
|
|
20
|
-
updated: Date;
|
|
17
|
+
updated: Date | null;
|
|
21
18
|
requests_local: RequestLocal[];
|
|
22
19
|
requests_group: User[];
|
|
23
20
|
request_products: RequestProduct[];
|
package/dist/entities/Request.js
CHANGED
|
@@ -13,7 +13,6 @@ exports.Request = void 0;
|
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
14
|
var __1 = require("..");
|
|
15
15
|
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
-
var PaymentMethod_1 = require("./PaymentMethod");
|
|
17
16
|
var RequestProduct_1 = require("./RequestProduct");
|
|
18
17
|
var RequestProductGroupComplement_1 = require("./RequestProductGroupComplement");
|
|
19
18
|
var User_1 = require("./User");
|
|
@@ -41,7 +40,7 @@ var Request = /** @class */ (function () {
|
|
|
41
40
|
onUpdate: "NO ACTION",
|
|
42
41
|
}),
|
|
43
42
|
(0, typeorm_1.JoinColumn)({ name: "user" }),
|
|
44
|
-
__metadata("design:type",
|
|
43
|
+
__metadata("design:type", Object)
|
|
45
44
|
], Request.prototype, "user", void 0);
|
|
46
45
|
__decorate([
|
|
47
46
|
(0, typeorm_1.ManyToOne)(function () { return __1.UserAddress; }, function (userAddress) { return userAddress.requests; }, {
|
|
@@ -66,14 +65,6 @@ var Request = /** @class */ (function () {
|
|
|
66
65
|
}),
|
|
67
66
|
__metadata("design:type", Number)
|
|
68
67
|
], Request.prototype, "order_type", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, typeorm_1.ManyToOne)(function () { return PaymentMethod_1.PaymentMethod; }, function (paymentMethod) { return paymentMethod.requests; }, {
|
|
71
|
-
onDelete: "RESTRICT",
|
|
72
|
-
onUpdate: "NO ACTION",
|
|
73
|
-
}),
|
|
74
|
-
(0, typeorm_1.JoinColumn)({ name: "payment_method" }),
|
|
75
|
-
__metadata("design:type", PaymentMethod_1.PaymentMethod)
|
|
76
|
-
], Request.prototype, "payment_method", void 0);
|
|
77
68
|
__decorate([
|
|
78
69
|
(0, typeorm_1.Column)({
|
|
79
70
|
length: 30,
|
|
@@ -81,13 +72,6 @@ var Request = /** @class */ (function () {
|
|
|
81
72
|
}),
|
|
82
73
|
__metadata("design:type", String)
|
|
83
74
|
], Request.prototype, "order_cost", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
(0, typeorm_1.Column)({
|
|
86
|
-
default: 0,
|
|
87
|
-
comment: "Me indica si el pedido ya está pago o falta por pagar:\r\n0. No pagado.\r\n1. Pagado.",
|
|
88
|
-
}),
|
|
89
|
-
__metadata("design:type", Number)
|
|
90
|
-
], Request.prototype, "paid_status", void 0);
|
|
91
75
|
__decorate([
|
|
92
76
|
(0, typeorm_1.Column)({
|
|
93
77
|
default: 0,
|
|
@@ -125,7 +109,7 @@ var Request = /** @class */ (function () {
|
|
|
125
109
|
default: null,
|
|
126
110
|
comment: "Fecha en la que el cliente final hace la última actualización del pedido.",
|
|
127
111
|
}),
|
|
128
|
-
__metadata("design:type",
|
|
112
|
+
__metadata("design:type", Object)
|
|
129
113
|
], Request.prototype, "updated", void 0);
|
|
130
114
|
__decorate([
|
|
131
115
|
(0, typeorm_1.OneToMany)(function () { return __1.RequestLocal; }, function (requestLocal) { return requestLocal.request; }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Local, Request, RequestLocalHistory } from "..";
|
|
1
|
+
import { Local, Request, RequestLocalHistory, RequestLocalPayment } from "..";
|
|
2
2
|
export declare class RequestLocal {
|
|
3
3
|
id: number;
|
|
4
4
|
request: Request;
|
|
@@ -9,4 +9,5 @@ export declare class RequestLocal {
|
|
|
9
9
|
updated: Date | null;
|
|
10
10
|
is_notified: number;
|
|
11
11
|
requests_local_history: RequestLocalHistory[];
|
|
12
|
+
payments_made: RequestLocalPayment[];
|
|
12
13
|
}
|
|
@@ -77,6 +77,10 @@ var RequestLocal = /** @class */ (function () {
|
|
|
77
77
|
(0, typeorm_1.OneToMany)(function () { return __1.RequestLocalHistory; }, function (requestLocalHistory) { return requestLocalHistory.request_local; }),
|
|
78
78
|
__metadata("design:type", Array)
|
|
79
79
|
], RequestLocal.prototype, "requests_local_history", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.OneToMany)(function () { return __1.RequestLocalPayment; }, function (requestLocalPayment) { return requestLocalPayment.request_local; }),
|
|
82
|
+
__metadata("design:type", Array)
|
|
83
|
+
], RequestLocal.prototype, "payments_made", void 0);
|
|
80
84
|
RequestLocal = __decorate([
|
|
81
85
|
(0, typeorm_1.Entity)({
|
|
82
86
|
comment: "Tabla para guardar las relaciones de un pedido y los locales",
|
|
@@ -40,7 +40,7 @@ var RequestLocalHistory = /** @class */ (function () {
|
|
|
40
40
|
nullable: true,
|
|
41
41
|
comment: "Comentarios del cambio de estado del registro.",
|
|
42
42
|
}),
|
|
43
|
-
__metadata("design:type",
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
44
|
], RequestLocalHistory.prototype, "comment", void 0);
|
|
45
45
|
__decorate([
|
|
46
46
|
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.updated_by_history; }, {
|
|
@@ -49,7 +49,7 @@ var RequestLocalHistory = /** @class */ (function () {
|
|
|
49
49
|
nullable: true,
|
|
50
50
|
}),
|
|
51
51
|
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
52
|
-
__metadata("design:type",
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
53
|
], RequestLocalHistory.prototype, "updated_by", void 0);
|
|
54
54
|
__decorate([
|
|
55
55
|
(0, typeorm_1.Column)({
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Partner, PaymentMethod, RequestLocal, User, UserPaymentMethod } from "..";
|
|
2
|
+
export declare class RequestLocalPayment {
|
|
3
|
+
id: number;
|
|
4
|
+
code: string;
|
|
5
|
+
user: User | null;
|
|
6
|
+
request_local: RequestLocal;
|
|
7
|
+
payment_method: PaymentMethod;
|
|
8
|
+
amount_paid: number;
|
|
9
|
+
remaining_amount: number;
|
|
10
|
+
card_last_four_digits: string | null;
|
|
11
|
+
card_type: string | null;
|
|
12
|
+
card: UserPaymentMethod | null;
|
|
13
|
+
comments: string | null;
|
|
14
|
+
status: number;
|
|
15
|
+
created: Date;
|
|
16
|
+
updated: Date | null;
|
|
17
|
+
partner: Partner | null;
|
|
18
|
+
user_ip: string | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
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.RequestLocalPayment = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var __1 = require("..");
|
|
15
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
var RequestLocalPayment = /** @class */ (function () {
|
|
17
|
+
function RequestLocalPayment() {
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
+
comment: "ID único de cada registro.",
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], RequestLocalPayment.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({
|
|
27
|
+
length: 40,
|
|
28
|
+
unique: true,
|
|
29
|
+
comment: "Código único de cada pago que se realiza.",
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], RequestLocalPayment.prototype, "code", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.User; }, function (user) { return user.payments_made; }, {
|
|
35
|
+
onDelete: "NO ACTION",
|
|
36
|
+
onUpdate: "NO ACTION",
|
|
37
|
+
nullable: true,
|
|
38
|
+
}),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: "user" }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], RequestLocalPayment.prototype, "user", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.RequestLocal; }, function (requestLocal) { return requestLocal.payments_made; }, {
|
|
44
|
+
onDelete: "NO ACTION",
|
|
45
|
+
onUpdate: "NO ACTION",
|
|
46
|
+
}),
|
|
47
|
+
(0, typeorm_1.JoinColumn)({ name: "request_local" }),
|
|
48
|
+
__metadata("design:type", __1.RequestLocal)
|
|
49
|
+
], RequestLocalPayment.prototype, "request_local", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.PaymentMethod; }, function (paymentMethod) { return paymentMethod.payment_methods; }, {
|
|
52
|
+
onDelete: "NO ACTION",
|
|
53
|
+
onUpdate: "NO ACTION",
|
|
54
|
+
}),
|
|
55
|
+
(0, typeorm_1.JoinColumn)({ name: "payment_method" }),
|
|
56
|
+
__metadata("design:type", __1.PaymentMethod)
|
|
57
|
+
], RequestLocalPayment.prototype, "payment_method", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({
|
|
60
|
+
type: "decimal",
|
|
61
|
+
precision: 10,
|
|
62
|
+
scale: 2,
|
|
63
|
+
comment: "Monto que se paga del pedido.",
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:type", Number)
|
|
66
|
+
], RequestLocalPayment.prototype, "amount_paid", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({
|
|
69
|
+
type: "decimal",
|
|
70
|
+
precision: 10,
|
|
71
|
+
scale: 2,
|
|
72
|
+
comment: "Monto restante para pagar.",
|
|
73
|
+
}),
|
|
74
|
+
__metadata("design:type", Number)
|
|
75
|
+
], RequestLocalPayment.prototype, "remaining_amount", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({
|
|
78
|
+
length: 4,
|
|
79
|
+
nullable: true,
|
|
80
|
+
comment: "Si se paga con tarjeta, entonces se almacenan los últimos 4 dígitos de la tarjeta de crédito/débito con el que se paga.",
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], RequestLocalPayment.prototype, "card_last_four_digits", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({
|
|
86
|
+
length: 50,
|
|
87
|
+
nullable: true,
|
|
88
|
+
comment: "Si se paga con tarjeta, entonces se guarda el tipo de tarjeta con la que se paga.",
|
|
89
|
+
}),
|
|
90
|
+
__metadata("design:type", Object)
|
|
91
|
+
], RequestLocalPayment.prototype, "card_type", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.UserPaymentMethod; }, function (card) { return card.cards; }, {
|
|
94
|
+
onDelete: "NO ACTION",
|
|
95
|
+
onUpdate: "NO ACTION",
|
|
96
|
+
nullable: true,
|
|
97
|
+
}),
|
|
98
|
+
(0, typeorm_1.JoinColumn)({ name: "card" }),
|
|
99
|
+
__metadata("design:type", Object)
|
|
100
|
+
], RequestLocalPayment.prototype, "card", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.Column)({
|
|
103
|
+
length: 255,
|
|
104
|
+
nullable: true,
|
|
105
|
+
comment: "Comentarios del pago, si aplica.",
|
|
106
|
+
}),
|
|
107
|
+
__metadata("design:type", Object)
|
|
108
|
+
], RequestLocalPayment.prototype, "comments", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.Column)({
|
|
111
|
+
length: 1,
|
|
112
|
+
comment: "Estado del pago:\r\n1. Aprobado.\r\n2. Rechazado.\r\n3. Pendiente.",
|
|
113
|
+
default: 3,
|
|
114
|
+
}),
|
|
115
|
+
__metadata("design:type", Number)
|
|
116
|
+
], RequestLocalPayment.prototype, "status", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, typeorm_1.Column)({
|
|
119
|
+
type: "datetime",
|
|
120
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
121
|
+
comment: "Fecha de creación del registro.",
|
|
122
|
+
}),
|
|
123
|
+
__metadata("design:type", Date)
|
|
124
|
+
], RequestLocalPayment.prototype, "created", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, typeorm_1.Column)({
|
|
127
|
+
type: "datetime",
|
|
128
|
+
nullable: true,
|
|
129
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
130
|
+
comment: "Fecha de actualización del registro.",
|
|
131
|
+
}),
|
|
132
|
+
__metadata("design:type", Object)
|
|
133
|
+
], RequestLocalPayment.prototype, "updated", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.requests_local_payment; }, {
|
|
136
|
+
onDelete: "CASCADE",
|
|
137
|
+
onUpdate: "NO ACTION",
|
|
138
|
+
nullable: true,
|
|
139
|
+
}),
|
|
140
|
+
(0, typeorm_1.JoinColumn)({ name: "partner" }),
|
|
141
|
+
__metadata("design:type", Object)
|
|
142
|
+
], RequestLocalPayment.prototype, "partner", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, typeorm_1.Column)({
|
|
145
|
+
length: 45,
|
|
146
|
+
nullable: true,
|
|
147
|
+
comment: "Dirección ip donde se hace la solicitud del pago.",
|
|
148
|
+
}),
|
|
149
|
+
__metadata("design:type", Object)
|
|
150
|
+
], RequestLocalPayment.prototype, "user_ip", void 0);
|
|
151
|
+
RequestLocalPayment = __decorate([
|
|
152
|
+
(0, typeorm_1.Entity)({
|
|
153
|
+
comment: "Tabla creada para almacenar y llevar el control del los pagos que se han realizado de los pedidos.",
|
|
154
|
+
name: "request_local_payment",
|
|
155
|
+
})
|
|
156
|
+
], RequestLocalPayment);
|
|
157
|
+
return RequestLocalPayment;
|
|
158
|
+
}());
|
|
159
|
+
exports.RequestLocalPayment = RequestLocalPayment;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Master } from
|
|
2
|
-
import { ServiceDiscountsPlan } from
|
|
1
|
+
import { Master } from "./Master";
|
|
2
|
+
import { ServiceDiscountsPlan } from "./ServiceDiscountsPlan";
|
|
3
3
|
export declare class ServicePlan {
|
|
4
4
|
id_service_plan: number;
|
|
5
5
|
name: string;
|
|
@@ -11,9 +11,9 @@ export declare class ServicePlan {
|
|
|
11
11
|
type: number;
|
|
12
12
|
time_periods: any | null;
|
|
13
13
|
assigned_discount: number | null;
|
|
14
|
-
information_general: any;
|
|
14
|
+
information_general: any | null;
|
|
15
15
|
created: Date;
|
|
16
16
|
updated: Date;
|
|
17
|
-
updated_by: Master;
|
|
17
|
+
updated_by: Master | null;
|
|
18
18
|
service_discounts_plan: ServiceDiscountsPlan[];
|
|
19
19
|
}
|
|
@@ -19,83 +19,81 @@ var ServicePlan = /** @class */ (function () {
|
|
|
19
19
|
function ServicePlan() {
|
|
20
20
|
}
|
|
21
21
|
__decorate([
|
|
22
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({ name:
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ name: "id_service_plan" }),
|
|
23
23
|
__metadata("design:type", Number)
|
|
24
24
|
], ServicePlan.prototype, "id_service_plan", void 0);
|
|
25
25
|
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({ type:
|
|
26
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100 }),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], ServicePlan.prototype, "name", void 0);
|
|
29
29
|
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ type:
|
|
30
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100 }),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
32
|
], ServicePlan.prototype, "code", void 0);
|
|
33
33
|
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ type:
|
|
34
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 450, nullable: true }),
|
|
35
35
|
__metadata("design:type", Object)
|
|
36
36
|
], ServicePlan.prototype, "description", void 0);
|
|
37
37
|
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ type:
|
|
38
|
+
(0, typeorm_1.Column)({ type: "float", nullable: true }),
|
|
39
39
|
__metadata("design:type", Object)
|
|
40
40
|
], ServicePlan.prototype, "price", void 0);
|
|
41
41
|
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)({ type:
|
|
42
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 10, nullable: true }),
|
|
43
43
|
__metadata("design:type", Object)
|
|
44
44
|
], ServicePlan.prototype, "currency", void 0);
|
|
45
45
|
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({ type:
|
|
46
|
+
(0, typeorm_1.Column)({ type: "int", default: 1 }),
|
|
47
47
|
__metadata("design:type", Number)
|
|
48
48
|
], ServicePlan.prototype, "status", void 0);
|
|
49
49
|
__decorate([
|
|
50
|
-
(0, typeorm_1.Column)({ type:
|
|
50
|
+
(0, typeorm_1.Column)({ type: "int" }),
|
|
51
51
|
__metadata("design:type", Number)
|
|
52
52
|
], ServicePlan.prototype, "type", void 0);
|
|
53
53
|
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)({ type:
|
|
54
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
55
55
|
__metadata("design:type", Object)
|
|
56
56
|
], ServicePlan.prototype, "time_periods", void 0);
|
|
57
57
|
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({ type:
|
|
58
|
+
(0, typeorm_1.Column)({ type: "float", nullable: true }),
|
|
59
59
|
__metadata("design:type", Object)
|
|
60
60
|
], ServicePlan.prototype, "assigned_discount", void 0);
|
|
61
61
|
__decorate([
|
|
62
|
-
(0, typeorm_1.Column)({ type:
|
|
62
|
+
(0, typeorm_1.Column)({ type: "longtext", nullable: true, transformer: jsonTransformer_1.jsonTransformer }),
|
|
63
63
|
__metadata("design:type", Object)
|
|
64
64
|
], ServicePlan.prototype, "information_general", void 0);
|
|
65
65
|
__decorate([
|
|
66
66
|
(0, typeorm_1.Column)({
|
|
67
|
-
type:
|
|
67
|
+
type: "datetime",
|
|
68
68
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
69
|
-
comment:
|
|
69
|
+
comment: "Fecha de creación del registro.",
|
|
70
70
|
}),
|
|
71
71
|
__metadata("design:type", Date)
|
|
72
72
|
], ServicePlan.prototype, "created", void 0);
|
|
73
73
|
__decorate([
|
|
74
74
|
(0, typeorm_1.Column)({
|
|
75
|
-
type:
|
|
75
|
+
type: "datetime",
|
|
76
76
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
77
|
-
comment:
|
|
77
|
+
comment: "Fecha de actualización del registro.",
|
|
78
78
|
}),
|
|
79
79
|
__metadata("design:type", Date)
|
|
80
80
|
], ServicePlan.prototype, "updated", void 0);
|
|
81
81
|
__decorate([
|
|
82
82
|
(0, typeorm_1.ManyToOne)(function () { return Master_1.Master; }, function (master) { return master.id; }, {
|
|
83
|
-
onDelete:
|
|
84
|
-
onUpdate:
|
|
83
|
+
onDelete: "SET NULL",
|
|
84
|
+
onUpdate: "CASCADE",
|
|
85
85
|
nullable: true,
|
|
86
86
|
}),
|
|
87
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
88
|
-
__metadata("design:type",
|
|
89
|
-
// Relación con ServiceDiscountsPlan
|
|
90
|
-
)
|
|
87
|
+
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
88
|
+
__metadata("design:type", Object)
|
|
91
89
|
], ServicePlan.prototype, "updated_by", void 0);
|
|
92
90
|
__decorate([
|
|
93
91
|
(0, typeorm_1.OneToMany)(function () { return ServiceDiscountsPlan_1.ServiceDiscountsPlan; }, function (serviceDiscountsPlan) { return serviceDiscountsPlan.servicePlan; }),
|
|
94
92
|
__metadata("design:type", Array)
|
|
95
93
|
], ServicePlan.prototype, "service_discounts_plan", void 0);
|
|
96
94
|
ServicePlan = __decorate([
|
|
97
|
-
(0, typeorm_1.Entity)(
|
|
98
|
-
(0, typeorm_1.Unique)([
|
|
95
|
+
(0, typeorm_1.Entity)("service_plan"),
|
|
96
|
+
(0, typeorm_1.Unique)(["code"])
|
|
99
97
|
], ServicePlan);
|
|
100
98
|
return ServicePlan;
|
|
101
99
|
}());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Local } from
|
|
2
|
-
import { User } from
|
|
3
|
-
import { City } from
|
|
1
|
+
import { Local } from "./Local";
|
|
2
|
+
import { User } from "./User";
|
|
3
|
+
import { City } from "./City";
|
|
4
4
|
export declare class Square {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
@@ -8,10 +8,10 @@ export declare class Square {
|
|
|
8
8
|
address: string;
|
|
9
9
|
latitude: number;
|
|
10
10
|
longitude: number;
|
|
11
|
-
details: string;
|
|
11
|
+
details: string | null;
|
|
12
12
|
maximum_number_locals: number;
|
|
13
|
-
email: string;
|
|
14
|
-
phone: string;
|
|
13
|
+
email: string | null;
|
|
14
|
+
phone: string | null;
|
|
15
15
|
status: number;
|
|
16
16
|
locals: Local[];
|
|
17
17
|
users_favorite_square: User[];
|
package/dist/entities/Square.js
CHANGED
|
@@ -19,45 +19,45 @@ var Square = /** @class */ (function () {
|
|
|
19
19
|
}
|
|
20
20
|
__decorate([
|
|
21
21
|
(0, typeorm_1.PrimaryColumn)({
|
|
22
|
-
comment:
|
|
22
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
23
23
|
}),
|
|
24
24
|
__metadata("design:type", Number)
|
|
25
25
|
], Square.prototype, "id", void 0);
|
|
26
26
|
__decorate([
|
|
27
|
-
(0, typeorm_1.Column)({ length: 50, comment:
|
|
27
|
+
(0, typeorm_1.Column)({ length: 50, comment: "Nombre del centro comercial/plazoleta." }),
|
|
28
28
|
__metadata("design:type", String)
|
|
29
29
|
], Square.prototype, "name", void 0);
|
|
30
30
|
__decorate([
|
|
31
31
|
(0, typeorm_1.ManyToOne)(function () { return City_1.City; }, function (city) { return city.squares; }, {
|
|
32
|
-
onDelete:
|
|
33
|
-
onUpdate:
|
|
32
|
+
onDelete: "RESTRICT",
|
|
33
|
+
onUpdate: "NO ACTION",
|
|
34
34
|
}),
|
|
35
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
35
|
+
(0, typeorm_1.JoinColumn)({ name: "city" }),
|
|
36
36
|
__metadata("design:type", City_1.City)
|
|
37
37
|
], Square.prototype, "city", void 0);
|
|
38
38
|
__decorate([
|
|
39
|
-
(0, typeorm_1.Column)({ length: 100, comment:
|
|
39
|
+
(0, typeorm_1.Column)({ length: 100, comment: "Dirección del centro comercial/plazoleta." }),
|
|
40
40
|
__metadata("design:type", String)
|
|
41
41
|
], Square.prototype, "address", void 0);
|
|
42
42
|
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ type:
|
|
43
|
+
(0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 8 }),
|
|
44
44
|
__metadata("design:type", Number)
|
|
45
45
|
], Square.prototype, "latitude", void 0);
|
|
46
46
|
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({ type:
|
|
47
|
+
(0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 8 }),
|
|
48
48
|
__metadata("design:type", Number)
|
|
49
49
|
], Square.prototype, "longitude", void 0);
|
|
50
50
|
__decorate([
|
|
51
51
|
(0, typeorm_1.Column)({
|
|
52
|
-
type:
|
|
52
|
+
type: "mediumtext",
|
|
53
53
|
nullable: true,
|
|
54
|
-
comment:
|
|
54
|
+
comment: "Campo de tipo JSON por si se llega a necesitar agregar otras columnas para las plazoletas de los centros comerciales.",
|
|
55
55
|
}),
|
|
56
|
-
__metadata("design:type",
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
57
|
], Square.prototype, "details", void 0);
|
|
58
58
|
__decorate([
|
|
59
59
|
(0, typeorm_1.Column)({
|
|
60
|
-
comment:
|
|
60
|
+
comment: "Cantidad máxima de locales para ese del centro comercial/plazoleta.",
|
|
61
61
|
}),
|
|
62
62
|
__metadata("design:type", Number)
|
|
63
63
|
], Square.prototype, "maximum_number_locals", void 0);
|
|
@@ -65,22 +65,22 @@ var Square = /** @class */ (function () {
|
|
|
65
65
|
(0, typeorm_1.Column)({
|
|
66
66
|
length: 50,
|
|
67
67
|
nullable: true,
|
|
68
|
-
comment:
|
|
68
|
+
comment: "Correo electrónico del centro comercial/plazoleta.",
|
|
69
69
|
}),
|
|
70
|
-
__metadata("design:type",
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
71
|
], Square.prototype, "email", void 0);
|
|
72
72
|
__decorate([
|
|
73
73
|
(0, typeorm_1.Column)({
|
|
74
74
|
length: 15,
|
|
75
75
|
nullable: true,
|
|
76
|
-
comment:
|
|
76
|
+
comment: "Número de celular del centro comercial/plazoleta.",
|
|
77
77
|
}),
|
|
78
|
-
__metadata("design:type",
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
79
|
], Square.prototype, "phone", void 0);
|
|
80
80
|
__decorate([
|
|
81
81
|
(0, typeorm_1.Column)({
|
|
82
82
|
default: 1,
|
|
83
|
-
comment:
|
|
83
|
+
comment: "Si la plazoleta está o no activa:\r\n1. Activa.\r\n0. Inactiva.",
|
|
84
84
|
}),
|
|
85
85
|
__metadata("design:type", Number)
|
|
86
86
|
], Square.prototype, "status", void 0);
|
|
@@ -105,7 +105,7 @@ var Square = /** @class */ (function () {
|
|
|
105
105
|
], Square.prototype, "users_favorite_square", void 0);
|
|
106
106
|
Square = __decorate([
|
|
107
107
|
(0, typeorm_1.Entity)({
|
|
108
|
-
comment:
|
|
108
|
+
comment: "Centros comerciales registrados/agregados a la plataforma.\r\n\r\nDel centro comercial es importante saber si tiene una plazoleta de comida.",
|
|
109
109
|
})
|
|
110
110
|
], Square);
|
|
111
111
|
return Square;
|
|
@@ -35,7 +35,7 @@ var ToppingImage = /** @class */ (function () {
|
|
|
35
35
|
nullable: true,
|
|
36
36
|
comment: "Nombres para los filtros de búsqueda de las imágenes.",
|
|
37
37
|
}),
|
|
38
|
-
__metadata("design:type",
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
39
|
], ToppingImage.prototype, "filter", void 0);
|
|
40
40
|
__decorate([
|
|
41
41
|
(0, typeorm_1.Column)({
|
package/dist/entities/User.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { City } from "./City";
|
|
2
2
|
import { CodeRedemptionHistoryUser } from "./CodeRedemptionHistoryUser";
|
|
3
|
+
import { Local } from "./Local";
|
|
3
4
|
import { LocalQualification } from "./LocalQualification";
|
|
5
|
+
import { Product } from "./Product";
|
|
4
6
|
import { Request } from "./Request";
|
|
5
7
|
import { RequestProduct } from "./RequestProduct";
|
|
6
8
|
import { RequestProductGroupComplement } from "./RequestProductGroupComplement";
|
|
7
|
-
import { UserAddress } from "./UserAddress";
|
|
8
|
-
import { PaymentMethod } from "./PaymentMethod";
|
|
9
9
|
import { Square } from "./Square";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { UserAddress } from "./UserAddress";
|
|
11
|
+
import { RequestLocalPayment, UserPaymentMethod } from "..";
|
|
12
12
|
export declare class User {
|
|
13
13
|
id: number;
|
|
14
14
|
code: string;
|
|
@@ -19,7 +19,7 @@ export declare class User {
|
|
|
19
19
|
phone: string;
|
|
20
20
|
city: City;
|
|
21
21
|
password: string;
|
|
22
|
-
profile: string;
|
|
22
|
+
profile: string | null;
|
|
23
23
|
created: Date;
|
|
24
24
|
updated: Date;
|
|
25
25
|
status: number;
|
|
@@ -31,7 +31,8 @@ export declare class User {
|
|
|
31
31
|
request_products: RequestProduct[];
|
|
32
32
|
request_product_group_complements: RequestProductGroupComplement[];
|
|
33
33
|
addresses: UserAddress[];
|
|
34
|
-
|
|
34
|
+
payment_methods: UserPaymentMethod[];
|
|
35
|
+
payments_made: RequestLocalPayment[];
|
|
35
36
|
user_favorite_squares: Square[];
|
|
36
37
|
user_favorite_locals: Local[];
|
|
37
38
|
user_favorite_products: Product[];
|