test-entity-library-asm 3.7.0 → 3.7.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.
- package/dist/entities/CodeRedemptionHistoryUser.d.ts +1 -1
- package/dist/entities/CodeRedemptionHistoryUser.js +4 -3
- package/dist/entities/Request.d.ts +3 -4
- package/dist/entities/Request.js +30 -10
- package/dist/entities/RequestLocal.d.ts +3 -1
- package/dist/entities/RequestLocal.js +8 -0
- package/dist/entities/RequestProduct.d.ts +2 -2
- package/dist/entities/RequestProduct.js +3 -3
- package/dist/entities/RequestProductGroupComplement.d.ts +3 -3
- package/dist/entities/RequestProductGroupComplement.js +4 -4
- package/package.json +1 -1
- package/src/entities/CodeRedemptionHistoryUser.ts +4 -3
- package/src/entities/Request.ts +30 -11
- package/src/entities/RequestLocal.ts +11 -1
- package/src/entities/RequestProduct.ts +10 -6
- package/src/entities/RequestProductGroupComplement.ts +5 -5
|
@@ -48,11 +48,12 @@ var CodeRedemptionHistoryUser = /** @class */ (function () {
|
|
|
48
48
|
], CodeRedemptionHistoryUser.prototype, "date_used", void 0);
|
|
49
49
|
__decorate([
|
|
50
50
|
(0, typeorm_1.Column)({
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
type: "decimal",
|
|
52
|
+
precision: 10,
|
|
53
|
+
scale: 2,
|
|
53
54
|
comment: "El valor del descuento aplicado.",
|
|
54
55
|
}),
|
|
55
|
-
__metadata("design:type",
|
|
56
|
+
__metadata("design:type", Number)
|
|
56
57
|
], CodeRedemptionHistoryUser.prototype, "discount_applied", void 0);
|
|
57
58
|
CodeRedemptionHistoryUser = __decorate([
|
|
58
59
|
(0, typeorm_1.Entity)("code_redemption_history_user", {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { RequestLocal, RequestPrint, UserAddress } from "..";
|
|
2
|
-
import { RequestProduct } from "./RequestProduct";
|
|
3
|
-
import { RequestProductGroupComplement } from "./RequestProductGroupComplement";
|
|
4
2
|
import { User } from "./User";
|
|
5
3
|
export declare class Request {
|
|
6
4
|
id: number;
|
|
7
5
|
code: string;
|
|
8
6
|
user: User | null;
|
|
9
7
|
address: UserAddress | null;
|
|
8
|
+
delivery_phone: string | null;
|
|
9
|
+
delivery_comments: string | null;
|
|
10
|
+
delivery_address: string | null;
|
|
10
11
|
order_mode: number;
|
|
11
12
|
order_type: number;
|
|
12
13
|
order_cost: number;
|
|
@@ -17,7 +18,5 @@ export declare class Request {
|
|
|
17
18
|
updated: Date | null;
|
|
18
19
|
requests_local: RequestLocal[];
|
|
19
20
|
requests_group: User[];
|
|
20
|
-
request_products: RequestProduct[];
|
|
21
|
-
request_product_group_complements: RequestProductGroupComplement[];
|
|
22
21
|
request_prints: RequestPrint[];
|
|
23
22
|
}
|
package/dist/entities/Request.js
CHANGED
|
@@ -13,8 +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 RequestProduct_1 = require("./RequestProduct");
|
|
17
|
-
var RequestProductGroupComplement_1 = require("./RequestProductGroupComplement");
|
|
18
16
|
var User_1 = require("./User");
|
|
19
17
|
var Request = /** @class */ (function () {
|
|
20
18
|
function Request() {
|
|
@@ -53,6 +51,36 @@ var Request = /** @class */ (function () {
|
|
|
53
51
|
(0, typeorm_1.JoinColumn)({ name: "address" }),
|
|
54
52
|
__metadata("design:type", Object)
|
|
55
53
|
], Request.prototype, "address", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({
|
|
56
|
+
length: 15,
|
|
57
|
+
type: "varchar",
|
|
58
|
+
nullable: true,
|
|
59
|
+
default: null,
|
|
60
|
+
comment: "Contacto del usuario que recibe el pedido. Este campo es cuando el order_type es tipo 3 y no hay información de las direcciones de entrega del usuario",
|
|
61
|
+
}),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], Request.prototype, "delivery_phone", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({
|
|
66
|
+
length: 200,
|
|
67
|
+
type: "varchar",
|
|
68
|
+
nullable: true,
|
|
69
|
+
default: null,
|
|
70
|
+
comment: "Observaciones de la entrega del pedido. Este campo es cuando el order_type es tipo 3 y no hay información de las direcciones de entrega del usuario",
|
|
71
|
+
}),
|
|
72
|
+
__metadata("design:type", Object)
|
|
73
|
+
], Request.prototype, "delivery_comments", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({
|
|
76
|
+
length: 150,
|
|
77
|
+
type: "varchar",
|
|
78
|
+
nullable: true,
|
|
79
|
+
default: null,
|
|
80
|
+
comment: "Dirección donde se va a entregar el pedido. Este campo es cuando el order_type es tipo 3 y no hay información de las direcciones de entrega del usuario",
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], Request.prototype, "delivery_address", void 0);
|
|
56
84
|
__decorate([
|
|
57
85
|
(0, typeorm_1.Column)({
|
|
58
86
|
default: 1,
|
|
@@ -142,14 +170,6 @@ var Request = /** @class */ (function () {
|
|
|
142
170
|
}),
|
|
143
171
|
__metadata("design:type", Array)
|
|
144
172
|
], Request.prototype, "requests_group", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
(0, typeorm_1.OneToMany)(function () { return RequestProduct_1.RequestProduct; }, function (requestProduct) { return requestProduct.request; }),
|
|
147
|
-
__metadata("design:type", Array)
|
|
148
|
-
], Request.prototype, "request_products", void 0);
|
|
149
|
-
__decorate([
|
|
150
|
-
(0, typeorm_1.OneToMany)(function () { return RequestProductGroupComplement_1.RequestProductGroupComplement; }, function (requestProduct) { return requestProduct.request; }),
|
|
151
|
-
__metadata("design:type", Array)
|
|
152
|
-
], Request.prototype, "request_product_group_complements", void 0);
|
|
153
173
|
__decorate([
|
|
154
174
|
(0, typeorm_1.OneToMany)(function () { return __1.RequestPrint; }, function (requestPrint) { return requestPrint.request; }),
|
|
155
175
|
__metadata("design:type", Array)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Local, Partner, Request, RequestLocalHistory, RequestLocalPayment, RequestLocalTable } from "..";
|
|
1
|
+
import { Local, Partner, Request, RequestLocalHistory, RequestLocalPayment, RequestLocalTable, RequestProduct, RequestProductGroupComplement } from "..";
|
|
2
2
|
export declare class RequestLocal {
|
|
3
3
|
id: number;
|
|
4
4
|
request: Request;
|
|
@@ -15,4 +15,6 @@ export declare class RequestLocal {
|
|
|
15
15
|
requests_local_history: RequestLocalHistory[];
|
|
16
16
|
payments_made: RequestLocalPayment[];
|
|
17
17
|
request_locals_table: RequestLocalTable[];
|
|
18
|
+
request_products: RequestProduct[];
|
|
19
|
+
request_product_group_complements: RequestProductGroupComplement[];
|
|
18
20
|
}
|
|
@@ -132,6 +132,14 @@ var RequestLocal = /** @class */ (function () {
|
|
|
132
132
|
(0, typeorm_1.OneToMany)(function () { return __1.RequestLocalTable; }, function (requestLocalTable) { return requestLocalTable.request_local; }),
|
|
133
133
|
__metadata("design:type", Array)
|
|
134
134
|
], RequestLocal.prototype, "request_locals_table", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, typeorm_1.OneToMany)(function () { return __1.RequestProduct; }, function (requestProduct) { return requestProduct.request; }),
|
|
137
|
+
__metadata("design:type", Array)
|
|
138
|
+
], RequestLocal.prototype, "request_products", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, typeorm_1.OneToMany)(function () { return __1.RequestProductGroupComplement; }, function (requestProduct) { return requestProduct.request; }),
|
|
141
|
+
__metadata("design:type", Array)
|
|
142
|
+
], RequestLocal.prototype, "request_product_group_complements", void 0);
|
|
135
143
|
RequestLocal = __decorate([
|
|
136
144
|
(0, typeorm_1.Entity)({
|
|
137
145
|
comment: "Tabla para guardar las relaciones de un pedido y los locales",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Product } from "./Product";
|
|
2
|
-
import {
|
|
2
|
+
import { RequestLocal } from "./RequestLocal";
|
|
3
3
|
import { User } from "./User";
|
|
4
4
|
export declare class RequestProduct {
|
|
5
5
|
id: number;
|
|
6
|
-
request:
|
|
6
|
+
request: RequestLocal;
|
|
7
7
|
product: Product;
|
|
8
8
|
user: User | null;
|
|
9
9
|
quantity: number;
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.RequestProduct = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
14
|
var Product_1 = require("./Product");
|
|
15
|
-
var
|
|
15
|
+
var RequestLocal_1 = require("./RequestLocal");
|
|
16
16
|
var User_1 = require("./User");
|
|
17
17
|
var RequestProduct = /** @class */ (function () {
|
|
18
18
|
function RequestProduct() {
|
|
@@ -25,12 +25,12 @@ var RequestProduct = /** @class */ (function () {
|
|
|
25
25
|
__metadata("design:type", Number)
|
|
26
26
|
], RequestProduct.prototype, "id", void 0);
|
|
27
27
|
__decorate([
|
|
28
|
-
(0, typeorm_1.ManyToOne)(function () { return
|
|
28
|
+
(0, typeorm_1.ManyToOne)(function () { return RequestLocal_1.RequestLocal; }, function (requestLocal) { return requestLocal.request_products; }, {
|
|
29
29
|
onDelete: "CASCADE",
|
|
30
30
|
onUpdate: "NO ACTION",
|
|
31
31
|
}),
|
|
32
32
|
(0, typeorm_1.JoinColumn)({ name: "request" }),
|
|
33
|
-
__metadata("design:type",
|
|
33
|
+
__metadata("design:type", RequestLocal_1.RequestLocal)
|
|
34
34
|
], RequestProduct.prototype, "request", void 0);
|
|
35
35
|
__decorate([
|
|
36
36
|
(0, typeorm_1.ManyToOne)(function () { return Product_1.Product; }, function (product) { return product.request_products; }, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Request } from "./Request";
|
|
2
|
-
import { User } from "./User";
|
|
3
1
|
import { ProductGroupComplement } from "./productGroupComplement";
|
|
2
|
+
import { RequestLocal } from "./RequestLocal";
|
|
3
|
+
import { User } from "./User";
|
|
4
4
|
export declare class RequestProductGroupComplement {
|
|
5
5
|
id: number;
|
|
6
|
-
request:
|
|
6
|
+
request: RequestLocal;
|
|
7
7
|
product_group_complement: ProductGroupComplement;
|
|
8
8
|
user: User | null;
|
|
9
9
|
quantity: number;
|
|
@@ -11,9 +11,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.RequestProductGroupComplement = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
|
-
var Request_1 = require("./Request");
|
|
15
|
-
var User_1 = require("./User");
|
|
16
14
|
var productGroupComplement_1 = require("./productGroupComplement");
|
|
15
|
+
var RequestLocal_1 = require("./RequestLocal");
|
|
16
|
+
var User_1 = require("./User");
|
|
17
17
|
var RequestProductGroupComplement = /** @class */ (function () {
|
|
18
18
|
function RequestProductGroupComplement() {
|
|
19
19
|
}
|
|
@@ -25,12 +25,12 @@ var RequestProductGroupComplement = /** @class */ (function () {
|
|
|
25
25
|
__metadata("design:type", Number)
|
|
26
26
|
], RequestProductGroupComplement.prototype, "id", void 0);
|
|
27
27
|
__decorate([
|
|
28
|
-
(0, typeorm_1.ManyToOne)(function () { return
|
|
28
|
+
(0, typeorm_1.ManyToOne)(function () { return RequestLocal_1.RequestLocal; }, function (requestLocal) { return requestLocal.request_product_group_complements; }, {
|
|
29
29
|
onDelete: "CASCADE",
|
|
30
30
|
onUpdate: "NO ACTION",
|
|
31
31
|
}),
|
|
32
32
|
(0, typeorm_1.JoinColumn)({ name: "request" }),
|
|
33
|
-
__metadata("design:type",
|
|
33
|
+
__metadata("design:type", RequestLocal_1.RequestLocal)
|
|
34
34
|
], RequestProductGroupComplement.prototype, "request", void 0);
|
|
35
35
|
__decorate([
|
|
36
36
|
(0, typeorm_1.ManyToOne)(function () { return productGroupComplement_1.ProductGroupComplement; }, function (productGroupComplement) {
|
package/package.json
CHANGED
|
@@ -44,9 +44,10 @@ export class CodeRedemptionHistoryUser {
|
|
|
44
44
|
date_used: Date;
|
|
45
45
|
|
|
46
46
|
@Column({
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
type: "decimal",
|
|
48
|
+
precision: 10,
|
|
49
|
+
scale: 2,
|
|
49
50
|
comment: "El valor del descuento aplicado.",
|
|
50
51
|
})
|
|
51
|
-
discount_applied:
|
|
52
|
+
discount_applied: number;
|
|
52
53
|
}
|
package/src/entities/Request.ts
CHANGED
|
@@ -10,8 +10,6 @@ import {
|
|
|
10
10
|
} from "typeorm";
|
|
11
11
|
import { RequestLocal, RequestPrint, UserAddress } from "..";
|
|
12
12
|
import { DateTransformer } from "../transformers/dateTransformer";
|
|
13
|
-
import { RequestProduct } from "./RequestProduct";
|
|
14
|
-
import { RequestProductGroupComplement } from "./RequestProductGroupComplement";
|
|
15
13
|
import { User } from "./User";
|
|
16
14
|
|
|
17
15
|
@Entity({
|
|
@@ -50,6 +48,36 @@ export class Request {
|
|
|
50
48
|
@JoinColumn({ name: "address" })
|
|
51
49
|
address: UserAddress | null;
|
|
52
50
|
|
|
51
|
+
@Column({
|
|
52
|
+
length: 15,
|
|
53
|
+
type: "varchar",
|
|
54
|
+
nullable: true,
|
|
55
|
+
default: null,
|
|
56
|
+
comment:
|
|
57
|
+
"Contacto del usuario que recibe el pedido. Este campo es cuando el order_type es tipo 3 y no hay información de las direcciones de entrega del usuario",
|
|
58
|
+
})
|
|
59
|
+
delivery_phone: string | null;
|
|
60
|
+
|
|
61
|
+
@Column({
|
|
62
|
+
length: 200,
|
|
63
|
+
type: "varchar",
|
|
64
|
+
nullable: true,
|
|
65
|
+
default: null,
|
|
66
|
+
comment:
|
|
67
|
+
"Observaciones de la entrega del pedido. Este campo es cuando el order_type es tipo 3 y no hay información de las direcciones de entrega del usuario",
|
|
68
|
+
})
|
|
69
|
+
delivery_comments: string | null;
|
|
70
|
+
|
|
71
|
+
@Column({
|
|
72
|
+
length: 150,
|
|
73
|
+
type: "varchar",
|
|
74
|
+
nullable: true,
|
|
75
|
+
default: null,
|
|
76
|
+
comment:
|
|
77
|
+
"Dirección donde se va a entregar el pedido. Este campo es cuando el order_type es tipo 3 y no hay información de las direcciones de entrega del usuario",
|
|
78
|
+
})
|
|
79
|
+
delivery_address: string | null;
|
|
80
|
+
|
|
53
81
|
@Column({
|
|
54
82
|
default: 1,
|
|
55
83
|
type: "int",
|
|
@@ -135,15 +163,6 @@ export class Request {
|
|
|
135
163
|
})
|
|
136
164
|
requests_group: User[];
|
|
137
165
|
|
|
138
|
-
@OneToMany(() => RequestProduct, (requestProduct) => requestProduct.request)
|
|
139
|
-
request_products: RequestProduct[];
|
|
140
|
-
|
|
141
|
-
@OneToMany(
|
|
142
|
-
() => RequestProductGroupComplement,
|
|
143
|
-
(requestProduct) => requestProduct.request
|
|
144
|
-
)
|
|
145
|
-
request_product_group_complements: RequestProductGroupComplement[];
|
|
146
|
-
|
|
147
166
|
@OneToMany(() => RequestPrint, (requestPrint) => requestPrint.request)
|
|
148
167
|
request_prints: RequestPrint[];
|
|
149
168
|
}
|
|
@@ -8,12 +8,13 @@ import {
|
|
|
8
8
|
} from "typeorm";
|
|
9
9
|
import {
|
|
10
10
|
Local,
|
|
11
|
-
LocalTable,
|
|
12
11
|
Partner,
|
|
13
12
|
Request,
|
|
14
13
|
RequestLocalHistory,
|
|
15
14
|
RequestLocalPayment,
|
|
16
15
|
RequestLocalTable,
|
|
16
|
+
RequestProduct,
|
|
17
|
+
RequestProductGroupComplement
|
|
17
18
|
} from "..";
|
|
18
19
|
import { DateTransformer } from "../transformers/dateTransformer";
|
|
19
20
|
|
|
@@ -137,4 +138,13 @@ export class RequestLocal {
|
|
|
137
138
|
(requestLocalTable) => requestLocalTable.request_local
|
|
138
139
|
)
|
|
139
140
|
request_locals_table: RequestLocalTable[];
|
|
141
|
+
|
|
142
|
+
@OneToMany(() => RequestProduct, (requestProduct) => requestProduct.request)
|
|
143
|
+
request_products: RequestProduct[];
|
|
144
|
+
|
|
145
|
+
@OneToMany(
|
|
146
|
+
() => RequestProductGroupComplement,
|
|
147
|
+
(requestProduct) => requestProduct.request
|
|
148
|
+
)
|
|
149
|
+
request_product_group_complements: RequestProductGroupComplement[];
|
|
140
150
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
PrimaryGeneratedColumn,
|
|
7
7
|
} from "typeorm";
|
|
8
8
|
import { Product } from "./Product";
|
|
9
|
-
import {
|
|
9
|
+
import { RequestLocal } from "./RequestLocal";
|
|
10
10
|
import { User } from "./User";
|
|
11
11
|
|
|
12
12
|
@Entity("request_product", {
|
|
@@ -19,12 +19,16 @@ export class RequestProduct {
|
|
|
19
19
|
})
|
|
20
20
|
id: number;
|
|
21
21
|
|
|
22
|
-
@ManyToOne(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
@ManyToOne(
|
|
23
|
+
() => RequestLocal,
|
|
24
|
+
(requestLocal) => requestLocal.request_products,
|
|
25
|
+
{
|
|
26
|
+
onDelete: "CASCADE",
|
|
27
|
+
onUpdate: "NO ACTION",
|
|
28
|
+
}
|
|
29
|
+
)
|
|
26
30
|
@JoinColumn({ name: "request" })
|
|
27
|
-
request:
|
|
31
|
+
request: RequestLocal;
|
|
28
32
|
|
|
29
33
|
@ManyToOne(() => Product, (product) => product.request_products, {
|
|
30
34
|
onDelete: "CASCADE",
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
ManyToOne,
|
|
6
6
|
PrimaryGeneratedColumn,
|
|
7
7
|
} from "typeorm";
|
|
8
|
-
import { Request } from "./Request";
|
|
9
|
-
import { User } from "./User";
|
|
10
8
|
import { ProductGroupComplement } from "./productGroupComplement";
|
|
9
|
+
import { RequestLocal } from "./RequestLocal";
|
|
10
|
+
import { User } from "./User";
|
|
11
11
|
|
|
12
12
|
@Entity("request_product_group_complement", {
|
|
13
13
|
comment:
|
|
@@ -21,15 +21,15 @@ export class RequestProductGroupComplement {
|
|
|
21
21
|
id: number;
|
|
22
22
|
|
|
23
23
|
@ManyToOne(
|
|
24
|
-
() =>
|
|
25
|
-
(
|
|
24
|
+
() => RequestLocal,
|
|
25
|
+
(requestLocal) => requestLocal.request_product_group_complements,
|
|
26
26
|
{
|
|
27
27
|
onDelete: "CASCADE",
|
|
28
28
|
onUpdate: "NO ACTION",
|
|
29
29
|
}
|
|
30
30
|
)
|
|
31
31
|
@JoinColumn({ name: "request" })
|
|
32
|
-
request:
|
|
32
|
+
request: RequestLocal;
|
|
33
33
|
|
|
34
34
|
@ManyToOne(
|
|
35
35
|
() => ProductGroupComplement,
|