test-entity-library-asm 2.1.6 → 2.1.7
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.
|
@@ -28,4 +28,14 @@ export declare class LocalsCompany {
|
|
|
28
28
|
square_status: number;
|
|
29
29
|
partners_count: number;
|
|
30
30
|
request_count: number;
|
|
31
|
+
pos_system_id: number;
|
|
32
|
+
pos_system_name: string;
|
|
33
|
+
pos_system_description: string;
|
|
34
|
+
pos_system_endpoint_products: object;
|
|
35
|
+
pos_system_endpoint_order: object;
|
|
36
|
+
pos_system_authentication_credentials: number;
|
|
37
|
+
pos_system_settings: object;
|
|
38
|
+
pos_system_created: string;
|
|
39
|
+
pos_system_expiration: string;
|
|
40
|
+
pos_system_status: number;
|
|
31
41
|
}
|
|
@@ -10,12 +10,22 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.LocalsCompany = void 0;
|
|
13
|
+
var moment = require("moment-timezone");
|
|
13
14
|
var typeorm_1 = require("typeorm");
|
|
15
|
+
var __1 = require("..");
|
|
14
16
|
// JSON Transformer
|
|
15
17
|
var jsonTransformer = {
|
|
16
18
|
to: function (value) { return JSON.stringify(value); },
|
|
17
19
|
from: function (value) { return JSON.parse(value); },
|
|
18
20
|
};
|
|
21
|
+
var DateTransformer = {
|
|
22
|
+
to: function (value) {
|
|
23
|
+
return moment.utc(value).format('YYYY-MM-DD HH:mm:ss');
|
|
24
|
+
},
|
|
25
|
+
from: function (value) {
|
|
26
|
+
return moment.utc(value).tz((0, __1.getTimeZone)()).format('YYYY-MM-DD HH:mm:ss');
|
|
27
|
+
},
|
|
28
|
+
};
|
|
19
29
|
var LocalsCompany = /** @class */ (function () {
|
|
20
30
|
function LocalsCompany() {
|
|
21
31
|
}
|
|
@@ -135,6 +145,46 @@ var LocalsCompany = /** @class */ (function () {
|
|
|
135
145
|
(0, typeorm_1.ViewColumn)(),
|
|
136
146
|
__metadata("design:type", Number)
|
|
137
147
|
], LocalsCompany.prototype, "request_count", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, typeorm_1.ViewColumn)(),
|
|
150
|
+
__metadata("design:type", Number)
|
|
151
|
+
], LocalsCompany.prototype, "pos_system_id", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, typeorm_1.ViewColumn)(),
|
|
154
|
+
__metadata("design:type", String)
|
|
155
|
+
], LocalsCompany.prototype, "pos_system_name", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, typeorm_1.ViewColumn)(),
|
|
158
|
+
__metadata("design:type", String)
|
|
159
|
+
], LocalsCompany.prototype, "pos_system_description", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
162
|
+
__metadata("design:type", Object)
|
|
163
|
+
], LocalsCompany.prototype, "pos_system_endpoint_products", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
166
|
+
__metadata("design:type", Object)
|
|
167
|
+
], LocalsCompany.prototype, "pos_system_endpoint_order", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, typeorm_1.ViewColumn)(),
|
|
170
|
+
__metadata("design:type", Number)
|
|
171
|
+
], LocalsCompany.prototype, "pos_system_authentication_credentials", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
174
|
+
__metadata("design:type", Object)
|
|
175
|
+
], LocalsCompany.prototype, "pos_system_settings", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
|
|
178
|
+
__metadata("design:type", String)
|
|
179
|
+
], LocalsCompany.prototype, "pos_system_created", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
|
|
182
|
+
__metadata("design:type", String)
|
|
183
|
+
], LocalsCompany.prototype, "pos_system_expiration", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
(0, typeorm_1.ViewColumn)(),
|
|
186
|
+
__metadata("design:type", Number)
|
|
187
|
+
], LocalsCompany.prototype, "pos_system_status", void 0);
|
|
138
188
|
LocalsCompany = __decorate([
|
|
139
189
|
(0, typeorm_1.ViewEntity)({
|
|
140
190
|
name: 'locals_company',
|
package/package.json
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
|
+
import moment = require('moment-timezone')
|
|
1
2
|
import { ViewEntity, ViewColumn } from 'typeorm'
|
|
3
|
+
import { getTimeZone } from '..'
|
|
2
4
|
|
|
3
5
|
// JSON Transformer
|
|
4
6
|
const jsonTransformer = {
|
|
5
7
|
to: (value: any) => JSON.stringify(value),
|
|
6
8
|
from: (value: string) => JSON.parse(value),
|
|
7
9
|
}
|
|
10
|
+
|
|
11
|
+
const DateTransformer = {
|
|
12
|
+
to(value: Date | string): string {
|
|
13
|
+
return moment.utc(value).format('YYYY-MM-DD HH:mm:ss')
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
from(value: string): string {
|
|
17
|
+
return moment.utc(value).tz(getTimeZone()).format('YYYY-MM-DD HH:mm:ss')
|
|
18
|
+
},
|
|
19
|
+
}
|
|
8
20
|
@ViewEntity({
|
|
9
21
|
name: 'locals_company',
|
|
10
22
|
})
|
|
@@ -95,4 +107,34 @@ export class LocalsCompany {
|
|
|
95
107
|
|
|
96
108
|
@ViewColumn()
|
|
97
109
|
request_count: number
|
|
110
|
+
|
|
111
|
+
@ViewColumn()
|
|
112
|
+
pos_system_id: number
|
|
113
|
+
|
|
114
|
+
@ViewColumn()
|
|
115
|
+
pos_system_name: string
|
|
116
|
+
|
|
117
|
+
@ViewColumn()
|
|
118
|
+
pos_system_description: string
|
|
119
|
+
|
|
120
|
+
@ViewColumn({ transformer: jsonTransformer })
|
|
121
|
+
pos_system_endpoint_products: object
|
|
122
|
+
|
|
123
|
+
@ViewColumn({ transformer: jsonTransformer })
|
|
124
|
+
pos_system_endpoint_order: object
|
|
125
|
+
|
|
126
|
+
@ViewColumn()
|
|
127
|
+
pos_system_authentication_credentials: number
|
|
128
|
+
|
|
129
|
+
@ViewColumn({ transformer: jsonTransformer })
|
|
130
|
+
pos_system_settings: object
|
|
131
|
+
|
|
132
|
+
@ViewColumn({ transformer: DateTransformer })
|
|
133
|
+
pos_system_created: string
|
|
134
|
+
|
|
135
|
+
@ViewColumn({ transformer: DateTransformer })
|
|
136
|
+
pos_system_expiration: string
|
|
137
|
+
|
|
138
|
+
@ViewColumn()
|
|
139
|
+
pos_system_status: number
|
|
98
140
|
}
|