vona-module-test-vona 5.0.50 → 5.0.52
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/.metadata/index.d.ts +16 -0
- package/dist/controller/order.d.ts +2 -0
- package/dist/controller/post.d.ts +19 -19
- package/dist/dto/orderQueryPage.d.ts +9 -0
- package/dist/dto/orderResultPage.d.ts +8 -0
- package/dist/index.js +335 -301
- package/dist/service/post.d.ts +19 -19
- package/package.json +1 -1
- package/src/.metadata/index.ts +18 -0
- package/src/controller/order.ts +15 -0
- package/src/controller/passport.ts +2 -2
- package/src/controller/tail.ts +2 -2
- package/src/dto/orderQueryPage.ts +20 -0
- package/src/dto/orderResultPage.ts +9 -0
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BeanInfo, BeanAopBase, BeanAopMethodBase, BeanBase, cast, retry, BeanScopeBase } from 'vona';
|
|
1
|
+
import { BeanInfo, BeanAopBase, BeanAopMethodBase, BeanBase, $Class, cast, retry, BeanScopeBase } from 'vona';
|
|
2
2
|
import { Aop, AopMethod, Aspect } from 'vona-module-a-aspect';
|
|
3
3
|
import { Api, v } from 'vona-module-a-openapi';
|
|
4
4
|
import { Entity, EntityBase, Model, $relation, BeanModelBase, $relationDynamic, Database, $Dto, $tableName } from 'vona-module-a-orm';
|
|
5
|
-
import { ModelCategoryChain as ModelCategoryChain$1 } from 'vona-module-test-vona';
|
|
5
|
+
import { ModelCategoryChain as ModelCategoryChain$1, ModelOrder as ModelOrder$1 } from 'vona-module-test-vona';
|
|
6
6
|
import moment from 'moment';
|
|
7
7
|
import { Bean, Service, Scope } from 'vona-module-a-bean';
|
|
8
8
|
import { getKeyHash, CacheMem, BeanCacheMemBase, CacheRedis, BeanCacheRedisBase } from 'vona-module-a-cache';
|
|
@@ -15,23 +15,23 @@ import { Queue, BeanQueueBase } from 'vona-module-a-queue';
|
|
|
15
15
|
import { Schedule } from 'vona-module-a-schedule';
|
|
16
16
|
import { SummerCache, BeanSummerCacheBase } from 'vona-module-a-summer';
|
|
17
17
|
import { Dto, Controller, Web, Arg } from 'vona-module-a-web';
|
|
18
|
-
import {
|
|
18
|
+
import z, { z as z$1 } from 'zod';
|
|
19
|
+
import { Passport } from 'vona-module-a-user';
|
|
19
20
|
import { sleep } from '@cabloy/utils';
|
|
20
21
|
import { Captcha } from 'vona-module-a-captcha';
|
|
21
22
|
import { Core } from 'vona-module-a-core';
|
|
22
|
-
import { z } from 'zod';
|
|
23
23
|
import { DtoJwtToken } from 'vona-module-a-jwt';
|
|
24
24
|
import { File, SymbolUploadValue } from 'vona-module-a-upload';
|
|
25
25
|
|
|
26
|
-
var _dec$
|
|
27
|
-
let AopRegExp = (_dec$
|
|
26
|
+
var _dec$1j, _dec2$1j, _class$1j;
|
|
27
|
+
let AopRegExp = (_dec$1j = Aop({
|
|
28
28
|
match: [/^test-vona\.service\.test\w+$/, 'testCtx'],
|
|
29
29
|
meta: {
|
|
30
30
|
mode: 'test'
|
|
31
31
|
}
|
|
32
|
-
}), _dec2$
|
|
32
|
+
}), _dec2$1j = BeanInfo({
|
|
33
33
|
module: "test-vona"
|
|
34
|
-
}), _dec$
|
|
34
|
+
}), _dec$1j(_class$1j = _dec2$1j(_class$1j = class AopRegExp extends BeanAopBase {
|
|
35
35
|
__get_name__(next) {
|
|
36
36
|
const value = next();
|
|
37
37
|
return `${value}:regexpaop`;
|
|
@@ -53,24 +53,24 @@ let AopRegExp = (_dec$1h = Aop({
|
|
|
53
53
|
const result = await next();
|
|
54
54
|
return `${result}:regexpaop`;
|
|
55
55
|
}
|
|
56
|
-
}) || _class$
|
|
56
|
+
}) || _class$1j) || _class$1j);
|
|
57
57
|
|
|
58
|
-
var _dec$
|
|
58
|
+
var _dec$1i, _dec2$1i, _class$1i;
|
|
59
59
|
class AopSimpleBase extends BeanAopBase {
|
|
60
60
|
actionSync(_args, next) {
|
|
61
61
|
const result = next();
|
|
62
62
|
return `${result}:simpleaop`;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
let AopSimple = (_dec$
|
|
65
|
+
let AopSimple = (_dec$1i = Aop({
|
|
66
66
|
match: 'testCtx',
|
|
67
67
|
dependencies: 'test-vona:regExp',
|
|
68
68
|
meta: {
|
|
69
69
|
mode: 'test'
|
|
70
70
|
}
|
|
71
|
-
}), _dec2$
|
|
71
|
+
}), _dec2$1i = BeanInfo({
|
|
72
72
|
module: "test-vona"
|
|
73
|
-
}), _dec$
|
|
73
|
+
}), _dec$1i(_class$1i = _dec2$1i(_class$1i = class AopSimple extends AopSimpleBase {
|
|
74
74
|
// magic
|
|
75
75
|
__get__(prop, next) {
|
|
76
76
|
const value = next();
|
|
@@ -110,14 +110,14 @@ let AopSimple = (_dec$1g = Aop({
|
|
|
110
110
|
const result = await next();
|
|
111
111
|
return `${result}:simpleaop`;
|
|
112
112
|
}
|
|
113
|
-
}) || _class$
|
|
113
|
+
}) || _class$1i) || _class$1i);
|
|
114
114
|
|
|
115
|
-
var _dec$
|
|
116
|
-
let AopMethodTest = (_dec$
|
|
115
|
+
var _dec$1h, _dec2$1h, _class$1h;
|
|
116
|
+
let AopMethodTest = (_dec$1h = AopMethod({
|
|
117
117
|
wrapper: ''
|
|
118
|
-
}), _dec2$
|
|
118
|
+
}), _dec2$1h = BeanInfo({
|
|
119
119
|
module: "test-vona"
|
|
120
|
-
}), _dec$
|
|
120
|
+
}), _dec$1h(_class$1h = _dec2$1h(_class$1h = class AopMethodTest extends BeanAopMethodBase {
|
|
121
121
|
get(options, next, _receiver, _prop) {
|
|
122
122
|
const res = next();
|
|
123
123
|
return this._wrapper(options.wrapper, res);
|
|
@@ -144,7 +144,7 @@ let AopMethodTest = (_dec$1f = AopMethod({
|
|
|
144
144
|
if (index === data.length - wrapper.length) data = data.substring(0, index);
|
|
145
145
|
return data;
|
|
146
146
|
}
|
|
147
|
-
}) || _class$
|
|
147
|
+
}) || _class$1h) || _class$1h);
|
|
148
148
|
|
|
149
149
|
function _applyDecoratedDescriptor(i, e, r, n, l) {
|
|
150
150
|
var a = {};
|
|
@@ -163,251 +163,251 @@ function _initializerDefineProperty(e, i, r, l) {
|
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
var _dec$
|
|
167
|
-
let EntityCategory = (_dec$
|
|
166
|
+
var _dec$1g, _dec2$1g, _dec3$A, _dec4$A, _dec5$w, _dec6$v, _class$1g, _class2$A, _descriptor$g, _descriptor2$c;
|
|
167
|
+
let EntityCategory = (_dec$1g = Entity('testVonaCategory'), _dec2$1g = BeanInfo({
|
|
168
168
|
module: "test-vona"
|
|
169
|
-
}), _dec3$
|
|
169
|
+
}), _dec3$A = Api.field(), _dec4$A = Reflect.metadata("design:type", String), _dec5$w = Api.field(v.optional(), v.tableIdentity()), _dec6$v = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$1g(_class$1g = _dec2$1g(_class$1g = (_class2$A = class EntityCategory extends EntityBase {
|
|
170
170
|
constructor(...args) {
|
|
171
171
|
super(...args);
|
|
172
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
172
|
+
_initializerDefineProperty(this, "name", _descriptor$g, this);
|
|
173
173
|
_initializerDefineProperty(this, "categoryIdParent", _descriptor2$c, this);
|
|
174
174
|
}
|
|
175
|
-
}, _descriptor$
|
|
175
|
+
}, _descriptor$g = _applyDecoratedDescriptor(_class2$A.prototype, "name", [_dec3$A, _dec4$A], {
|
|
176
176
|
configurable: true,
|
|
177
177
|
enumerable: true,
|
|
178
178
|
writable: true,
|
|
179
179
|
initializer: null
|
|
180
|
-
}), _descriptor2$c = _applyDecoratedDescriptor(_class2$
|
|
180
|
+
}), _descriptor2$c = _applyDecoratedDescriptor(_class2$A.prototype, "categoryIdParent", [_dec5$w, _dec6$v], {
|
|
181
181
|
configurable: true,
|
|
182
182
|
enumerable: true,
|
|
183
183
|
writable: true,
|
|
184
184
|
initializer: null
|
|
185
|
-
}), _class2$
|
|
185
|
+
}), _class2$A)) || _class$1g) || _class$1g);
|
|
186
186
|
|
|
187
|
-
var _dec$
|
|
188
|
-
let EntityOrder = (_dec$
|
|
187
|
+
var _dec$1f, _dec2$1f, _dec3$z, _dec4$z, _dec5$v, _dec6$u, _dec7$q, _dec8$m, _class$1f, _class2$z, _descriptor$f, _descriptor2$b, _descriptor3$7;
|
|
188
|
+
let EntityOrder = (_dec$1f = Entity('testVonaOrder', {
|
|
189
189
|
openapi: {
|
|
190
190
|
title: $locale('Order')
|
|
191
191
|
}
|
|
192
|
-
}), _dec2$
|
|
192
|
+
}), _dec2$1f = BeanInfo({
|
|
193
193
|
module: "test-vona"
|
|
194
|
-
}), _dec3$
|
|
194
|
+
}), _dec3$z = Api.field(v.openapi({
|
|
195
195
|
title: $locale('OrderNo')
|
|
196
|
-
}), v.default(''), v.min(3)), _dec4$
|
|
196
|
+
}), v.default(''), v.min(3)), _dec4$z = Reflect.metadata("design:type", String), _dec5$v = Api.field(v.openapi({
|
|
197
197
|
title: $locale('Remark')
|
|
198
|
-
}), v.optional()), _dec6$u = Reflect.metadata("design:type", String), _dec7$q = Api.field(v.tableIdentity()), _dec8$m = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$
|
|
198
|
+
}), v.optional()), _dec6$u = Reflect.metadata("design:type", String), _dec7$q = Api.field(v.tableIdentity()), _dec8$m = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$1f(_class$1f = _dec2$1f(_class$1f = (_class2$z = class EntityOrder extends EntityBase {
|
|
199
199
|
constructor(...args) {
|
|
200
200
|
super(...args);
|
|
201
|
-
_initializerDefineProperty(this, "orderNo", _descriptor$
|
|
201
|
+
_initializerDefineProperty(this, "orderNo", _descriptor$f, this);
|
|
202
202
|
_initializerDefineProperty(this, "remark", _descriptor2$b, this);
|
|
203
203
|
_initializerDefineProperty(this, "userId", _descriptor3$7, this);
|
|
204
204
|
}
|
|
205
|
-
}, _descriptor$
|
|
205
|
+
}, _descriptor$f = _applyDecoratedDescriptor(_class2$z.prototype, "orderNo", [_dec3$z, _dec4$z], {
|
|
206
206
|
configurable: true,
|
|
207
207
|
enumerable: true,
|
|
208
208
|
writable: true,
|
|
209
209
|
initializer: null
|
|
210
|
-
}), _descriptor2$b = _applyDecoratedDescriptor(_class2$
|
|
210
|
+
}), _descriptor2$b = _applyDecoratedDescriptor(_class2$z.prototype, "remark", [_dec5$v, _dec6$u], {
|
|
211
211
|
configurable: true,
|
|
212
212
|
enumerable: true,
|
|
213
213
|
writable: true,
|
|
214
214
|
initializer: null
|
|
215
|
-
}), _descriptor3$7 = _applyDecoratedDescriptor(_class2$
|
|
215
|
+
}), _descriptor3$7 = _applyDecoratedDescriptor(_class2$z.prototype, "userId", [_dec7$q, _dec8$m], {
|
|
216
216
|
configurable: true,
|
|
217
217
|
enumerable: true,
|
|
218
218
|
writable: true,
|
|
219
219
|
initializer: null
|
|
220
|
-
}), _class2$
|
|
220
|
+
}), _class2$z)) || _class$1f) || _class$1f);
|
|
221
221
|
|
|
222
|
-
var _dec$
|
|
223
|
-
let EntityPost = (_dec$
|
|
222
|
+
var _dec$1e, _dec2$1e, _dec3$y, _dec4$y, _dec5$u, _dec6$t, _dec7$p, _dec8$l, _class$1e, _class2$y, _descriptor$e, _descriptor2$a, _descriptor3$6;
|
|
223
|
+
let EntityPost = (_dec$1e = Entity('testVonaPost'), _dec2$1e = BeanInfo({
|
|
224
224
|
module: "test-vona"
|
|
225
|
-
}), _dec3$
|
|
225
|
+
}), _dec3$y = Api.field(), _dec4$y = Reflect.metadata("design:type", String), _dec5$u = Api.field(v.tableIdentity()), _dec6$t = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec7$p = Api.field(v.optional()), _dec8$l = Reflect.metadata("design:type", Number), _dec$1e(_class$1e = _dec2$1e(_class$1e = (_class2$y = class EntityPost extends EntityBase {
|
|
226
226
|
constructor(...args) {
|
|
227
227
|
super(...args);
|
|
228
|
-
_initializerDefineProperty(this, "title", _descriptor$
|
|
228
|
+
_initializerDefineProperty(this, "title", _descriptor$e, this);
|
|
229
229
|
_initializerDefineProperty(this, "userId", _descriptor2$a, this);
|
|
230
230
|
_initializerDefineProperty(this, "stars", _descriptor3$6, this);
|
|
231
231
|
}
|
|
232
|
-
}, _descriptor$
|
|
232
|
+
}, _descriptor$e = _applyDecoratedDescriptor(_class2$y.prototype, "title", [_dec3$y, _dec4$y], {
|
|
233
233
|
configurable: true,
|
|
234
234
|
enumerable: true,
|
|
235
235
|
writable: true,
|
|
236
236
|
initializer: null
|
|
237
|
-
}), _descriptor2$a = _applyDecoratedDescriptor(_class2$
|
|
237
|
+
}), _descriptor2$a = _applyDecoratedDescriptor(_class2$y.prototype, "userId", [_dec5$u, _dec6$t], {
|
|
238
238
|
configurable: true,
|
|
239
239
|
enumerable: true,
|
|
240
240
|
writable: true,
|
|
241
241
|
initializer: null
|
|
242
|
-
}), _descriptor3$6 = _applyDecoratedDescriptor(_class2$
|
|
242
|
+
}), _descriptor3$6 = _applyDecoratedDescriptor(_class2$y.prototype, "stars", [_dec7$p, _dec8$l], {
|
|
243
243
|
configurable: true,
|
|
244
244
|
enumerable: true,
|
|
245
245
|
writable: true,
|
|
246
246
|
initializer: null
|
|
247
|
-
}), _class2$
|
|
247
|
+
}), _class2$y)) || _class$1e) || _class$1e);
|
|
248
248
|
|
|
249
|
-
var _dec$
|
|
250
|
-
let EntityPostContent = (_dec$
|
|
249
|
+
var _dec$1d, _dec2$1d, _dec3$x, _dec4$x, _dec5$t, _dec6$s, _class$1d, _class2$x, _descriptor$d, _descriptor2$9;
|
|
250
|
+
let EntityPostContent = (_dec$1d = Entity('testVonaPostContent'), _dec2$1d = BeanInfo({
|
|
251
251
|
module: "test-vona"
|
|
252
|
-
}), _dec3$
|
|
252
|
+
}), _dec3$x = Api.field(), _dec4$x = Reflect.metadata("design:type", String), _dec5$t = Api.field(v.tableIdentity()), _dec6$s = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$1d(_class$1d = _dec2$1d(_class$1d = (_class2$x = class EntityPostContent extends EntityBase {
|
|
253
253
|
constructor(...args) {
|
|
254
254
|
super(...args);
|
|
255
|
-
_initializerDefineProperty(this, "content", _descriptor$
|
|
255
|
+
_initializerDefineProperty(this, "content", _descriptor$d, this);
|
|
256
256
|
_initializerDefineProperty(this, "postId", _descriptor2$9, this);
|
|
257
257
|
}
|
|
258
|
-
}, _descriptor$
|
|
258
|
+
}, _descriptor$d = _applyDecoratedDescriptor(_class2$x.prototype, "content", [_dec3$x, _dec4$x], {
|
|
259
259
|
configurable: true,
|
|
260
260
|
enumerable: true,
|
|
261
261
|
writable: true,
|
|
262
262
|
initializer: null
|
|
263
|
-
}), _descriptor2$9 = _applyDecoratedDescriptor(_class2$
|
|
263
|
+
}), _descriptor2$9 = _applyDecoratedDescriptor(_class2$x.prototype, "postId", [_dec5$t, _dec6$s], {
|
|
264
264
|
configurable: true,
|
|
265
265
|
enumerable: true,
|
|
266
266
|
writable: true,
|
|
267
267
|
initializer: null
|
|
268
|
-
}), _class2$
|
|
268
|
+
}), _class2$x)) || _class$1d) || _class$1d);
|
|
269
269
|
|
|
270
|
-
var _dec$
|
|
271
|
-
let EntityProduct = (_dec$
|
|
270
|
+
var _dec$1c, _dec2$1c, _dec3$w, _dec4$w, _dec5$s, _dec6$r, _dec7$o, _dec8$k, _dec9$c, _dec0$c, _dec1$c, _dec10$a, _class$1c, _class2$w, _descriptor$c, _descriptor2$8, _descriptor3$5, _descriptor4, _descriptor5;
|
|
271
|
+
let EntityProduct = (_dec$1c = Entity('testVonaProduct', {
|
|
272
272
|
independent: true
|
|
273
|
-
}), _dec2$
|
|
273
|
+
}), _dec2$1c = BeanInfo({
|
|
274
274
|
module: "test-vona"
|
|
275
|
-
}), _dec3$
|
|
275
|
+
}), _dec3$w = Api.field(v.openapi({
|
|
276
276
|
title: $locale('Name')
|
|
277
|
-
})), _dec4$
|
|
277
|
+
})), _dec4$w = Reflect.metadata("design:type", String), _dec5$s = Api.field(v.title($locale('Price'))), _dec6$r = Reflect.metadata("design:type", Number), _dec7$o = Api.field(v.title($locale('Quantity'))), _dec8$k = Reflect.metadata("design:type", Number), _dec9$c = Api.field(v.title($locale('Amount'))), _dec0$c = Reflect.metadata("design:type", Number), _dec1$c = Api.field(v.tableIdentity()), _dec10$a = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$1c(_class$1c = _dec2$1c(_class$1c = (_class2$w = class EntityProduct extends EntityBase {
|
|
278
278
|
constructor(...args) {
|
|
279
279
|
super(...args);
|
|
280
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
280
|
+
_initializerDefineProperty(this, "name", _descriptor$c, this);
|
|
281
281
|
_initializerDefineProperty(this, "price", _descriptor2$8, this);
|
|
282
282
|
_initializerDefineProperty(this, "quantity", _descriptor3$5, this);
|
|
283
283
|
_initializerDefineProperty(this, "amount", _descriptor4, this);
|
|
284
284
|
_initializerDefineProperty(this, "orderId", _descriptor5, this);
|
|
285
285
|
}
|
|
286
|
-
}, _descriptor$
|
|
286
|
+
}, _descriptor$c = _applyDecoratedDescriptor(_class2$w.prototype, "name", [_dec3$w, _dec4$w], {
|
|
287
287
|
configurable: true,
|
|
288
288
|
enumerable: true,
|
|
289
289
|
writable: true,
|
|
290
290
|
initializer: null
|
|
291
|
-
}), _descriptor2$8 = _applyDecoratedDescriptor(_class2$
|
|
291
|
+
}), _descriptor2$8 = _applyDecoratedDescriptor(_class2$w.prototype, "price", [_dec5$s, _dec6$r], {
|
|
292
292
|
configurable: true,
|
|
293
293
|
enumerable: true,
|
|
294
294
|
writable: true,
|
|
295
295
|
initializer: null
|
|
296
|
-
}), _descriptor3$5 = _applyDecoratedDescriptor(_class2$
|
|
296
|
+
}), _descriptor3$5 = _applyDecoratedDescriptor(_class2$w.prototype, "quantity", [_dec7$o, _dec8$k], {
|
|
297
297
|
configurable: true,
|
|
298
298
|
enumerable: true,
|
|
299
299
|
writable: true,
|
|
300
300
|
initializer: null
|
|
301
|
-
}), _descriptor4 = _applyDecoratedDescriptor(_class2$
|
|
301
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2$w.prototype, "amount", [_dec9$c, _dec0$c], {
|
|
302
302
|
configurable: true,
|
|
303
303
|
enumerable: true,
|
|
304
304
|
writable: true,
|
|
305
305
|
initializer: null
|
|
306
|
-
}), _descriptor5 = _applyDecoratedDescriptor(_class2$
|
|
306
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2$w.prototype, "orderId", [_dec1$c, _dec10$a], {
|
|
307
307
|
configurable: true,
|
|
308
308
|
enumerable: true,
|
|
309
309
|
writable: true,
|
|
310
310
|
initializer: null
|
|
311
|
-
}), _class2$
|
|
311
|
+
}), _class2$w)) || _class$1c) || _class$1c);
|
|
312
312
|
|
|
313
|
-
var _dec$
|
|
314
|
-
let EntityRole = (_dec$
|
|
313
|
+
var _dec$1b, _dec2$1b, _dec3$v, _dec4$v, _class$1b, _class2$v, _descriptor$b;
|
|
314
|
+
let EntityRole = (_dec$1b = Entity('testVonaRole'), _dec2$1b = BeanInfo({
|
|
315
315
|
module: "test-vona"
|
|
316
|
-
}), _dec3$
|
|
316
|
+
}), _dec3$v = Api.field(), _dec4$v = Reflect.metadata("design:type", String), _dec$1b(_class$1b = _dec2$1b(_class$1b = (_class2$v = class EntityRole extends EntityBase {
|
|
317
317
|
constructor(...args) {
|
|
318
318
|
super(...args);
|
|
319
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
319
|
+
_initializerDefineProperty(this, "name", _descriptor$b, this);
|
|
320
320
|
}
|
|
321
|
-
}, _descriptor$
|
|
321
|
+
}, _descriptor$b = _applyDecoratedDescriptor(_class2$v.prototype, "name", [_dec3$v, _dec4$v], {
|
|
322
322
|
configurable: true,
|
|
323
323
|
enumerable: true,
|
|
324
324
|
writable: true,
|
|
325
325
|
initializer: null
|
|
326
|
-
}), _class2$
|
|
326
|
+
}), _class2$v)) || _class$1b) || _class$1b);
|
|
327
327
|
|
|
328
|
-
var _dec$
|
|
329
|
-
let EntityRoleUser = (_dec$
|
|
328
|
+
var _dec$1a, _dec2$1a, _dec3$u, _dec4$u, _dec5$r, _dec6$q, _class$1a, _class2$u, _descriptor$a, _descriptor2$7;
|
|
329
|
+
let EntityRoleUser = (_dec$1a = Entity('testVonaRoleUser'), _dec2$1a = BeanInfo({
|
|
330
330
|
module: "test-vona"
|
|
331
|
-
}), _dec3$
|
|
331
|
+
}), _dec3$u = Api.field(v.tableIdentity()), _dec4$u = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec5$r = Api.field(v.tableIdentity()), _dec6$q = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$1a(_class$1a = _dec2$1a(_class$1a = (_class2$u = class EntityRoleUser extends EntityBase {
|
|
332
332
|
constructor(...args) {
|
|
333
333
|
super(...args);
|
|
334
|
-
_initializerDefineProperty(this, "userId", _descriptor$
|
|
334
|
+
_initializerDefineProperty(this, "userId", _descriptor$a, this);
|
|
335
335
|
_initializerDefineProperty(this, "roleId", _descriptor2$7, this);
|
|
336
336
|
}
|
|
337
|
-
}, _descriptor$
|
|
337
|
+
}, _descriptor$a = _applyDecoratedDescriptor(_class2$u.prototype, "userId", [_dec3$u, _dec4$u], {
|
|
338
338
|
configurable: true,
|
|
339
339
|
enumerable: true,
|
|
340
340
|
writable: true,
|
|
341
341
|
initializer: null
|
|
342
|
-
}), _descriptor2$7 = _applyDecoratedDescriptor(_class2$
|
|
342
|
+
}), _descriptor2$7 = _applyDecoratedDescriptor(_class2$u.prototype, "roleId", [_dec5$r, _dec6$q], {
|
|
343
343
|
configurable: true,
|
|
344
344
|
enumerable: true,
|
|
345
345
|
writable: true,
|
|
346
346
|
initializer: null
|
|
347
|
-
}), _class2$
|
|
347
|
+
}), _class2$u)) || _class$1a) || _class$1a);
|
|
348
348
|
|
|
349
|
-
var _dec$
|
|
350
|
-
let EntityTest = (_dec$
|
|
349
|
+
var _dec$19, _dec2$19, _dec3$t, _dec4$t, _dec5$q, _dec6$p, _dec7$n, _dec8$j, _class$19, _class2$t, _descriptor$9, _descriptor2$6, _descriptor3$4;
|
|
350
|
+
let EntityTest = (_dec$19 = Entity('testVonaTest', {
|
|
351
351
|
openapi: {
|
|
352
352
|
title: $locale('Test')
|
|
353
353
|
}
|
|
354
|
-
}), _dec2$
|
|
354
|
+
}), _dec2$19 = BeanInfo({
|
|
355
355
|
module: "test-vona"
|
|
356
|
-
}), _dec3$
|
|
356
|
+
}), _dec3$t = Api.field(v.title($locale('Test'))), _dec4$t = Reflect.metadata("design:type", String), _dec5$q = Api.field(), _dec6$p = Reflect.metadata("design:type", String), _dec7$n = Api.field(v.default(() => {
|
|
357
357
|
return new Date();
|
|
358
|
-
})), _dec8$j = Reflect.metadata("design:type", typeof Date === "undefined" ? Object : Date), _dec$
|
|
358
|
+
})), _dec8$j = Reflect.metadata("design:type", typeof Date === "undefined" ? Object : Date), _dec$19(_class$19 = _dec2$19(_class$19 = (_class2$t = class EntityTest extends EntityBase {
|
|
359
359
|
constructor(...args) {
|
|
360
360
|
super(...args);
|
|
361
|
-
_initializerDefineProperty(this, "title", _descriptor$
|
|
361
|
+
_initializerDefineProperty(this, "title", _descriptor$9, this);
|
|
362
362
|
_initializerDefineProperty(this, "description", _descriptor2$6, this);
|
|
363
363
|
_initializerDefineProperty(this, "testDate", _descriptor3$4, this);
|
|
364
364
|
}
|
|
365
|
-
}, _descriptor$
|
|
365
|
+
}, _descriptor$9 = _applyDecoratedDescriptor(_class2$t.prototype, "title", [_dec3$t, _dec4$t], {
|
|
366
366
|
configurable: true,
|
|
367
367
|
enumerable: true,
|
|
368
368
|
writable: true,
|
|
369
369
|
initializer: null
|
|
370
|
-
}), _descriptor2$6 = _applyDecoratedDescriptor(_class2$
|
|
370
|
+
}), _descriptor2$6 = _applyDecoratedDescriptor(_class2$t.prototype, "description", [_dec5$q, _dec6$p], {
|
|
371
371
|
configurable: true,
|
|
372
372
|
enumerable: true,
|
|
373
373
|
writable: true,
|
|
374
374
|
initializer: null
|
|
375
|
-
}), _descriptor3$4 = _applyDecoratedDescriptor(_class2$
|
|
375
|
+
}), _descriptor3$4 = _applyDecoratedDescriptor(_class2$t.prototype, "testDate", [_dec7$n, _dec8$j], {
|
|
376
376
|
configurable: true,
|
|
377
377
|
enumerable: true,
|
|
378
378
|
writable: true,
|
|
379
379
|
initializer: null
|
|
380
|
-
}), _class2$
|
|
380
|
+
}), _class2$t)) || _class$19) || _class$19);
|
|
381
381
|
|
|
382
|
-
var _dec$
|
|
383
|
-
let EntityUser = (_dec$
|
|
382
|
+
var _dec$18, _dec2$18, _dec3$s, _dec4$s, _dec5$p, _dec6$o, _dec7$m, _dec8$i, _class$18, _class2$s, _descriptor$8, _descriptor2$5, _descriptor3$3;
|
|
383
|
+
let EntityUser = (_dec$18 = Entity('testVonaUser'), _dec2$18 = BeanInfo({
|
|
384
384
|
module: "test-vona"
|
|
385
|
-
}), _dec3$
|
|
385
|
+
}), _dec3$s = Api.field(), _dec4$s = Reflect.metadata("design:type", String), _dec5$p = Api.field(v.optional()), _dec6$o = Reflect.metadata("design:type", Number), _dec7$m = Api.field(v.optional()), _dec8$i = Reflect.metadata("design:type", Number), _dec$18(_class$18 = _dec2$18(_class$18 = (_class2$s = class EntityUser extends EntityBase {
|
|
386
386
|
constructor(...args) {
|
|
387
387
|
super(...args);
|
|
388
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
388
|
+
_initializerDefineProperty(this, "name", _descriptor$8, this);
|
|
389
389
|
_initializerDefineProperty(this, "age", _descriptor2$5, this);
|
|
390
390
|
_initializerDefineProperty(this, "scores", _descriptor3$3, this);
|
|
391
391
|
}
|
|
392
|
-
}, _descriptor$
|
|
392
|
+
}, _descriptor$8 = _applyDecoratedDescriptor(_class2$s.prototype, "name", [_dec3$s, _dec4$s], {
|
|
393
393
|
configurable: true,
|
|
394
394
|
enumerable: true,
|
|
395
395
|
writable: true,
|
|
396
396
|
initializer: null
|
|
397
|
-
}), _descriptor2$5 = _applyDecoratedDescriptor(_class2$
|
|
397
|
+
}), _descriptor2$5 = _applyDecoratedDescriptor(_class2$s.prototype, "age", [_dec5$p, _dec6$o], {
|
|
398
398
|
configurable: true,
|
|
399
399
|
enumerable: true,
|
|
400
400
|
writable: true,
|
|
401
401
|
initializer: null
|
|
402
|
-
}), _descriptor3$3 = _applyDecoratedDescriptor(_class2$
|
|
402
|
+
}), _descriptor3$3 = _applyDecoratedDescriptor(_class2$s.prototype, "scores", [_dec7$m, _dec8$i], {
|
|
403
403
|
configurable: true,
|
|
404
404
|
enumerable: true,
|
|
405
405
|
writable: true,
|
|
406
406
|
initializer: null
|
|
407
|
-
}), _class2$
|
|
407
|
+
}), _class2$s)) || _class$18) || _class$18);
|
|
408
408
|
|
|
409
|
-
var _dec$
|
|
410
|
-
let ModelCategory = (_dec$
|
|
409
|
+
var _dec$17, _dec2$17, _class$17;
|
|
410
|
+
let ModelCategory = (_dec$17 = Model({
|
|
411
411
|
entity: EntityCategory,
|
|
412
412
|
relations: {
|
|
413
413
|
children: $relation.hasMany(() => ModelCategory, 'categoryIdParent', {
|
|
@@ -418,12 +418,12 @@ let ModelCategory = (_dec$15 = Model({
|
|
|
418
418
|
cache: {
|
|
419
419
|
modelsClear: () => ModelCategoryChain$1
|
|
420
420
|
}
|
|
421
|
-
}), _dec2$
|
|
421
|
+
}), _dec2$17 = BeanInfo({
|
|
422
422
|
module: "test-vona"
|
|
423
|
-
}), _dec$
|
|
423
|
+
}), _dec$17(_class$17 = _dec2$17(_class$17 = class ModelCategory extends BeanModelBase {}) || _class$17) || _class$17);
|
|
424
424
|
|
|
425
|
-
var _dec$
|
|
426
|
-
let ModelCategoryChain = (_dec$
|
|
425
|
+
var _dec$16, _dec2$16, _class$16;
|
|
426
|
+
let ModelCategoryChain = (_dec$16 = Model({
|
|
427
427
|
entity: EntityCategory,
|
|
428
428
|
relations: {
|
|
429
429
|
parent: $relation.belongsTo(() => ModelCategoryChain, () => ModelCategoryChain, 'categoryIdParent', {
|
|
@@ -431,19 +431,19 @@ let ModelCategoryChain = (_dec$14 = Model({
|
|
|
431
431
|
columns: ['id', 'name', 'categoryIdParent']
|
|
432
432
|
})
|
|
433
433
|
}
|
|
434
|
-
}), _dec2$
|
|
434
|
+
}), _dec2$16 = BeanInfo({
|
|
435
435
|
module: "test-vona"
|
|
436
|
-
}), _dec$
|
|
436
|
+
}), _dec$16(_class$16 = _dec2$16(_class$16 = class ModelCategoryChain extends BeanModelBase {}) || _class$16) || _class$16);
|
|
437
437
|
|
|
438
|
-
var _dec$
|
|
439
|
-
let ModelProduct = (_dec$
|
|
438
|
+
var _dec$15, _dec2$15, _class$15;
|
|
439
|
+
let ModelProduct = (_dec$15 = Model({
|
|
440
440
|
entity: EntityProduct
|
|
441
|
-
}), _dec2$
|
|
441
|
+
}), _dec2$15 = BeanInfo({
|
|
442
442
|
module: "test-vona"
|
|
443
|
-
}), _dec$
|
|
443
|
+
}), _dec$15(_class$15 = _dec2$15(_class$15 = class ModelProduct extends BeanModelBase {}) || _class$15) || _class$15);
|
|
444
444
|
|
|
445
|
-
var _dec$
|
|
446
|
-
let ModelOrderStats = (_dec$
|
|
445
|
+
var _dec$14, _dec2$14, _class$14;
|
|
446
|
+
let ModelOrderStats = (_dec$14 = Model({
|
|
447
447
|
entity: EntityOrder,
|
|
448
448
|
relations: {
|
|
449
449
|
productStats: $relation.hasMany(() => ModelProduct, 'orderId', {
|
|
@@ -461,12 +461,12 @@ let ModelOrderStats = (_dec$12 = Model({
|
|
|
461
461
|
}
|
|
462
462
|
})
|
|
463
463
|
}
|
|
464
|
-
}), _dec2$
|
|
464
|
+
}), _dec2$14 = BeanInfo({
|
|
465
465
|
module: "test-vona"
|
|
466
|
-
}), _dec$
|
|
466
|
+
}), _dec$14(_class$14 = _dec2$14(_class$14 = class ModelOrderStats extends BeanModelBase {}) || _class$14) || _class$14);
|
|
467
467
|
|
|
468
|
-
var _dec$
|
|
469
|
-
let ModelPostContent = (_dec$
|
|
468
|
+
var _dec$13, _dec2$13, _class$13;
|
|
469
|
+
let ModelPostContent = (_dec$13 = Model({
|
|
470
470
|
entity: EntityPostContent,
|
|
471
471
|
relations: {
|
|
472
472
|
post: $relation.belongsTo(() => ModelPostContent, () => ModelPost, 'postId')
|
|
@@ -474,12 +474,12 @@ let ModelPostContent = (_dec$11 = Model({
|
|
|
474
474
|
cache: {
|
|
475
475
|
modelsClear: () => ModelPost
|
|
476
476
|
}
|
|
477
|
-
}), _dec2$
|
|
477
|
+
}), _dec2$13 = BeanInfo({
|
|
478
478
|
module: "test-vona"
|
|
479
|
-
}), _dec$
|
|
479
|
+
}), _dec$13(_class$13 = _dec2$13(_class$13 = class ModelPostContent extends BeanModelBase {}) || _class$13) || _class$13);
|
|
480
480
|
|
|
481
|
-
var _dec$
|
|
482
|
-
let ModelPost = (_dec$
|
|
481
|
+
var _dec$12, _dec2$12, _class$12;
|
|
482
|
+
let ModelPost = (_dec$12 = Model({
|
|
483
483
|
entity: EntityPost,
|
|
484
484
|
relations: {
|
|
485
485
|
postContent: $relation.hasOne(ModelPostContent, 'postId', {
|
|
@@ -490,12 +490,12 @@ let ModelPost = (_dec$10 = Model({
|
|
|
490
490
|
columns: ['id', 'name']
|
|
491
491
|
})
|
|
492
492
|
}
|
|
493
|
-
}), _dec2$
|
|
493
|
+
}), _dec2$12 = BeanInfo({
|
|
494
494
|
module: "test-vona"
|
|
495
|
-
}), _dec$
|
|
495
|
+
}), _dec$12(_class$12 = _dec2$12(_class$12 = class ModelPost extends BeanModelBase {}) || _class$12) || _class$12);
|
|
496
496
|
|
|
497
|
-
var _dec
|
|
498
|
-
let ModelUserStats = (_dec
|
|
497
|
+
var _dec$11, _dec2$11, _class$11;
|
|
498
|
+
let ModelUserStats = (_dec$11 = Model({
|
|
499
499
|
entity: EntityUser,
|
|
500
500
|
relations: {
|
|
501
501
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -511,12 +511,12 @@ let ModelUserStats = (_dec$$ = Model({
|
|
|
511
511
|
}
|
|
512
512
|
})
|
|
513
513
|
}
|
|
514
|
-
}), _dec2
|
|
514
|
+
}), _dec2$11 = BeanInfo({
|
|
515
515
|
module: "test-vona"
|
|
516
|
-
}), _dec
|
|
516
|
+
}), _dec$11(_class$11 = _dec2$11(_class$11 = class ModelUserStats extends BeanModelBase {}) || _class$11) || _class$11);
|
|
517
517
|
|
|
518
|
-
var _dec$
|
|
519
|
-
let ModelUserStatsGroup = (_dec$
|
|
518
|
+
var _dec$10, _dec2$10, _class$10;
|
|
519
|
+
let ModelUserStatsGroup = (_dec$10 = Model({
|
|
520
520
|
entity: EntityUser,
|
|
521
521
|
relations: {
|
|
522
522
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -536,12 +536,12 @@ let ModelUserStatsGroup = (_dec$_ = Model({
|
|
|
536
536
|
orders: [['name', 'asc']]
|
|
537
537
|
}, undefined, true)
|
|
538
538
|
}
|
|
539
|
-
}), _dec2$
|
|
539
|
+
}), _dec2$10 = BeanInfo({
|
|
540
540
|
module: "test-vona"
|
|
541
|
-
}), _dec$
|
|
541
|
+
}), _dec$10(_class$10 = _dec2$10(_class$10 = class ModelUserStatsGroup extends BeanModelBase {}) || _class$10) || _class$10);
|
|
542
542
|
|
|
543
|
-
var _dec
|
|
544
|
-
let ModelUser = (_dec
|
|
543
|
+
var _dec$$, _dec2$$, _class$$;
|
|
544
|
+
let ModelUser = (_dec$$ = Model({
|
|
545
545
|
entity: EntityUser,
|
|
546
546
|
relations: {
|
|
547
547
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -554,12 +554,12 @@ let ModelUser = (_dec$Z = Model({
|
|
|
554
554
|
cache: {
|
|
555
555
|
modelsClear: [() => ModelUserStats, () => ModelUserStatsGroup]
|
|
556
556
|
}
|
|
557
|
-
}), _dec2
|
|
557
|
+
}), _dec2$$ = BeanInfo({
|
|
558
558
|
module: "test-vona"
|
|
559
|
-
}), _dec
|
|
559
|
+
}), _dec$$(_class$$ = _dec2$$(_class$$ = class ModelUser extends BeanModelBase {}) || _class$$) || _class$$);
|
|
560
560
|
|
|
561
|
-
var _dec$
|
|
562
|
-
let ModelOrder = (_dec$
|
|
561
|
+
var _dec$_, _dec2$_, _class$_;
|
|
562
|
+
let ModelOrder = (_dec$_ = Model({
|
|
563
563
|
entity: EntityOrder,
|
|
564
564
|
relations: {
|
|
565
565
|
user: $relation.belongsTo(() => ModelOrder, () => ModelUser, 'userId', {
|
|
@@ -574,39 +574,39 @@ let ModelOrder = (_dec$Y = Model({
|
|
|
574
574
|
cache: {
|
|
575
575
|
modelsClear: () => ModelOrderStats
|
|
576
576
|
}
|
|
577
|
-
}), _dec2$
|
|
577
|
+
}), _dec2$_ = BeanInfo({
|
|
578
578
|
module: "test-vona"
|
|
579
|
-
}), _dec$
|
|
579
|
+
}), _dec$_(_class$_ = _dec2$_(_class$_ = class ModelOrder extends BeanModelBase {}) || _class$_) || _class$_);
|
|
580
580
|
|
|
581
|
-
var _dec$
|
|
582
|
-
let ModelRoleUser = (_dec$
|
|
581
|
+
var _dec$Z, _dec2$Z, _class$Z;
|
|
582
|
+
let ModelRoleUser = (_dec$Z = Model({
|
|
583
583
|
entity: EntityRoleUser
|
|
584
|
-
}), _dec2$
|
|
584
|
+
}), _dec2$Z = BeanInfo({
|
|
585
585
|
module: "test-vona"
|
|
586
|
-
}), _dec$
|
|
586
|
+
}), _dec$Z(_class$Z = _dec2$Z(_class$Z = class ModelRoleUser extends BeanModelBase {}) || _class$Z) || _class$Z);
|
|
587
587
|
|
|
588
|
-
var _dec$
|
|
589
|
-
let ModelRole = (_dec$
|
|
588
|
+
var _dec$Y, _dec2$Y, _class$Y;
|
|
589
|
+
let ModelRole = (_dec$Y = Model({
|
|
590
590
|
entity: EntityRole,
|
|
591
591
|
relations: {
|
|
592
592
|
users: $relation.belongsToMany(() => ModelRoleUser, () => ModelUser, 'roleId', 'userId', {
|
|
593
593
|
columns: ['id', 'name']
|
|
594
594
|
})
|
|
595
595
|
}
|
|
596
|
-
}), _dec2$
|
|
596
|
+
}), _dec2$Y = BeanInfo({
|
|
597
597
|
module: "test-vona"
|
|
598
|
-
}), _dec$
|
|
598
|
+
}), _dec$Y(_class$Y = _dec2$Y(_class$Y = class ModelRole extends BeanModelBase {}) || _class$Y) || _class$Y);
|
|
599
599
|
|
|
600
|
-
var _dec$
|
|
601
|
-
let ModelTest = (_dec$
|
|
600
|
+
var _dec$X, _dec2$X, _class$X;
|
|
601
|
+
let ModelTest = (_dec$X = Model({
|
|
602
602
|
entity: EntityTest,
|
|
603
603
|
client: 'default'
|
|
604
|
-
}), _dec2$
|
|
604
|
+
}), _dec2$X = BeanInfo({
|
|
605
605
|
module: "test-vona"
|
|
606
|
-
}), _dec$
|
|
606
|
+
}), _dec$X(_class$X = _dec2$X(_class$X = class ModelTest extends BeanModelBase {}) || _class$X) || _class$X);
|
|
607
607
|
|
|
608
|
-
var _dec$
|
|
609
|
-
let ModelTestDynamicTable = (_dec$
|
|
608
|
+
var _dec$W, _dec2$W, _class$W;
|
|
609
|
+
let ModelTestDynamicTable = (_dec$W = Model({
|
|
610
610
|
entity: EntityTest,
|
|
611
611
|
table(ctx, defaultTable) {
|
|
612
612
|
if (ctx.instanceName !== '') return defaultTable;
|
|
@@ -617,11 +617,11 @@ let ModelTestDynamicTable = (_dec$U = Model({
|
|
|
617
617
|
// do nothing
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
|
-
}), _dec2$
|
|
620
|
+
}), _dec2$W = BeanInfo({
|
|
621
621
|
module: "test-vona"
|
|
622
|
-
}), _dec$
|
|
622
|
+
}), _dec$W(_class$W = _dec2$W(_class$W = class ModelTestDynamicTable extends BeanModelBase {}) || _class$W) || _class$W);
|
|
623
623
|
|
|
624
|
-
var _dec$
|
|
624
|
+
var _dec$V, _dec2$V, _class$V;
|
|
625
625
|
class TestCtx0 extends BeanBase {
|
|
626
626
|
constructor(...args) {
|
|
627
627
|
super(...args);
|
|
@@ -683,20 +683,20 @@ class TestCtx1 extends TestCtx0 {
|
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
|
-
let BeanTestCtx = (_dec$
|
|
686
|
+
let BeanTestCtx = (_dec$V = Bean(), _dec2$V = BeanInfo({
|
|
687
687
|
module: "test-vona"
|
|
688
|
-
}), _dec$
|
|
688
|
+
}), _dec$V(_class$V = _dec2$V(_class$V = class BeanTestCtx extends TestCtx1 {}) || _class$V) || _class$V);
|
|
689
689
|
|
|
690
|
-
var _dec$
|
|
691
|
-
let ServiceAopMethodBase = (_dec$
|
|
690
|
+
var _dec$U, _dec2$U, _dec3$r, _dec4$r, _class$U, _dec5$o, _dec6$n, _dec7$l, _dec8$h, _dec9$b, _dec0$b, _dec1$b, _dec10$9, _dec11$9, _dec12$9, _dec13$8, _dec14$7, _dec15$7, _dec16$6, _class2$r, _class3;
|
|
691
|
+
let ServiceAopMethodBase = (_dec$U = Aspect.aopMethod('test-vona:test', {
|
|
692
692
|
wrapper: '+'
|
|
693
|
-
}), _dec2$
|
|
693
|
+
}), _dec2$U = Aspect.aopMethod('test-vona:test', {
|
|
694
694
|
wrapper: '-'
|
|
695
|
-
}), _dec3$
|
|
695
|
+
}), _dec3$r = Reflect.metadata("design:type", Function), _dec4$r = Reflect.metadata("design:paramtypes", []), _class$U = class ServiceAopMethodBase extends BeanBase {
|
|
696
696
|
testSyncBase() {
|
|
697
697
|
return 'hello';
|
|
698
698
|
}
|
|
699
|
-
}, _applyDecoratedDescriptor(_class$
|
|
699
|
+
}, _applyDecoratedDescriptor(_class$U.prototype, "testSyncBase", [_dec$U, _dec2$U, _dec3$r, _dec4$r], Object.getOwnPropertyDescriptor(_class$U.prototype, "testSyncBase"), _class$U.prototype), _class$U);
|
|
700
700
|
let ServiceAopMethod = (_dec5$o = Service(), _dec6$n = BeanInfo({
|
|
701
701
|
module: "test-vona"
|
|
702
702
|
}), _dec7$l = Aspect.aopMethod('test-vona:test', {
|
|
@@ -707,11 +707,11 @@ let ServiceAopMethod = (_dec5$o = Service(), _dec6$n = BeanInfo({
|
|
|
707
707
|
wrapper: '+'
|
|
708
708
|
}), _dec10$9 = Aspect.aopMethod('test-vona:test', {
|
|
709
709
|
wrapper: '-'
|
|
710
|
-
}), _dec11$
|
|
710
|
+
}), _dec11$9 = Reflect.metadata("design:type", Function), _dec12$9 = Reflect.metadata("design:paramtypes", []), _dec13$8 = Aspect.aopMethod('test-vona:test', {
|
|
711
711
|
wrapper: '+'
|
|
712
|
-
}), _dec14$
|
|
712
|
+
}), _dec14$7 = Aspect.aopMethod('test-vona:test', {
|
|
713
713
|
wrapper: '-'
|
|
714
|
-
}), _dec15$
|
|
714
|
+
}), _dec15$7 = Reflect.metadata("design:type", Function), _dec16$6 = Reflect.metadata("design:paramtypes", []), _dec5$o(_class2$r = _dec6$n(_class2$r = (_class3 = class ServiceAopMethod extends ServiceAopMethodBase {
|
|
715
715
|
constructor(...args) {
|
|
716
716
|
super(...args);
|
|
717
717
|
this._name = '';
|
|
@@ -728,19 +728,19 @@ let ServiceAopMethod = (_dec5$o = Service(), _dec6$n = BeanInfo({
|
|
|
728
728
|
set name(value) {
|
|
729
729
|
this._name = value;
|
|
730
730
|
}
|
|
731
|
-
}, _applyDecoratedDescriptor(_class3.prototype, "testSync", [_dec7$l, _dec8$h, _dec9$b, _dec0$b], Object.getOwnPropertyDescriptor(_class3.prototype, "testSync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "testAsync", [_dec1$b, _dec10$9, _dec11$
|
|
731
|
+
}, _applyDecoratedDescriptor(_class3.prototype, "testSync", [_dec7$l, _dec8$h, _dec9$b, _dec0$b], Object.getOwnPropertyDescriptor(_class3.prototype, "testSync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "testAsync", [_dec1$b, _dec10$9, _dec11$9, _dec12$9], Object.getOwnPropertyDescriptor(_class3.prototype, "testAsync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "name", [_dec13$8, _dec14$7, _dec15$7, _dec16$6], Object.getOwnPropertyDescriptor(_class3.prototype, "name"), _class3.prototype), _class3)) || _class2$r) || _class2$r);
|
|
732
732
|
|
|
733
|
-
var _dec$
|
|
733
|
+
var _dec$T, _dec2$T, _dec3$q, _dec4$q, _dec5$n, _dec6$m, _dec7$k, _dec8$g, _dec9$a, _dec0$a, _dec1$a, _dec10$8, _dec11$8, _dec12$8, _dec13$7, _dec14$6, _dec15$6, _dec16$5, _dec17$4, _dec18$4, _dec19$4, _dec20$4, _dec21$4, _dec22$4, _dec23$4, _dec24$4, _dec25$4, _dec26$3, _dec27$3, _class$T, _class2$q;
|
|
734
734
|
function cacheKeyFn(args, prop, options) {
|
|
735
735
|
return `${this.$beanFullName}_${options.cacheProp ?? prop}_${getKeyHash(args)}`;
|
|
736
736
|
}
|
|
737
|
-
let ServiceCaching = (_dec$
|
|
737
|
+
let ServiceCaching = (_dec$T = Service(), _dec2$T = BeanInfo({
|
|
738
738
|
module: "test-vona"
|
|
739
|
-
}), _dec3$
|
|
739
|
+
}), _dec3$q = Caching.get({
|
|
740
740
|
cacheName: 'test-vona:test',
|
|
741
741
|
cacheProp: 'test',
|
|
742
742
|
cacheKeyFn: 'cacheKey'
|
|
743
|
-
}), _dec4$
|
|
743
|
+
}), _dec4$q = Reflect.metadata("design:type", Function), _dec5$n = Reflect.metadata("design:paramtypes", [Number]), _dec6$m = Caching.get({
|
|
744
744
|
cacheName: 'test-vona:test',
|
|
745
745
|
cacheProp: 'test',
|
|
746
746
|
cacheKeyFn
|
|
@@ -751,12 +751,12 @@ let ServiceCaching = (_dec$R = Service(), _dec2$R = BeanInfo({
|
|
|
751
751
|
}), _dec0$a = Reflect.metadata("design:type", Function), _dec1$a = Reflect.metadata("design:paramtypes", [Number]), _dec10$8 = Caching.get({
|
|
752
752
|
cacheName: 'test-vona:test',
|
|
753
753
|
cacheProp: 'test'
|
|
754
|
-
}), _dec11$
|
|
754
|
+
}), _dec11$8 = Reflect.metadata("design:type", Function), _dec12$8 = Reflect.metadata("design:paramtypes", [Number]), _dec13$7 = Caching.set({
|
|
755
755
|
cacheName: 'test-vona:test',
|
|
756
756
|
cacheProp: 'test',
|
|
757
757
|
cacheKeyFn: 'cacheKeySet',
|
|
758
758
|
cacheValueFn: 'cacheValueSet'
|
|
759
|
-
}), _dec14$
|
|
759
|
+
}), _dec14$6 = Reflect.metadata("design:type", Function), _dec15$6 = Reflect.metadata("design:paramtypes", [Number, typeof TSummerCacheTestData === "undefined" ? Object : TSummerCacheTestData]), _dec16$5 = Caching.set({
|
|
760
760
|
cacheName: 'test-vona:test',
|
|
761
761
|
cacheProp: 'test',
|
|
762
762
|
cacheKey: 'cel://join([get(self,"$beanFullName"),options.cacheProp,hashkey([args[0]])],"_")',
|
|
@@ -770,7 +770,7 @@ let ServiceCaching = (_dec$R = Service(), _dec2$R = BeanInfo({
|
|
|
770
770
|
cacheProp: 'test'
|
|
771
771
|
}), _dec23$4 = Reflect.metadata("design:type", Function), _dec24$4 = Reflect.metadata("design:paramtypes", [Number]), _dec25$4 = Caching.clear({
|
|
772
772
|
cacheName: 'test-vona:test'
|
|
773
|
-
}), _dec26$3 = Reflect.metadata("design:type", Function), _dec27$3 = Reflect.metadata("design:paramtypes", []), _dec$
|
|
773
|
+
}), _dec26$3 = Reflect.metadata("design:type", Function), _dec27$3 = Reflect.metadata("design:paramtypes", []), _dec$T(_class$T = _dec2$T(_class$T = (_class2$q = class ServiceCaching extends BeanBase {
|
|
774
774
|
cacheKey(args, prop, options) {
|
|
775
775
|
return `${this.$beanFullName}_${options.cacheProp ?? prop}_${getKeyHash(args)}`;
|
|
776
776
|
}
|
|
@@ -814,12 +814,12 @@ let ServiceCaching = (_dec$R = Service(), _dec2$R = BeanInfo({
|
|
|
814
814
|
async clear() {
|
|
815
815
|
// do nothing
|
|
816
816
|
}
|
|
817
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
817
|
+
}, _applyDecoratedDescriptor(_class2$q.prototype, "get", [_dec3$q, _dec4$q, _dec5$n], Object.getOwnPropertyDescriptor(_class2$q.prototype, "get"), _class2$q.prototype), _applyDecoratedDescriptor(_class2$q.prototype, "get2", [_dec6$m, _dec7$k, _dec8$g], Object.getOwnPropertyDescriptor(_class2$q.prototype, "get2"), _class2$q.prototype), _applyDecoratedDescriptor(_class2$q.prototype, "get3", [_dec9$a, _dec0$a, _dec1$a], Object.getOwnPropertyDescriptor(_class2$q.prototype, "get3"), _class2$q.prototype), _applyDecoratedDescriptor(_class2$q.prototype, "get4", [_dec10$8, _dec11$8, _dec12$8], Object.getOwnPropertyDescriptor(_class2$q.prototype, "get4"), _class2$q.prototype), _applyDecoratedDescriptor(_class2$q.prototype, "set", [_dec13$7, _dec14$6, _dec15$6], Object.getOwnPropertyDescriptor(_class2$q.prototype, "set"), _class2$q.prototype), _applyDecoratedDescriptor(_class2$q.prototype, "set2", [_dec16$5, _dec17$4, _dec18$4], Object.getOwnPropertyDescriptor(_class2$q.prototype, "set2"), _class2$q.prototype), _applyDecoratedDescriptor(_class2$q.prototype, "set3", [_dec19$4, _dec20$4, _dec21$4], Object.getOwnPropertyDescriptor(_class2$q.prototype, "set3"), _class2$q.prototype), _applyDecoratedDescriptor(_class2$q.prototype, "del", [_dec22$4, _dec23$4, _dec24$4], Object.getOwnPropertyDescriptor(_class2$q.prototype, "del"), _class2$q.prototype), _applyDecoratedDescriptor(_class2$q.prototype, "clear", [_dec25$4, _dec26$3, _dec27$3], Object.getOwnPropertyDescriptor(_class2$q.prototype, "clear"), _class2$q.prototype), _class2$q)) || _class$T) || _class$T);
|
|
818
818
|
|
|
819
|
-
var _dec$
|
|
820
|
-
let ServiceCategory = (_dec$
|
|
819
|
+
var _dec$S, _dec2$S, _class$S;
|
|
820
|
+
let ServiceCategory = (_dec$S = Service(), _dec2$S = BeanInfo({
|
|
821
821
|
module: "test-vona"
|
|
822
|
-
}), _dec$
|
|
822
|
+
}), _dec$S(_class$S = _dec2$S(_class$S = class ServiceCategory extends BeanBase {
|
|
823
823
|
async categoryTreeDynamic() {
|
|
824
824
|
// create
|
|
825
825
|
const treeCreate = await this.scope.model.category.insert({
|
|
@@ -960,12 +960,12 @@ let ServiceCategory = (_dec$Q = Service(), _dec2$Q = BeanInfo({
|
|
|
960
960
|
id: treeCreate.id
|
|
961
961
|
});
|
|
962
962
|
}
|
|
963
|
-
}) || _class$
|
|
963
|
+
}) || _class$S) || _class$S);
|
|
964
964
|
|
|
965
|
-
var _dec$
|
|
966
|
-
let ServiceOrder = (_dec$
|
|
965
|
+
var _dec$R, _dec2$R, _class$R;
|
|
966
|
+
let ServiceOrder = (_dec$R = Service(), _dec2$R = BeanInfo({
|
|
967
967
|
module: "test-vona"
|
|
968
|
-
}), _dec$
|
|
968
|
+
}), _dec$R(_class$R = _dec2$R(_class$R = class ServiceOrder extends BeanBase {
|
|
969
969
|
async relationHasMany() {
|
|
970
970
|
// insert
|
|
971
971
|
const orderCreate = await this.scope.model.order.insert({
|
|
@@ -1023,12 +1023,12 @@ let ServiceOrder = (_dec$P = Service(), _dec2$P = BeanInfo({
|
|
|
1023
1023
|
}
|
|
1024
1024
|
});
|
|
1025
1025
|
}
|
|
1026
|
-
}) || _class$
|
|
1026
|
+
}) || _class$R) || _class$R);
|
|
1027
1027
|
|
|
1028
|
-
var _dec$
|
|
1029
|
-
let ServicePost = (_dec$
|
|
1028
|
+
var _dec$Q, _dec2$Q, _dec3$p, _dec4$p, _dec5$m, _class$Q, _class2$p;
|
|
1029
|
+
let ServicePost = (_dec$Q = Service(), _dec2$Q = BeanInfo({
|
|
1030
1030
|
module: "test-vona"
|
|
1031
|
-
}), _dec3$
|
|
1031
|
+
}), _dec3$p = Database.transaction(), _dec4$p = Reflect.metadata("design:type", Function), _dec5$m = Reflect.metadata("design:paramtypes", []), _dec$Q(_class$Q = _dec2$Q(_class$Q = (_class2$p = class ServicePost extends BeanBase {
|
|
1032
1032
|
async findMany(params) {
|
|
1033
1033
|
return await this.scope.model.post.selectAndCount({
|
|
1034
1034
|
...params,
|
|
@@ -1272,26 +1272,26 @@ let ServicePost = (_dec$O = Service(), _dec2$O = BeanInfo({
|
|
|
1272
1272
|
// async count() {
|
|
1273
1273
|
// return await this.scope.model.post.count();
|
|
1274
1274
|
// }
|
|
1275
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
1275
|
+
}, _applyDecoratedDescriptor(_class2$p.prototype, "transaction", [_dec3$p, _dec4$p, _dec5$m], Object.getOwnPropertyDescriptor(_class2$p.prototype, "transaction"), _class2$p.prototype), _class2$p)) || _class$Q) || _class$Q);
|
|
1276
1276
|
|
|
1277
|
-
var _dec$
|
|
1278
|
-
let ServiceProduct = (_dec$
|
|
1277
|
+
var _dec$P, _dec2$P, _class$P;
|
|
1278
|
+
let ServiceProduct = (_dec$P = Service(), _dec2$P = BeanInfo({
|
|
1279
1279
|
module: "test-vona"
|
|
1280
|
-
}), _dec$
|
|
1280
|
+
}), _dec$P(_class$P = _dec2$P(_class$P = class ServiceProduct extends BeanBase {}) || _class$P) || _class$P);
|
|
1281
1281
|
|
|
1282
|
-
var _dec$
|
|
1283
|
-
let ServiceTest = (_dec$
|
|
1282
|
+
var _dec$O, _dec2$O, _class$O;
|
|
1283
|
+
let ServiceTest = (_dec$O = Service(), _dec2$O = BeanInfo({
|
|
1284
1284
|
module: "test-vona"
|
|
1285
|
-
}), _dec$
|
|
1285
|
+
}), _dec$O(_class$O = _dec2$O(_class$O = class ServiceTest extends BeanBase {
|
|
1286
1286
|
get name() {
|
|
1287
1287
|
return 'serviceTest';
|
|
1288
1288
|
}
|
|
1289
|
-
}) || _class$
|
|
1289
|
+
}) || _class$O) || _class$O);
|
|
1290
1290
|
|
|
1291
|
-
var _dec$
|
|
1292
|
-
let ServiceTestApp = (_dec$
|
|
1291
|
+
var _dec$N, _dec2$N, _class$N;
|
|
1292
|
+
let ServiceTestApp = (_dec$N = Service(), _dec2$N = BeanInfo({
|
|
1293
1293
|
module: "test-vona"
|
|
1294
|
-
}), _dec$
|
|
1294
|
+
}), _dec$N(_class$N = _dec2$N(_class$N = class ServiceTestApp extends BeanBase {
|
|
1295
1295
|
actionSync({
|
|
1296
1296
|
a,
|
|
1297
1297
|
b
|
|
@@ -1304,9 +1304,9 @@ let ServiceTestApp = (_dec$L = Service(), _dec2$L = BeanInfo({
|
|
|
1304
1304
|
}) {
|
|
1305
1305
|
return Promise.resolve(a + b);
|
|
1306
1306
|
}
|
|
1307
|
-
}) || _class$
|
|
1307
|
+
}) || _class$N) || _class$N);
|
|
1308
1308
|
|
|
1309
|
-
var _dec$
|
|
1309
|
+
var _dec$M, _dec2$M, _class$M;
|
|
1310
1310
|
class ClassBeanBase extends BeanBase {
|
|
1311
1311
|
actionSync({
|
|
1312
1312
|
a,
|
|
@@ -1315,21 +1315,21 @@ class ClassBeanBase extends BeanBase {
|
|
|
1315
1315
|
return a + b;
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
1318
|
-
let ServiceTestClass = (_dec$
|
|
1318
|
+
let ServiceTestClass = (_dec$M = Service(), _dec2$M = BeanInfo({
|
|
1319
1319
|
module: "test-vona"
|
|
1320
|
-
}), _dec$
|
|
1320
|
+
}), _dec$M(_class$M = _dec2$M(_class$M = class ServiceTestClass extends ClassBeanBase {
|
|
1321
1321
|
async actionAsync({
|
|
1322
1322
|
a,
|
|
1323
1323
|
b
|
|
1324
1324
|
}) {
|
|
1325
1325
|
return Promise.resolve(a + b);
|
|
1326
1326
|
}
|
|
1327
|
-
}) || _class$
|
|
1327
|
+
}) || _class$M) || _class$M);
|
|
1328
1328
|
|
|
1329
|
-
var _dec$
|
|
1330
|
-
let ServiceTestData = (_dec$
|
|
1329
|
+
var _dec$L, _dec2$L, _class$L;
|
|
1330
|
+
let ServiceTestData = (_dec$L = Service(), _dec2$L = BeanInfo({
|
|
1331
1331
|
module: "test-vona"
|
|
1332
|
-
}), _dec$
|
|
1332
|
+
}), _dec$L(_class$L = _dec2$L(_class$L = class ServiceTestData extends BeanBase {
|
|
1333
1333
|
async create(prefix) {
|
|
1334
1334
|
const scopeTest = this.scope;
|
|
1335
1335
|
const userTom = await scopeTest.model.user.insert({
|
|
@@ -1416,14 +1416,14 @@ let ServiceTestData = (_dec$J = Service(), _dec2$J = BeanInfo({
|
|
|
1416
1416
|
id: userJimmy.id
|
|
1417
1417
|
});
|
|
1418
1418
|
}
|
|
1419
|
-
}) || _class$
|
|
1419
|
+
}) || _class$L) || _class$L);
|
|
1420
1420
|
|
|
1421
|
-
var _dec$
|
|
1421
|
+
var _dec$K, _dec2$K, _dec3$o, _dec4$o, _dec5$l, _dec6$l, _dec7$j, _dec8$f, _class$K, _class2$o;
|
|
1422
1422
|
const tableNameFail$1 = '__tempTransactionFail';
|
|
1423
1423
|
const tableNameSuccess$1 = '__tempTransactionSuccess';
|
|
1424
|
-
let ServiceTransaction = (_dec$
|
|
1424
|
+
let ServiceTransaction = (_dec$K = Service(), _dec2$K = BeanInfo({
|
|
1425
1425
|
module: "test-vona"
|
|
1426
|
-
}), _dec3$
|
|
1426
|
+
}), _dec3$o = Database.transaction(), _dec4$o = Reflect.metadata("design:type", Function), _dec5$l = Reflect.metadata("design:paramtypes", [Object]), _dec6$l = Database.transaction(), _dec7$j = Reflect.metadata("design:type", Function), _dec8$f = Reflect.metadata("design:paramtypes", [Object]), _dec$K(_class$K = _dec2$K(_class$K = (_class2$o = class ServiceTransaction extends BeanBase {
|
|
1427
1427
|
async fail(item) {
|
|
1428
1428
|
await this.bean.model.update(`${tableNameFail$1}`, item);
|
|
1429
1429
|
await this.bean.model.update(`${tableNameFail$1}error`, item);
|
|
@@ -1431,12 +1431,12 @@ let ServiceTransaction = (_dec$I = Service(), _dec2$I = BeanInfo({
|
|
|
1431
1431
|
async success(item) {
|
|
1432
1432
|
await this.bean.model.update(tableNameSuccess$1, item);
|
|
1433
1433
|
}
|
|
1434
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
1434
|
+
}, _applyDecoratedDescriptor(_class2$o.prototype, "fail", [_dec3$o, _dec4$o, _dec5$l], Object.getOwnPropertyDescriptor(_class2$o.prototype, "fail"), _class2$o.prototype), _applyDecoratedDescriptor(_class2$o.prototype, "success", [_dec6$l, _dec7$j, _dec8$f], Object.getOwnPropertyDescriptor(_class2$o.prototype, "success"), _class2$o.prototype), _class2$o)) || _class$K) || _class$K);
|
|
1435
1435
|
|
|
1436
|
-
var _dec$
|
|
1437
|
-
let ServiceUser = (_dec$
|
|
1436
|
+
var _dec$J, _dec2$J, _class$J;
|
|
1437
|
+
let ServiceUser = (_dec$J = Service(), _dec2$J = BeanInfo({
|
|
1438
1438
|
module: "test-vona"
|
|
1439
|
-
}), _dec$
|
|
1439
|
+
}), _dec$J(_class$J = _dec2$J(_class$J = class ServiceUser extends BeanBase {
|
|
1440
1440
|
async userStats() {
|
|
1441
1441
|
const userStats = await this.scope.model.user.aggregate({
|
|
1442
1442
|
aggrs: {
|
|
@@ -1522,61 +1522,61 @@ let ServiceUser = (_dec$H = Service(), _dec2$H = BeanInfo({
|
|
|
1522
1522
|
}
|
|
1523
1523
|
});
|
|
1524
1524
|
}
|
|
1525
|
-
}) || _class$
|
|
1525
|
+
}) || _class$J) || _class$J);
|
|
1526
1526
|
|
|
1527
|
-
var _dec$
|
|
1528
|
-
let BroadcastTest = (_dec$
|
|
1527
|
+
var _dec$I, _dec2$I, _class$I;
|
|
1528
|
+
let BroadcastTest = (_dec$I = Broadcast(), _dec2$I = BeanInfo({
|
|
1529
1529
|
module: "test-vona"
|
|
1530
|
-
}), _dec$
|
|
1530
|
+
}), _dec$I(_class$I = _dec2$I(_class$I = class BroadcastTest extends BeanBroadcastBase {
|
|
1531
1531
|
async execute(data, isEmitter) {
|
|
1532
1532
|
// locale
|
|
1533
1533
|
assert.equal(this.ctx.locale, 'zh-cn');
|
|
1534
1534
|
// data
|
|
1535
1535
|
assert.equal(data.message, 'hello');
|
|
1536
1536
|
}
|
|
1537
|
-
}) || _class$
|
|
1537
|
+
}) || _class$I) || _class$I);
|
|
1538
1538
|
|
|
1539
|
-
var _dec$
|
|
1540
|
-
let CacheMemTest = (_dec$
|
|
1539
|
+
var _dec$H, _dec2$H, _class$H;
|
|
1540
|
+
let CacheMemTest = (_dec$H = CacheMem({
|
|
1541
1541
|
ttl: 1 * 1000
|
|
1542
|
-
}), _dec2$
|
|
1542
|
+
}), _dec2$H = BeanInfo({
|
|
1543
1543
|
module: "test-vona"
|
|
1544
|
-
}), _dec$
|
|
1544
|
+
}), _dec$H(_class$H = _dec2$H(_class$H = class CacheMemTest extends BeanCacheMemBase {}) || _class$H) || _class$H);
|
|
1545
1545
|
|
|
1546
|
-
var _dec$
|
|
1547
|
-
let CacheRedisPost = (_dec$
|
|
1546
|
+
var _dec$G, _dec2$G, _class$G;
|
|
1547
|
+
let CacheRedisPost = (_dec$G = CacheRedis(), _dec2$G = BeanInfo({
|
|
1548
1548
|
module: "test-vona"
|
|
1549
|
-
}), _dec$
|
|
1549
|
+
}), _dec$G(_class$G = _dec2$G(_class$G = class CacheRedisPost extends BeanCacheRedisBase {}) || _class$G) || _class$G);
|
|
1550
1550
|
|
|
1551
|
-
var _dec$
|
|
1552
|
-
let CacheRedisTest = (_dec$
|
|
1551
|
+
var _dec$F, _dec2$F, _class$F;
|
|
1552
|
+
let CacheRedisTest = (_dec$F = CacheRedis({
|
|
1553
1553
|
ttl: 1 * 1000
|
|
1554
|
-
}), _dec2$
|
|
1554
|
+
}), _dec2$F = BeanInfo({
|
|
1555
1555
|
module: "test-vona"
|
|
1556
|
-
}), _dec$
|
|
1556
|
+
}), _dec$F(_class$F = _dec2$F(_class$F = class CacheRedisTest extends BeanCacheRedisBase {}) || _class$F) || _class$F);
|
|
1557
1557
|
|
|
1558
|
-
var _dec$
|
|
1559
|
-
let EventHelloEcho = (_dec$
|
|
1558
|
+
var _dec$E, _dec2$E, _class$E;
|
|
1559
|
+
let EventHelloEcho = (_dec$E = Event(), _dec2$E = BeanInfo({
|
|
1560
1560
|
module: "test-vona"
|
|
1561
|
-
}), _dec$
|
|
1561
|
+
}), _dec$E(_class$E = _dec2$E(_class$E = class EventHelloEcho extends BeanEventBase {}) || _class$E) || _class$E);
|
|
1562
1562
|
|
|
1563
|
-
var _dec$
|
|
1564
|
-
let EventListenerHelloEcho = (_dec$
|
|
1563
|
+
var _dec$D, _dec2$D, _class$D;
|
|
1564
|
+
let EventListenerHelloEcho = (_dec$D = EventListener({
|
|
1565
1565
|
match: 'test-vona:helloEcho'
|
|
1566
|
-
}), _dec2$
|
|
1566
|
+
}), _dec2$D = BeanInfo({
|
|
1567
1567
|
module: "test-vona"
|
|
1568
|
-
}), _dec$
|
|
1568
|
+
}), _dec$D(_class$D = _dec2$D(_class$D = class EventListenerHelloEcho extends BeanBase {
|
|
1569
1569
|
async execute(data, next) {
|
|
1570
1570
|
// next
|
|
1571
1571
|
const result = await next();
|
|
1572
1572
|
return `${data.text} ${result}`;
|
|
1573
1573
|
}
|
|
1574
|
-
}) || _class$
|
|
1574
|
+
}) || _class$D) || _class$D);
|
|
1575
1575
|
|
|
1576
|
-
var _dec$
|
|
1577
|
-
let MetaVersion = (_dec$
|
|
1576
|
+
var _dec$C, _dec2$C, _class$C;
|
|
1577
|
+
let MetaVersion = (_dec$C = Meta(), _dec2$C = BeanInfo({
|
|
1578
1578
|
module: "test-vona"
|
|
1579
|
-
}), _dec$
|
|
1579
|
+
}), _dec$C(_class$C = _dec2$C(_class$C = class MetaVersion extends BeanBase {
|
|
1580
1580
|
async update(options) {
|
|
1581
1581
|
if (options.version === 1) {
|
|
1582
1582
|
// testVonaTest
|
|
@@ -1669,49 +1669,49 @@ let MetaVersion = (_dec$A = Meta(), _dec2$A = BeanInfo({
|
|
|
1669
1669
|
}
|
|
1670
1670
|
});
|
|
1671
1671
|
}
|
|
1672
|
-
}) || _class$
|
|
1672
|
+
}) || _class$C) || _class$C);
|
|
1673
1673
|
|
|
1674
|
-
var _dec$
|
|
1675
|
-
let QueueTest = (_dec$
|
|
1674
|
+
var _dec$B, _dec2$B, _class$B;
|
|
1675
|
+
let QueueTest = (_dec$B = Queue(), _dec2$B = BeanInfo({
|
|
1676
1676
|
module: "test-vona"
|
|
1677
|
-
}), _dec$
|
|
1677
|
+
}), _dec$B(_class$B = _dec2$B(_class$B = class QueueTest extends BeanQueueBase {
|
|
1678
1678
|
async execute(data, _options) {
|
|
1679
1679
|
const res = data.a + data.b;
|
|
1680
1680
|
this.$logger.silly(`queue test worker done: ${data.a} + ${data.b} = ${res}`);
|
|
1681
1681
|
return res;
|
|
1682
1682
|
}
|
|
1683
|
-
}) || _class$
|
|
1683
|
+
}) || _class$B) || _class$B);
|
|
1684
1684
|
|
|
1685
|
-
var _dec$
|
|
1686
|
-
let ScheduleTest = (_dec$
|
|
1685
|
+
var _dec$A, _dec2$A, _class$A;
|
|
1686
|
+
let ScheduleTest = (_dec$A = Schedule({
|
|
1687
1687
|
enable: false,
|
|
1688
1688
|
repeat: {
|
|
1689
1689
|
every: 3000
|
|
1690
1690
|
}
|
|
1691
|
-
}), _dec2$
|
|
1691
|
+
}), _dec2$A = BeanInfo({
|
|
1692
1692
|
module: "test-vona"
|
|
1693
|
-
}), _dec$
|
|
1693
|
+
}), _dec$A(_class$A = _dec2$A(_class$A = class ScheduleTest extends BeanBase {
|
|
1694
1694
|
async execute(job) {
|
|
1695
1695
|
this.$logger.silly(`Schedule Test: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
|
|
1696
1696
|
}
|
|
1697
|
-
}) || _class$
|
|
1697
|
+
}) || _class$A) || _class$A);
|
|
1698
1698
|
|
|
1699
|
-
var _dec$
|
|
1700
|
-
let ScheduleTest3 = (_dec$
|
|
1699
|
+
var _dec$z, _dec2$z, _class$z;
|
|
1700
|
+
let ScheduleTest3 = (_dec$z = Schedule({
|
|
1701
1701
|
enable: false,
|
|
1702
1702
|
repeat: {
|
|
1703
1703
|
every: 5000
|
|
1704
1704
|
}
|
|
1705
|
-
}), _dec2$
|
|
1705
|
+
}), _dec2$z = BeanInfo({
|
|
1706
1706
|
module: "test-vona"
|
|
1707
|
-
}), _dec$
|
|
1707
|
+
}), _dec$z(_class$z = _dec2$z(_class$z = class ScheduleTest3 extends BeanBase {
|
|
1708
1708
|
async execute(job) {
|
|
1709
1709
|
this.$logger.silly(`Schedule Test3: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
|
|
1710
1710
|
}
|
|
1711
|
-
}) || _class$
|
|
1711
|
+
}) || _class$z) || _class$z);
|
|
1712
1712
|
|
|
1713
|
-
var _dec$
|
|
1714
|
-
let SummerCacheTest = (_dec$
|
|
1713
|
+
var _dec$y, _dec2$y, _class$y;
|
|
1714
|
+
let SummerCacheTest = (_dec$y = SummerCache({
|
|
1715
1715
|
mode: 'all',
|
|
1716
1716
|
mem: {
|
|
1717
1717
|
max: 2,
|
|
@@ -1720,63 +1720,87 @@ let SummerCacheTest = (_dec$w = SummerCache({
|
|
|
1720
1720
|
redis: {
|
|
1721
1721
|
ttl: 3 * 1000
|
|
1722
1722
|
}
|
|
1723
|
-
}), _dec2$
|
|
1723
|
+
}), _dec2$y = BeanInfo({
|
|
1724
1724
|
module: "test-vona"
|
|
1725
|
-
}), _dec$
|
|
1725
|
+
}), _dec$y(_class$y = _dec2$y(_class$y = class SummerCacheTest extends BeanSummerCacheBase {
|
|
1726
1726
|
async getNative(key, _options) {
|
|
1727
1727
|
return {
|
|
1728
1728
|
id: key.id,
|
|
1729
1729
|
name: `name_${key.id}`
|
|
1730
1730
|
};
|
|
1731
1731
|
}
|
|
1732
|
-
}) || _class$
|
|
1732
|
+
}) || _class$y) || _class$y);
|
|
1733
1733
|
|
|
1734
|
-
var _dec$
|
|
1735
|
-
let DtoCategoryTree = (_dec$
|
|
1734
|
+
var _dec$x, _dec2$x, _class$x;
|
|
1735
|
+
let DtoCategoryTree = (_dec$x = Dto(), _dec2$x = BeanInfo({
|
|
1736
1736
|
module: "test-vona"
|
|
1737
|
-
}), _dec$
|
|
1737
|
+
}), _dec$x(_class$x = _dec2$x(_class$x = class DtoCategoryTree extends $Dto.get('test-vona:category', {
|
|
1738
1738
|
columns: ['id', 'name']
|
|
1739
|
-
}) {}) || _class$
|
|
1739
|
+
}) {}) || _class$x) || _class$x);
|
|
1740
1740
|
|
|
1741
|
-
var _dec$
|
|
1742
|
-
let DtoOrderCreate = (_dec$
|
|
1741
|
+
var _dec$w, _dec2$w, _class$w;
|
|
1742
|
+
let DtoOrderCreate = (_dec$w = Dto(), _dec2$w = BeanInfo({
|
|
1743
1743
|
module: "test-vona"
|
|
1744
|
-
}), _dec$
|
|
1744
|
+
}), _dec$w(_class$w = _dec2$w(_class$w = class DtoOrderCreate extends $Dto.create(() => ModelOrder, {
|
|
1745
1745
|
columns: ['orderNo', 'remark']
|
|
1746
|
-
}) {}) || _class$
|
|
1746
|
+
}) {}) || _class$w) || _class$w);
|
|
1747
1747
|
|
|
1748
|
-
var _dec$
|
|
1749
|
-
let DtoOrderQuery = (_dec$
|
|
1748
|
+
var _dec$v, _dec2$v, _dec3$n, _dec4$n, _class$v, _class2$n, _descriptor$7;
|
|
1749
|
+
let DtoOrderQuery = (_dec$v = Dto({
|
|
1750
1750
|
openapi: {
|
|
1751
1751
|
query: {
|
|
1752
1752
|
table: $tableName(EntityOrder)
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
1755
|
-
}), _dec2$
|
|
1755
|
+
}), _dec2$v = BeanInfo({
|
|
1756
1756
|
module: "test-vona"
|
|
1757
|
-
}), _dec3$
|
|
1757
|
+
}), _dec3$n = Api.field(v.optional(), v.openapi({
|
|
1758
1758
|
query: {
|
|
1759
1759
|
table: $tableName(EntityUser),
|
|
1760
1760
|
joinType: 'innerJoin',
|
|
1761
1761
|
joinOn: ['userId', 'testVonaUser.id'],
|
|
1762
1762
|
originalName: 'name'
|
|
1763
1763
|
}
|
|
1764
|
-
})), _dec4$
|
|
1764
|
+
})), _dec4$n = Reflect.metadata("design:type", String), _dec$v(_class$v = _dec2$v(_class$v = (_class2$n = class DtoOrderQuery extends $Dto.query(EntityOrder, ['orderNo', 'remark']) {
|
|
1765
|
+
constructor(...args) {
|
|
1766
|
+
super(...args);
|
|
1767
|
+
_initializerDefineProperty(this, "userName", _descriptor$7, this);
|
|
1768
|
+
}
|
|
1769
|
+
}, _descriptor$7 = _applyDecoratedDescriptor(_class2$n.prototype, "userName", [_dec3$n, _dec4$n], {
|
|
1770
|
+
configurable: true,
|
|
1771
|
+
enumerable: true,
|
|
1772
|
+
writable: true,
|
|
1773
|
+
initializer: null
|
|
1774
|
+
}), _class2$n)) || _class$v) || _class$v);
|
|
1775
|
+
|
|
1776
|
+
var _dec$u, _dec2$u, _dec3$m, _dec4$m, _class$u, _class2$m, _descriptor$6;
|
|
1777
|
+
let DtoOrderQueryPage = (_dec$u = Dto({
|
|
1778
|
+
fields: {
|
|
1779
|
+
pageSize: z.number().min(1).max(300).default(30)
|
|
1780
|
+
}
|
|
1781
|
+
}), _dec2$u = BeanInfo({
|
|
1782
|
+
module: "test-vona"
|
|
1783
|
+
}), _dec3$m = Api.field(z.number().min(1).max(300).default(30)), _dec4$m = Reflect.metadata("design:type", Number), _dec$u(_class$u = _dec2$u(_class$u = (_class2$m = class DtoOrderQueryPage extends $Class.omit($Dto.queryPage(EntityOrder, ['orderNo', 'remark']), ['pageSize']) {
|
|
1765
1784
|
constructor(...args) {
|
|
1766
1785
|
super(...args);
|
|
1767
|
-
_initializerDefineProperty(this, "
|
|
1786
|
+
_initializerDefineProperty(this, "pageSize", _descriptor$6, this);
|
|
1768
1787
|
}
|
|
1769
|
-
}, _descriptor$6 = _applyDecoratedDescriptor(_class2$m.prototype, "
|
|
1788
|
+
}, _descriptor$6 = _applyDecoratedDescriptor(_class2$m.prototype, "pageSize", [_dec3$m, _dec4$m], {
|
|
1770
1789
|
configurable: true,
|
|
1771
1790
|
enumerable: true,
|
|
1772
1791
|
writable: true,
|
|
1773
1792
|
initializer: null
|
|
1774
|
-
}), _class2$m)) || _class$
|
|
1793
|
+
}), _class2$m)) || _class$u) || _class$u);
|
|
1794
|
+
|
|
1795
|
+
var _dec$t, _dec2$t, _class$t;
|
|
1796
|
+
let DtoOrderResult = (_dec$t = Dto(), _dec2$t = BeanInfo({
|
|
1797
|
+
module: "test-vona"
|
|
1798
|
+
}), _dec$t(_class$t = _dec2$t(_class$t = class DtoOrderResult extends $Dto.get(() => ModelOrder) {}) || _class$t) || _class$t);
|
|
1775
1799
|
|
|
1776
1800
|
var _dec$s, _dec2$s, _class$s;
|
|
1777
|
-
let
|
|
1801
|
+
let DtoOrderResultPage = (_dec$s = Dto(), _dec2$s = BeanInfo({
|
|
1778
1802
|
module: "test-vona"
|
|
1779
|
-
}), _dec$s(_class$s = _dec2$s(_class$s = class
|
|
1803
|
+
}), _dec$s(_class$s = _dec2$s(_class$s = class DtoOrderResultPage extends $Dto.selectAndCount(() => ModelOrder$1) {}) || _class$s) || _class$s);
|
|
1780
1804
|
|
|
1781
1805
|
var _dec$r, _dec2$r, _class$r;
|
|
1782
1806
|
let DtoOrderUpdate = (_dec$r = Dto(), _dec2$r = BeanInfo({
|
|
@@ -2208,14 +2232,14 @@ let ControllerCaptcha = (_dec$d = Controller({
|
|
|
2208
2232
|
async signin(_user) {}
|
|
2209
2233
|
}, _applyDecoratedDescriptor(_class2$c.prototype, "signin", [_dec3$c, _dec4$c, _dec5$c, _dec6$c, _dec7$c, _dec8$a], Object.getOwnPropertyDescriptor(_class2$c.prototype, "signin"), _class2$c.prototype), _class2$c)) || _class$d) || _class$d);
|
|
2210
2234
|
|
|
2211
|
-
var _dec$c, _dec2$c, _dec3$b, _dec4$b, _dec5$b, _dec6$b, _dec7$b, _dec8$9, _dec9$8, _dec0$8, _dec1$8, _dec10$7, _dec11$
|
|
2235
|
+
var _dec$c, _dec2$c, _dec3$b, _dec4$b, _dec5$b, _dec6$b, _dec7$b, _dec8$9, _dec9$8, _dec0$8, _dec1$8, _dec10$7, _dec11$7, _dec12$7, _dec13$6, _dec14$5, _dec15$5, _dec16$4, _dec17$3, _dec18$3, _dec19$3, _dec20$3, _dec21$3, _dec22$3, _dec23$3, _dec24$3, _dec25$3, _dec26$2, _dec27$2, _dec28$1, _dec29$1, _dec30$1, _dec31$1, _dec32$1, _class$c, _class2$b;
|
|
2212
2236
|
let ControllerDtoTest = (_dec$c = Controller('dtoTest', {
|
|
2213
2237
|
meta: {
|
|
2214
2238
|
mode: ['test', 'dev']
|
|
2215
2239
|
}
|
|
2216
2240
|
}), _dec2$c = BeanInfo({
|
|
2217
2241
|
module: "test-vona"
|
|
2218
|
-
}), _dec3$b = Web.get('getUserLazy'), _dec4$b = Reflect.metadata("design:type", Function), _dec5$b = Reflect.metadata("design:paramtypes", []), _dec6$b = Web.get('getUserDynamic'), _dec7$b = Api.body($Dto.get('test-vona:post')), _dec8$9 = Reflect.metadata("design:type", Function), _dec9$8 = Reflect.metadata("design:paramtypes", []), _dec0$8 = Web.get('getUserStats'), _dec1$8 = Api.body($Dto.get('test-vona:userStats')), _dec10$7 = Reflect.metadata("design:type", Function), _dec11$
|
|
2242
|
+
}), _dec3$b = Web.get('getUserLazy'), _dec4$b = Reflect.metadata("design:type", Function), _dec5$b = Reflect.metadata("design:paramtypes", []), _dec6$b = Web.get('getUserDynamic'), _dec7$b = Api.body($Dto.get('test-vona:post')), _dec8$9 = Reflect.metadata("design:type", Function), _dec9$8 = Reflect.metadata("design:paramtypes", []), _dec0$8 = Web.get('getUserStats'), _dec1$8 = Api.body($Dto.get('test-vona:userStats')), _dec10$7 = Reflect.metadata("design:type", Function), _dec11$7 = Reflect.metadata("design:paramtypes", []), _dec12$7 = Web.get('getUserStatsGroup'), _dec13$6 = Api.body($Dto.get('test-vona:userStatsGroup')), _dec14$5 = Reflect.metadata("design:type", Function), _dec15$5 = Reflect.metadata("design:paramtypes", []), _dec16$4 = Web.post('createUser'), _dec17$3 = function (target, key) {
|
|
2219
2243
|
return Arg.body(v.object(DtoUserCreate))(target, key, 0);
|
|
2220
2244
|
}, _dec18$3 = Reflect.metadata("design:type", Function), _dec19$3 = Reflect.metadata("design:paramtypes", [typeof DtoUserCreate === "undefined" ? Object : DtoUserCreate]), _dec20$3 = Web.patch('updateUser/:id'), _dec21$3 = function (target, key) {
|
|
2221
2245
|
return Arg.param('id')(target, key, 0);
|
|
@@ -2252,9 +2276,9 @@ let ControllerDtoTest = (_dec$c = Controller('dtoTest', {
|
|
|
2252
2276
|
});
|
|
2253
2277
|
return items;
|
|
2254
2278
|
}
|
|
2255
|
-
}, _applyDecoratedDescriptor(_class2$b.prototype, "getUserLazy", [_dec3$b, _dec4$b, _dec5$b], Object.getOwnPropertyDescriptor(_class2$b.prototype, "getUserLazy"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "getPostDynamic", [_dec6$b, _dec7$b, _dec8$9, _dec9$8], Object.getOwnPropertyDescriptor(_class2$b.prototype, "getPostDynamic"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "getUserStats", [_dec0$8, _dec1$8, _dec10$7, _dec11$
|
|
2279
|
+
}, _applyDecoratedDescriptor(_class2$b.prototype, "getUserLazy", [_dec3$b, _dec4$b, _dec5$b], Object.getOwnPropertyDescriptor(_class2$b.prototype, "getUserLazy"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "getPostDynamic", [_dec6$b, _dec7$b, _dec8$9, _dec9$8], Object.getOwnPropertyDescriptor(_class2$b.prototype, "getPostDynamic"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "getUserStats", [_dec0$8, _dec1$8, _dec10$7, _dec11$7], Object.getOwnPropertyDescriptor(_class2$b.prototype, "getUserStats"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "getUserStatsGroup", [_dec12$7, _dec13$6, _dec14$5, _dec15$5], Object.getOwnPropertyDescriptor(_class2$b.prototype, "getUserStatsGroup"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "createUser", [_dec16$4, _dec17$3, _dec18$3, _dec19$3], Object.getOwnPropertyDescriptor(_class2$b.prototype, "createUser"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "updateUser", [_dec20$3, _dec21$3, _dec22$3, _dec23$3, _dec24$3], Object.getOwnPropertyDescriptor(_class2$b.prototype, "updateUser"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "getCategoryTree", [_dec25$3, _dec26$2, _dec27$2, _dec28$1], Object.getOwnPropertyDescriptor(_class2$b.prototype, "getCategoryTree"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "getCategoryTree2", [_dec29$1, _dec30$1, _dec31$1, _dec32$1], Object.getOwnPropertyDescriptor(_class2$b.prototype, "getCategoryTree2"), _class2$b.prototype), _class2$b)) || _class$c) || _class$c);
|
|
2256
2280
|
|
|
2257
|
-
var _dec$b, _dec2$b, _dec3$a, _dec4$a, _dec5$a, _dec6$a, _dec7$a, _dec8$8, _dec9$7, _dec0$7, _dec1$7, _dec10$6, _dec11$
|
|
2281
|
+
var _dec$b, _dec2$b, _dec3$a, _dec4$a, _dec5$a, _dec6$a, _dec7$a, _dec8$8, _dec9$7, _dec0$7, _dec1$7, _dec10$6, _dec11$6, _dec12$6, _dec13$5, _dec14$4, _dec15$4, _dec16$3, _class$b, _class2$a;
|
|
2258
2282
|
let ControllerGuardPassport = (_dec$b = Controller('guardPassport'), _dec2$b = BeanInfo({
|
|
2259
2283
|
module: "test-vona"
|
|
2260
2284
|
}), _dec3$a = Web.get('testUserName'), _dec4$a = Passport.userName({
|
|
@@ -2263,16 +2287,16 @@ let ControllerGuardPassport = (_dec$b = Controller('guardPassport'), _dec2$b = B
|
|
|
2263
2287
|
name: 'admin-none'
|
|
2264
2288
|
}), _dec9$7 = Reflect.metadata("design:type", Function), _dec0$7 = Reflect.metadata("design:paramtypes", []), _dec1$7 = Web.get('testRoleName'), _dec10$6 = Passport.roleName({
|
|
2265
2289
|
name: 'admin'
|
|
2266
|
-
}), _dec11$
|
|
2290
|
+
}), _dec11$6 = Reflect.metadata("design:type", Function), _dec12$6 = Reflect.metadata("design:paramtypes", []), _dec13$5 = Web.get('testRoleNameFail'), _dec14$4 = Passport.roleName({
|
|
2267
2291
|
name: 'admin-none'
|
|
2268
|
-
}), _dec15$
|
|
2292
|
+
}), _dec15$4 = Reflect.metadata("design:type", Function), _dec16$3 = Reflect.metadata("design:paramtypes", []), _dec$b(_class$b = _dec2$b(_class$b = (_class2$a = class ControllerGuardPassport extends BeanBase {
|
|
2269
2293
|
testUserName() {}
|
|
2270
2294
|
testUserNameFail() {}
|
|
2271
2295
|
testRoleName() {}
|
|
2272
2296
|
testRoleNameFail() {}
|
|
2273
|
-
}, _applyDecoratedDescriptor(_class2$a.prototype, "testUserName", [_dec3$a, _dec4$a, _dec5$a, _dec6$a], Object.getOwnPropertyDescriptor(_class2$a.prototype, "testUserName"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "testUserNameFail", [_dec7$a, _dec8$8, _dec9$7, _dec0$7], Object.getOwnPropertyDescriptor(_class2$a.prototype, "testUserNameFail"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "testRoleName", [_dec1$7, _dec10$6, _dec11$
|
|
2297
|
+
}, _applyDecoratedDescriptor(_class2$a.prototype, "testUserName", [_dec3$a, _dec4$a, _dec5$a, _dec6$a], Object.getOwnPropertyDescriptor(_class2$a.prototype, "testUserName"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "testUserNameFail", [_dec7$a, _dec8$8, _dec9$7, _dec0$7], Object.getOwnPropertyDescriptor(_class2$a.prototype, "testUserNameFail"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "testRoleName", [_dec1$7, _dec10$6, _dec11$6, _dec12$6], Object.getOwnPropertyDescriptor(_class2$a.prototype, "testRoleName"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "testRoleNameFail", [_dec13$5, _dec14$4, _dec15$4, _dec16$3], Object.getOwnPropertyDescriptor(_class2$a.prototype, "testRoleNameFail"), _class2$a.prototype), _class2$a)) || _class$b) || _class$b);
|
|
2274
2298
|
|
|
2275
|
-
var _dec$a, _dec2$a, _dec3$9, _dec4$9, _dec5$9, _dec6$9, _dec7$9, _dec8$7, _dec9$6, _dec0$6, _dec1$6, _dec10$5, _dec11$
|
|
2299
|
+
var _dec$a, _dec2$a, _dec3$9, _dec4$9, _dec5$9, _dec6$9, _dec7$9, _dec8$7, _dec9$6, _dec0$6, _dec1$6, _dec10$5, _dec11$5, _dec12$5, _dec13$4, _dec14$3, _dec15$3, _dec16$2, _dec17$2, _dec18$2, _dec19$2, _dec20$2, _dec21$2, _dec22$2, _dec23$2, _dec24$2, _dec25$2, _dec26$1, _dec27$1, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _class$a, _class2$9;
|
|
2276
2300
|
let ControllerOnion = (_dec$a = Controller({
|
|
2277
2301
|
path: 'onion',
|
|
2278
2302
|
tags: ['Onion'],
|
|
@@ -2301,16 +2325,16 @@ let ControllerOnion = (_dec$a = Controller({
|
|
|
2301
2325
|
}), _dec10$5 = Aspect.aopMethod('a-orm:transaction', {
|
|
2302
2326
|
isolationLevel: 'SERIALIZABLE',
|
|
2303
2327
|
readOnly: true
|
|
2304
|
-
}), _dec11$
|
|
2328
|
+
}), _dec11$5 = Database.transaction({
|
|
2305
2329
|
isolationLevel: 'READ_COMMITTED',
|
|
2306
2330
|
readOnly: false
|
|
2307
|
-
}), _dec12$
|
|
2308
|
-
return Arg.query('id', v.default(0), z.number())(target, key, 0);
|
|
2309
|
-
}, _dec14$
|
|
2310
|
-
return Arg.query('name', z.number().optional())(target, key, 2);
|
|
2311
|
-
}, _dec15$
|
|
2312
|
-
return Arg.body(v.title($locale('User')), z.object({
|
|
2313
|
-
id: z.number().openapi({
|
|
2331
|
+
}), _dec12$5 = Api.body(v.optional(), z$1.string()), _dec13$4 = function (target, key) {
|
|
2332
|
+
return Arg.query('id', v.default(0), z$1.number())(target, key, 0);
|
|
2333
|
+
}, _dec14$3 = function (target, key) {
|
|
2334
|
+
return Arg.query('name', z$1.number().optional())(target, key, 2);
|
|
2335
|
+
}, _dec15$3 = function (target, key) {
|
|
2336
|
+
return Arg.body(v.title($locale('User')), z$1.object({
|
|
2337
|
+
id: z$1.number().openapi({
|
|
2314
2338
|
title: $locale('UserId')
|
|
2315
2339
|
})
|
|
2316
2340
|
}))(target, key, 3);
|
|
@@ -2323,8 +2347,8 @@ let ControllerOnion = (_dec$a = Controller({
|
|
|
2323
2347
|
}, _dec22$2 = function (target, key) {
|
|
2324
2348
|
return Arg.query(DtoUser)(target, key, 2);
|
|
2325
2349
|
}, _dec23$2 = function (target, key) {
|
|
2326
|
-
return Arg.body(v.title($locale('User')), z.object({
|
|
2327
|
-
id: z.number().openapi({
|
|
2350
|
+
return Arg.body(v.title($locale('User')), z$1.object({
|
|
2351
|
+
id: z$1.number().openapi({
|
|
2328
2352
|
title: $locale('UserId')
|
|
2329
2353
|
})
|
|
2330
2354
|
}))(target, key, 3);
|
|
@@ -2380,9 +2404,9 @@ let ControllerOnion = (_dec$a = Controller({
|
|
|
2380
2404
|
echo6() {
|
|
2381
2405
|
return this.bean.passport.isAuthenticated;
|
|
2382
2406
|
}
|
|
2383
|
-
}, _applyDecoratedDescriptor(_class2$9.prototype, "index", [_dec3$9, _dec4$9, _dec5$9, _dec6$9, _dec7$9], Object.getOwnPropertyDescriptor(_class2$9.prototype, "index"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "echo", [_dec8$7, _dec9$6, _dec0$6, _dec1$6, _dec10$5, _dec11$
|
|
2407
|
+
}, _applyDecoratedDescriptor(_class2$9.prototype, "index", [_dec3$9, _dec4$9, _dec5$9, _dec6$9, _dec7$9], Object.getOwnPropertyDescriptor(_class2$9.prototype, "index"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "echo", [_dec8$7, _dec9$6, _dec0$6, _dec1$6, _dec10$5, _dec11$5, _dec12$5, _dec13$4, _dec14$3, _dec15$3, _dec16$2, _dec17$2], Object.getOwnPropertyDescriptor(_class2$9.prototype, "echo"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "echo2", [_dec18$2, _dec19$2, _dec20$2, _dec21$2, _dec22$2, _dec23$2, _dec24$2, _dec25$2], Object.getOwnPropertyDescriptor(_class2$9.prototype, "echo2"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "echo3", [_dec26$1, _dec27$1, _dec28, _dec29, _dec30, _dec31, _dec32], Object.getOwnPropertyDescriptor(_class2$9.prototype, "echo3"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "echo4", [_dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39], Object.getOwnPropertyDescriptor(_class2$9.prototype, "echo4"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "echo5", [_dec40, _dec41, _dec42, _dec43, _dec44], Object.getOwnPropertyDescriptor(_class2$9.prototype, "echo5"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "echo6", [_dec45, _dec46, _dec47, _dec48], Object.getOwnPropertyDescriptor(_class2$9.prototype, "echo6"), _class2$9.prototype), _class2$9)) || _class$a) || _class$a);
|
|
2384
2408
|
|
|
2385
|
-
var _dec$9, _dec2$9, _dec3$8, _dec4$8, _dec5$8, _dec6$8, _dec7$8, _dec8$6, _dec9$5, _dec0$5, _dec1$5, _dec10$4, _class$9, _class2$8;
|
|
2409
|
+
var _dec$9, _dec2$9, _dec3$8, _dec4$8, _dec5$8, _dec6$8, _dec7$8, _dec8$6, _dec9$5, _dec0$5, _dec1$5, _dec10$4, _dec11$4, _dec12$4, _dec13$3, _dec14$2, _dec15$2, _class$9, _class2$8;
|
|
2386
2410
|
function myCustomQueryTransform(_ctx, info) {
|
|
2387
2411
|
if (info.key === 'userName') {
|
|
2388
2412
|
info.params.where[info.fullName] = info.value;
|
|
@@ -2396,7 +2420,9 @@ let ControllerOrder = (_dec$9 = Controller('order'), _dec2$9 = BeanInfo({
|
|
|
2396
2420
|
return Arg.body(DtoOrderCreate)(target, key, 0);
|
|
2397
2421
|
}, _dec6$8 = Reflect.metadata("design:type", Function), _dec7$8 = Reflect.metadata("design:paramtypes", [typeof DtoOrderCreate === "undefined" ? Object : DtoOrderCreate]), _dec8$6 = Web.get('findAll'), _dec9$5 = Api.body(v.array(DtoOrderResult)), _dec0$5 = function (target, key) {
|
|
2398
2422
|
return Arg.queryPro(DtoOrderQuery, myCustomQueryTransform)(target, key, 0);
|
|
2399
|
-
}, _dec1$5 = Reflect.metadata("design:type", Function), _dec10$4 = Reflect.metadata("design:paramtypes", [typeof IQueryParams === "undefined" ? Object : IQueryParams]),
|
|
2423
|
+
}, _dec1$5 = Reflect.metadata("design:type", Function), _dec10$4 = Reflect.metadata("design:paramtypes", [typeof IQueryParams === "undefined" ? Object : IQueryParams]), _dec11$4 = Web.get('findMany'), _dec12$4 = Api.body(DtoOrderResultPage), _dec13$3 = function (target, key) {
|
|
2424
|
+
return Arg.queryPro(DtoOrderQueryPage)(target, key, 0);
|
|
2425
|
+
}, _dec14$2 = Reflect.metadata("design:type", Function), _dec15$2 = Reflect.metadata("design:paramtypes", [typeof IQueryParams === "undefined" ? Object : IQueryParams]), _dec$9(_class$9 = _dec2$9(_class$9 = (_class2$8 = class ControllerOrder extends BeanBase {
|
|
2400
2426
|
async create(data) {
|
|
2401
2427
|
return await this.scope.model.order.insert(data);
|
|
2402
2428
|
}
|
|
@@ -2408,7 +2434,15 @@ let ControllerOrder = (_dec$9 = Controller('order'), _dec2$9 = BeanInfo({
|
|
|
2408
2434
|
}
|
|
2409
2435
|
});
|
|
2410
2436
|
}
|
|
2411
|
-
|
|
2437
|
+
async findMany(params) {
|
|
2438
|
+
return this.scope.model.order.selectAndCount({
|
|
2439
|
+
...params,
|
|
2440
|
+
include: {
|
|
2441
|
+
products: true
|
|
2442
|
+
}
|
|
2443
|
+
});
|
|
2444
|
+
}
|
|
2445
|
+
}, _applyDecoratedDescriptor(_class2$8.prototype, "create", [_dec3$8, _dec4$8, _dec5$8, _dec6$8, _dec7$8], Object.getOwnPropertyDescriptor(_class2$8.prototype, "create"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "findAll", [_dec8$6, _dec9$5, _dec0$5, _dec1$5, _dec10$4], Object.getOwnPropertyDescriptor(_class2$8.prototype, "findAll"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "findMany", [_dec11$4, _dec12$4, _dec13$3, _dec14$2, _dec15$2], Object.getOwnPropertyDescriptor(_class2$8.prototype, "findMany"), _class2$8.prototype), _class2$8)) || _class$9) || _class$9);
|
|
2412
2446
|
|
|
2413
2447
|
var _dec$8, _dec2$8, _dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7, _dec8$5, _dec9$4, _dec0$4, _dec1$4, _dec10$3, _dec11$3, _dec12$3, _dec13$2, _dec14$1, _dec15$1, _dec16$1, _dec17$1, _dec18$1, _dec19$1, _dec20$1, _dec21$1, _dec22$1, _dec23$1, _dec24$1, _dec25$1, _class$8, _class2$7;
|
|
2414
2448
|
let ControllerPassport = (_dec$8 = Controller({
|
|
@@ -2429,7 +2463,7 @@ let ControllerPassport = (_dec$8 = Controller({
|
|
|
2429
2463
|
}, _dec21$1 = Reflect.metadata("design:type", Function), _dec22$1 = Reflect.metadata("design:paramtypes", [String]), _dec23$1 = Web.post('logout'), _dec24$1 = Reflect.metadata("design:type", Function), _dec25$1 = Reflect.metadata("design:paramtypes", []), _dec$8(_class$8 = _dec2$8(_class$8 = _dec3$7(_class$8 = (_class2$7 = class ControllerPassport extends BeanBase {
|
|
2430
2464
|
echo(name, user) {
|
|
2431
2465
|
assert.equal(name, 'admin');
|
|
2432
|
-
assert.equal(
|
|
2466
|
+
assert.equal(user.name, 'admin');
|
|
2433
2467
|
return {
|
|
2434
2468
|
name,
|
|
2435
2469
|
user
|
|
@@ -2685,10 +2719,10 @@ let ControllerTail = (_dec$3 = Controller({
|
|
|
2685
2719
|
cast(this.ctx)._tail_test = 1;
|
|
2686
2720
|
|
|
2687
2721
|
// tail
|
|
2688
|
-
this.ctx.
|
|
2722
|
+
this.ctx.commit(() => {
|
|
2689
2723
|
assert.equal(cast(this.ctx)._tail_test_als_caller, undefined);
|
|
2690
2724
|
assert.equal(cast(this.ctx)._tail_test, 2);
|
|
2691
|
-
this.ctx.
|
|
2725
|
+
this.ctx.commit(() => {
|
|
2692
2726
|
assert.equal(cast(this.ctx)._tail_test, 3);
|
|
2693
2727
|
});
|
|
2694
2728
|
cast(this.ctx)._tail_test = 3;
|
|
@@ -2734,7 +2768,7 @@ let ControllerUpload = (_dec$1 = Controller({
|
|
|
2734
2768
|
}), _dec3 = Web.post('fields'), _dec4 = Passport.public(), _dec5 = File.upload(), _dec6 = Api.contentType('application/json'), _dec7 = function (target, key) {
|
|
2735
2769
|
return Arg.fields()(target, key, 0);
|
|
2736
2770
|
}, _dec8 = function (target, key) {
|
|
2737
|
-
return Arg.fields('checkes', v.array(z.string()))(target, key, 1);
|
|
2771
|
+
return Arg.fields('checkes', v.array(z$1.string()))(target, key, 1);
|
|
2738
2772
|
}, _dec9 = function (target, key) {
|
|
2739
2773
|
return Arg.field('name', v.default('zhennann'), v.title('your name'))(target, key, 2);
|
|
2740
2774
|
}, _dec0 = Reflect.metadata("design:type", Function), _dec1 = Reflect.metadata("design:paramtypes", [Array, Array, String]), _dec10 = Web.post('file'), _dec11 = Passport.public(), _dec12 = File.upload(), _dec13 = Api.contentType('application/json'), _dec14 = function (target, key) {
|
|
@@ -2825,4 +2859,4 @@ function $locale(key) {
|
|
|
2825
2859
|
}
|
|
2826
2860
|
/** scope: end */
|
|
2827
2861
|
|
|
2828
|
-
export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, CacheRedisPost, CacheRedisTest, ControllerBean, ControllerCacheMem, ControllerCacheRedis, ControllerCaptcha, ControllerDtoTest, ControllerGuardPassport, ControllerOnion, ControllerOrder, ControllerPassport, ControllerPerformAction, ControllerPost, ControllerQueue, ControllerSummer, ControllerTail, ControllerTransaction, ControllerUpload, DtoCategoryTree, DtoOrderCreate, DtoOrderQuery, DtoOrderResult, DtoOrderUpdate, DtoPostCreate, DtoPostQuery, DtoPostQueryRes, DtoProfile, DtoRoleLazy, DtoSignin, DtoUser, DtoUserCreate, DtoUserLazy, DtoUserUpdate, EntityCategory, EntityOrder, EntityPost, EntityPostContent, EntityProduct, EntityRole, EntityRoleUser, EntityTest, EntityUser, EventHelloEcho, EventListenerHelloEcho, MetaVersion, ModelCategory, ModelCategoryChain, ModelOrder, ModelOrderStats, ModelPost, ModelPostContent, ModelProduct, ModelRole, ModelRoleUser, ModelTest, ModelTestDynamicTable, ModelUser, ModelUserStats, ModelUserStatsGroup, QueueTest, ScheduleTest, ScheduleTest3, ScopeModuleTestVona, ServiceAopMethod, ServiceCaching, ServiceCategory, ServiceOrder, ServicePost, ServiceProduct, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTestData, ServiceTransaction, ServiceUser, SummerCacheTest, config, locales };
|
|
2862
|
+
export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, CacheRedisPost, CacheRedisTest, ControllerBean, ControllerCacheMem, ControllerCacheRedis, ControllerCaptcha, ControllerDtoTest, ControllerGuardPassport, ControllerOnion, ControllerOrder, ControllerPassport, ControllerPerformAction, ControllerPost, ControllerQueue, ControllerSummer, ControllerTail, ControllerTransaction, ControllerUpload, DtoCategoryTree, DtoOrderCreate, DtoOrderQuery, DtoOrderQueryPage, DtoOrderResult, DtoOrderResultPage, DtoOrderUpdate, DtoPostCreate, DtoPostQuery, DtoPostQueryRes, DtoProfile, DtoRoleLazy, DtoSignin, DtoUser, DtoUserCreate, DtoUserLazy, DtoUserUpdate, EntityCategory, EntityOrder, EntityPost, EntityPostContent, EntityProduct, EntityRole, EntityRoleUser, EntityTest, EntityUser, EventHelloEcho, EventListenerHelloEcho, MetaVersion, ModelCategory, ModelCategoryChain, ModelOrder, ModelOrderStats, ModelPost, ModelPostContent, ModelProduct, ModelRole, ModelRoleUser, ModelTest, ModelTestDynamicTable, ModelUser, ModelUserStats, ModelUserStatsGroup, QueueTest, ScheduleTest, ScheduleTest3, ScopeModuleTestVona, ServiceAopMethod, ServiceCaching, ServiceCategory, ServiceOrder, ServicePost, ServiceProduct, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTestData, ServiceTransaction, ServiceUser, SummerCacheTest, config, locales };
|