test-entity-library-asm 3.9.17 → 3.9.19
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/CategoryDate.d.ts +1 -1
- package/dist/entities/CategoryDate.js +1 -1
- package/dist/entities/Company.d.ts +1 -1
- package/dist/entities/DiscountCodeCompany.d.ts +2 -2
- package/dist/entities/DiscountCodeCompany.js +1 -1
- package/dist/entities/DiscountCodeUser.d.ts +2 -2
- package/dist/entities/DiscountCodeUser.js +1 -1
- package/dist/entities/LocalReserve.d.ts +1 -1
- package/dist/entities/LocalReserve.js +1 -1
- package/dist/entities/Plan.d.ts +1 -1
- package/dist/entities/Plan.js +1 -1
- package/dist/entities/ProductDate.d.ts +1 -1
- package/dist/entities/ProductDate.js +1 -1
- package/dist/transformers/dateTransformer.js +2 -4
- package/package.json +1 -1
- package/src/entities/Category.ts +2 -2
- package/src/entities/CategoryDate.ts +1 -1
- package/src/entities/Company.ts +3 -3
- package/src/entities/DiscountCodeCompany.ts +2 -2
- package/src/entities/DiscountCodeUser.ts +2 -2
- package/src/entities/LocalReserve.ts +1 -1
- package/src/entities/Plan.ts +1 -1
- package/src/entities/ProductDate.ts +1 -1
- package/src/transformers/dateTransformer.ts +2 -4
|
@@ -35,7 +35,7 @@ __decorate([
|
|
|
35
35
|
type: "date",
|
|
36
36
|
comment: "Fecha en la que va a estar disponible la categoría.",
|
|
37
37
|
}),
|
|
38
|
-
__metadata("design:type",
|
|
38
|
+
__metadata("design:type", String)
|
|
39
39
|
], CategoryDate.prototype, "date", void 0);
|
|
40
40
|
__decorate([
|
|
41
41
|
(0, typeorm_1.Column)({ type: "varchar", length: 5, comment: "Hora de inicio." }),
|
|
@@ -9,8 +9,8 @@ export declare class DiscountCodeCompany {
|
|
|
9
9
|
single_use: number;
|
|
10
10
|
use_limit: number | null;
|
|
11
11
|
created: Date;
|
|
12
|
-
start:
|
|
13
|
-
expiration:
|
|
12
|
+
start: string;
|
|
13
|
+
expiration: string | null;
|
|
14
14
|
repeat_days: any | null;
|
|
15
15
|
updated: Date | null;
|
|
16
16
|
status: number;
|
|
@@ -12,8 +12,8 @@ export declare class DiscountCodeUser {
|
|
|
12
12
|
single_use: number;
|
|
13
13
|
use_limit: number | null;
|
|
14
14
|
created: Date;
|
|
15
|
-
start:
|
|
16
|
-
expiration:
|
|
15
|
+
start: string;
|
|
16
|
+
expiration: string | null;
|
|
17
17
|
repeat_days: any | null;
|
|
18
18
|
updated_by: Partner;
|
|
19
19
|
updated: Date;
|
package/dist/entities/Plan.d.ts
CHANGED
package/dist/entities/Plan.js
CHANGED
|
@@ -77,7 +77,7 @@ __decorate([
|
|
|
77
77
|
], Plan.prototype, "created", void 0);
|
|
78
78
|
__decorate([
|
|
79
79
|
(0, typeorm_1.Column)({ type: "date", comment: "Fecha de expiración del registro." }),
|
|
80
|
-
__metadata("design:type",
|
|
80
|
+
__metadata("design:type", String)
|
|
81
81
|
], Plan.prototype, "expiration", void 0);
|
|
82
82
|
__decorate([
|
|
83
83
|
(0, typeorm_1.Column)({
|
|
@@ -35,7 +35,7 @@ __decorate([
|
|
|
35
35
|
type: "date",
|
|
36
36
|
comment: "Fecha en la que va a estar disponible el producto.",
|
|
37
37
|
}),
|
|
38
|
-
__metadata("design:type",
|
|
38
|
+
__metadata("design:type", String)
|
|
39
39
|
], ProductDate.prototype, "date", void 0);
|
|
40
40
|
__decorate([
|
|
41
41
|
(0, typeorm_1.Column)({ type: "varchar", comment: "Hora de inicio." }),
|
|
@@ -8,14 +8,12 @@ const moment_timezone_1 = __importDefault(require("moment-timezone"));
|
|
|
8
8
|
const __1 = require("..");
|
|
9
9
|
class DateTransformer {
|
|
10
10
|
to(value) {
|
|
11
|
-
|
|
12
|
-
return result;
|
|
11
|
+
return (0, moment_timezone_1.default)(value).utc().format("YYYY-MM-DD HH:mm:ss");
|
|
13
12
|
}
|
|
14
13
|
from(value) {
|
|
15
14
|
if (value === null)
|
|
16
15
|
return null;
|
|
17
|
-
|
|
18
|
-
return result;
|
|
16
|
+
return moment_timezone_1.default.utc(value).tz((0, __1.getTimeZone)()).toDate();
|
|
19
17
|
}
|
|
20
18
|
}
|
|
21
19
|
exports.DateTransformer = DateTransformer;
|
package/package.json
CHANGED
package/src/entities/Category.ts
CHANGED
|
@@ -137,7 +137,7 @@ export class Category {
|
|
|
137
137
|
|
|
138
138
|
@OneToMany(
|
|
139
139
|
() => ScheduleCategory,
|
|
140
|
-
(scheduleCategory) => scheduleCategory.category
|
|
140
|
+
(scheduleCategory) => scheduleCategory.category,
|
|
141
141
|
)
|
|
142
142
|
category_schedules: ScheduleCategory[];
|
|
143
143
|
|
|
@@ -146,7 +146,7 @@ export class Category {
|
|
|
146
146
|
|
|
147
147
|
@OneToMany(
|
|
148
148
|
() => RequestInvoiceCategory,
|
|
149
|
-
(requestInvoiceCategory) => requestInvoiceCategory.category
|
|
149
|
+
(requestInvoiceCategory) => requestInvoiceCategory.category,
|
|
150
150
|
)
|
|
151
151
|
request_invoice_categories: RequestInvoiceCategory[];
|
|
152
152
|
}
|
package/src/entities/Company.ts
CHANGED
|
@@ -117,7 +117,7 @@ export class Company {
|
|
|
117
117
|
default: null,
|
|
118
118
|
comment: "Cuándo expira el plan de la empresa.",
|
|
119
119
|
})
|
|
120
|
-
expiration:
|
|
120
|
+
expiration: string | null;
|
|
121
121
|
|
|
122
122
|
@Column({
|
|
123
123
|
type: "datetime",
|
|
@@ -138,13 +138,13 @@ export class Company {
|
|
|
138
138
|
|
|
139
139
|
@OneToMany(
|
|
140
140
|
() => CodeRedemptionHistoryCompany,
|
|
141
|
-
(codeRedemptionHistoryCompany) => codeRedemptionHistoryCompany.company
|
|
141
|
+
(codeRedemptionHistoryCompany) => codeRedemptionHistoryCompany.company,
|
|
142
142
|
)
|
|
143
143
|
code_redemption_history_company: CodeRedemptionHistoryCompany[];
|
|
144
144
|
|
|
145
145
|
@OneToMany(
|
|
146
146
|
() => DiscountCodeUser,
|
|
147
|
-
(discountCodeUser) => discountCodeUser.company
|
|
147
|
+
(discountCodeUser) => discountCodeUser.company,
|
|
148
148
|
)
|
|
149
149
|
discount_code_users: DiscountCodeUser[];
|
|
150
150
|
|
|
@@ -68,7 +68,7 @@ export class DiscountCodeCompany {
|
|
|
68
68
|
type: "date",
|
|
69
69
|
comment: "Fecha inicial del descuento.",
|
|
70
70
|
})
|
|
71
|
-
start:
|
|
71
|
+
start: string;
|
|
72
72
|
|
|
73
73
|
@Column({
|
|
74
74
|
type: "date",
|
|
@@ -76,7 +76,7 @@ export class DiscountCodeCompany {
|
|
|
76
76
|
default: null,
|
|
77
77
|
comment: "Fecha de expiración del registro.",
|
|
78
78
|
})
|
|
79
|
-
expiration:
|
|
79
|
+
expiration: string | null;
|
|
80
80
|
|
|
81
81
|
@Column({
|
|
82
82
|
type: "text",
|
|
@@ -85,7 +85,7 @@ export class DiscountCodeUser {
|
|
|
85
85
|
type: "date",
|
|
86
86
|
comment: "Fecha inicial del descuento.",
|
|
87
87
|
})
|
|
88
|
-
start:
|
|
88
|
+
start: string;
|
|
89
89
|
|
|
90
90
|
@Column({
|
|
91
91
|
type: "date",
|
|
@@ -93,7 +93,7 @@ export class DiscountCodeUser {
|
|
|
93
93
|
default: null,
|
|
94
94
|
comment: "Fecha de expiración del registro.",
|
|
95
95
|
})
|
|
96
|
-
expiration:
|
|
96
|
+
expiration: string | null;
|
|
97
97
|
|
|
98
98
|
@Column({
|
|
99
99
|
type: "text",
|
package/src/entities/Plan.ts
CHANGED
|
@@ -4,14 +4,12 @@ import { getTimeZone } from "..";
|
|
|
4
4
|
|
|
5
5
|
export class DateTransformer implements ValueTransformer {
|
|
6
6
|
to(value: Date | string): string {
|
|
7
|
-
|
|
8
|
-
return result;
|
|
7
|
+
return moment(value).utc().format("YYYY-MM-DD HH:mm:ss");
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
from(value: string): Date | null | string {
|
|
12
11
|
if (value === null) return null;
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
return result;
|
|
13
|
+
return moment.utc(value).tz(getTimeZone()).toDate();
|
|
16
14
|
}
|
|
17
15
|
}
|