vona-module-test-vona 5.0.32 → 5.0.33
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.
|
@@ -143,6 +143,7 @@ declare module 'vona-module-test-vona' {
|
|
|
143
143
|
/** entity: end */
|
|
144
144
|
/** model: begin */
|
|
145
145
|
export * from '../model/category.ts';
|
|
146
|
+
export * from '../model/categoryChain.ts';
|
|
146
147
|
export * from '../model/post.ts';
|
|
147
148
|
export * from '../model/postContent.ts';
|
|
148
149
|
export * from '../model/role.ts';
|
|
@@ -153,6 +154,7 @@ export * from '../model/user.ts';
|
|
|
153
154
|
export * from '../model/userStats.ts';
|
|
154
155
|
export * from '../model/userStatsGroup.ts';
|
|
155
156
|
import type { IModelOptionsCategory } from '../model/category.ts';
|
|
157
|
+
import type { IModelOptionsCategoryChain } from '../model/categoryChain.ts';
|
|
156
158
|
import type { IModelOptionsPost } from '../model/post.ts';
|
|
157
159
|
import type { IModelOptionsPostContent } from '../model/postContent.ts';
|
|
158
160
|
import type { IModelOptionsRole } from '../model/role.ts';
|
|
@@ -166,6 +168,7 @@ import 'vona';
|
|
|
166
168
|
declare module 'vona-module-a-orm' {
|
|
167
169
|
interface IModelRecord {
|
|
168
170
|
'test-vona:category': IModelOptionsCategory;
|
|
171
|
+
'test-vona:categoryChain': IModelOptionsCategoryChain;
|
|
169
172
|
'test-vona:post': IModelOptionsPost;
|
|
170
173
|
'test-vona:postContent': IModelOptionsPostContent;
|
|
171
174
|
'test-vona:role': IModelOptionsRole;
|
|
@@ -184,6 +187,12 @@ declare module 'vona-module-test-vona' {
|
|
|
184
187
|
get $beanFullName(): 'test-vona.model.category';
|
|
185
188
|
get $onionName(): 'test-vona:category';
|
|
186
189
|
}
|
|
190
|
+
interface ModelCategoryChain {
|
|
191
|
+
}
|
|
192
|
+
interface ModelCategoryChain {
|
|
193
|
+
get $beanFullName(): 'test-vona.model.categoryChain';
|
|
194
|
+
get $onionName(): 'test-vona:categoryChain';
|
|
195
|
+
}
|
|
187
196
|
interface ModelPost {
|
|
188
197
|
}
|
|
189
198
|
interface ModelPost {
|
|
@@ -242,6 +251,7 @@ declare module 'vona-module-test-vona' {
|
|
|
242
251
|
/** model: end */
|
|
243
252
|
/** model: begin */
|
|
244
253
|
import type { ModelCategory } from '../model/category.ts';
|
|
254
|
+
import type { ModelCategoryChain } from '../model/categoryChain.ts';
|
|
245
255
|
import type { ModelPost } from '../model/post.ts';
|
|
246
256
|
import type { ModelPostContent } from '../model/postContent.ts';
|
|
247
257
|
import type { ModelRole } from '../model/role.ts';
|
|
@@ -253,6 +263,7 @@ import type { ModelUserStats } from '../model/userStats.ts';
|
|
|
253
263
|
import type { ModelUserStatsGroup } from '../model/userStatsGroup.ts';
|
|
254
264
|
export interface IModuleModel {
|
|
255
265
|
'category': ModelCategory;
|
|
266
|
+
'categoryChain': ModelCategoryChain;
|
|
256
267
|
'post': ModelPost;
|
|
257
268
|
'postContent': ModelPostContent;
|
|
258
269
|
'role': ModelRole;
|
|
@@ -273,6 +284,11 @@ declare module 'vona-module-test-vona' {
|
|
|
273
284
|
children: IModelRelationHasMany<ModelCategory, true, 'id' | 'name', undefined, undefined, undefined>;
|
|
274
285
|
};
|
|
275
286
|
}
|
|
287
|
+
interface IModelOptionsCategoryChain {
|
|
288
|
+
relations: {
|
|
289
|
+
parent: IModelRelationBelongsTo<ModelCategoryChain, ModelCategoryChain, true, 'id' | 'name' | 'categoryIdParent'>;
|
|
290
|
+
};
|
|
291
|
+
}
|
|
276
292
|
interface IModelOptionsPost {
|
|
277
293
|
relations: {
|
|
278
294
|
postContent: IModelRelationHasOne<'test-vona:postContent', false, 'id' | 'content'>;
|
|
@@ -336,6 +352,25 @@ declare module 'vona-module-test-vona' {
|
|
|
336
352
|
aggregate<T extends IModelSelectAggrParams<EntityCategory, ModelCategory, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelAggrRelationResult<T>>;
|
|
337
353
|
group<T extends IModelSelectGroupParams<EntityCategory, ModelCategory, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelGroupRelationResult<EntityCategory, T>[]>;
|
|
338
354
|
}
|
|
355
|
+
interface ModelCategoryChain {
|
|
356
|
+
[SymbolKeyEntity]: EntityCategory;
|
|
357
|
+
[SymbolKeyEntityMeta]: EntityCategoryMeta;
|
|
358
|
+
[SymbolKeyModelOptions]: IModelOptionsCategoryChain;
|
|
359
|
+
get<T extends IModelGetOptions<EntityCategory, ModelCategoryChain>>(where: TypeModelWhere<EntityCategory>, options?: T): Promise<TypeModelRelationResult<EntityCategory, ModelCategoryChain, T> | undefined>;
|
|
360
|
+
mget<T extends IModelGetOptions<EntityCategory, ModelCategoryChain>>(ids: TableIdentity[], options?: T): Promise<TypeModelRelationResult<EntityCategory, ModelCategoryChain, T>[]>;
|
|
361
|
+
select<T extends IModelSelectParams<EntityCategory, ModelCategoryChain, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelRelationResult<EntityCategory, ModelCategoryChain, T>[]>;
|
|
362
|
+
insert<T extends IModelInsertOptions<EntityCategory, ModelCategoryChain>>(data?: TypeModelMutateRelationData<EntityCategory, ModelCategoryChain, T>, options?: T): Promise<Required<TypeModelMutateRelationData<EntityCategory, ModelCategoryChain, T>>>;
|
|
363
|
+
insertBulk<T extends IModelInsertOptions<EntityCategory, ModelCategoryChain>>(items: TypeModelMutateRelationData<EntityCategory, ModelCategoryChain, T>[], options?: T): Promise<Required<TypeModelMutateRelationData<EntityCategory, ModelCategoryChain, T>>[]>;
|
|
364
|
+
update<T extends IModelUpdateOptions<EntityCategory, ModelCategoryChain>>(data: TypeModelMutateRelationData<EntityCategory, ModelCategoryChain, T>, options?: T): Promise<TypeModelMutateRelationData<EntityCategory, ModelCategoryChain, T>>;
|
|
365
|
+
updateBulk<T extends IModelUpdateOptions<EntityCategory, ModelCategoryChain>>(items: TypeModelMutateRelationData<EntityCategory, ModelCategoryChain, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityCategory, ModelCategoryChain, T>[]>;
|
|
366
|
+
delete<T extends IModelDeleteOptions<EntityCategory, ModelCategoryChain>>(where?: TypeModelWhere<EntityCategory>, options?: T): Promise<void>;
|
|
367
|
+
deleteBulk<T extends IModelDeleteOptions<EntityCategory, ModelCategoryChain>>(ids: TableIdentity[], options?: T): Promise<void>;
|
|
368
|
+
mutate<T extends IModelMutateOptions<EntityCategory, ModelCategoryChain>>(data?: TypeModelMutateRelationData<EntityCategory, ModelCategoryChain, T>, options?: T): Promise<TypeModelMutateRelationData<EntityCategory, ModelCategoryChain, T>>;
|
|
369
|
+
mutateBulk<T extends IModelMutateOptions<EntityCategory, ModelCategoryChain>>(items: TypeModelMutateRelationData<EntityCategory, ModelCategoryChain, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityCategory, ModelCategoryChain, T>[]>;
|
|
370
|
+
count<T extends IModelSelectCountParams<EntityCategory, ModelCategoryChain, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<BigNumber | undefined>;
|
|
371
|
+
aggregate<T extends IModelSelectAggrParams<EntityCategory, ModelCategoryChain, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelAggrRelationResult<T>>;
|
|
372
|
+
group<T extends IModelSelectGroupParams<EntityCategory, ModelCategoryChain, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelGroupRelationResult<EntityCategory, T>[]>;
|
|
373
|
+
}
|
|
339
374
|
interface ModelPost {
|
|
340
375
|
[SymbolKeyEntity]: EntityPost;
|
|
341
376
|
[SymbolKeyEntityMeta]: EntityPostMeta;
|
|
@@ -511,6 +546,7 @@ declare module 'vona-module-test-vona' {
|
|
|
511
546
|
declare module 'vona-module-a-orm' {
|
|
512
547
|
interface IModelClassRecord {
|
|
513
548
|
'test-vona:category': ModelCategory;
|
|
549
|
+
'test-vona:categoryChain': ModelCategoryChain;
|
|
514
550
|
'test-vona:post': ModelPost;
|
|
515
551
|
'test-vona:postContent': ModelPostContent;
|
|
516
552
|
'test-vona:role': ModelRole;
|
|
@@ -19,8 +19,8 @@ export declare class ControllerDtoTest extends BeanBase {
|
|
|
19
19
|
}>>;
|
|
20
20
|
getCategoryTree(): Promise<import("vona-module-a-orm").TypeModelRelationResult_Normal<import("vona-module-test-vona").EntityCategory, import("vona-module-test-vona").ModelCategory, {
|
|
21
21
|
columns: ("name" | "id")[];
|
|
22
|
-
}, undefined>[]>;
|
|
22
|
+
}, undefined, 50>[]>;
|
|
23
23
|
getCategoryTree2(): Promise<import("vona-module-a-orm").TypeModelRelationResult_Normal<import("vona-module-test-vona").EntityCategory, import("vona-module-test-vona").ModelCategory, {
|
|
24
24
|
columns: ("name" | "id")[];
|
|
25
|
-
}, undefined>[]>;
|
|
25
|
+
}, undefined, 50>[]>;
|
|
26
26
|
}
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import { BeanInfo, BeanAopBase, BeanAopMethodBase, BeanBase, cast, retry, BeanSc
|
|
|
2
2
|
import { Aop, AopMethod, Aspect } from 'vona-module-a-aspect';
|
|
3
3
|
import { Api, v, Arg } from 'vona-module-a-openapi';
|
|
4
4
|
import { Entity, EntityBase, Model, $relation, BeanModelBase, Database, $Dto, TableIdentity as TableIdentity$1 } from 'vona-module-a-orm';
|
|
5
|
+
import { ModelCategoryChain as ModelCategoryChain$1 } from 'vona-module-test-vona';
|
|
5
6
|
import moment from 'moment';
|
|
6
7
|
import { Bean, Service, Scope } from 'vona-module-a-bean';
|
|
7
8
|
import { getKeyHash, CacheMem, BeanCacheMemBase, CacheRedis, BeanCacheRedisBase } from 'vona-module-a-cache';
|
|
@@ -21,15 +22,15 @@ import { z } from 'zod';
|
|
|
21
22
|
import { DtoJwtToken } from 'vona-module-a-jwt';
|
|
22
23
|
import { SymbolUploadValue } from 'vona-module-a-upload';
|
|
23
24
|
|
|
24
|
-
var _dec$
|
|
25
|
-
let AopRegExp = (_dec$
|
|
25
|
+
var _dec$Y, _dec2$Y, _class$Y;
|
|
26
|
+
let AopRegExp = (_dec$Y = Aop({
|
|
26
27
|
match: [/^test-vona\.service\.test\w+$/, 'testCtx'],
|
|
27
28
|
meta: {
|
|
28
29
|
mode: 'test'
|
|
29
30
|
}
|
|
30
|
-
}), _dec2$
|
|
31
|
+
}), _dec2$Y = BeanInfo({
|
|
31
32
|
module: "test-vona"
|
|
32
|
-
}), _dec$
|
|
33
|
+
}), _dec$Y(_class$Y = _dec2$Y(_class$Y = class AopRegExp extends BeanAopBase {
|
|
33
34
|
__get_name__(next) {
|
|
34
35
|
const value = next();
|
|
35
36
|
return `${value}:regexpaop`;
|
|
@@ -51,24 +52,24 @@ let AopRegExp = (_dec$X = Aop({
|
|
|
51
52
|
const result = await next();
|
|
52
53
|
return `${result}:regexpaop`;
|
|
53
54
|
}
|
|
54
|
-
}) || _class$
|
|
55
|
+
}) || _class$Y) || _class$Y);
|
|
55
56
|
|
|
56
|
-
var _dec$
|
|
57
|
+
var _dec$X, _dec2$X, _class$X;
|
|
57
58
|
class AopSimpleBase extends BeanAopBase {
|
|
58
59
|
actionSync(_args, next) {
|
|
59
60
|
const result = next();
|
|
60
61
|
return `${result}:simpleaop`;
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
|
-
let AopSimple = (_dec$
|
|
64
|
+
let AopSimple = (_dec$X = Aop({
|
|
64
65
|
match: 'testCtx',
|
|
65
66
|
dependencies: 'test-vona:regExp',
|
|
66
67
|
meta: {
|
|
67
68
|
mode: 'test'
|
|
68
69
|
}
|
|
69
|
-
}), _dec2$
|
|
70
|
+
}), _dec2$X = BeanInfo({
|
|
70
71
|
module: "test-vona"
|
|
71
|
-
}), _dec$
|
|
72
|
+
}), _dec$X(_class$X = _dec2$X(_class$X = class AopSimple extends AopSimpleBase {
|
|
72
73
|
// magic
|
|
73
74
|
__get__(prop, next) {
|
|
74
75
|
const value = next();
|
|
@@ -108,14 +109,14 @@ let AopSimple = (_dec$W = Aop({
|
|
|
108
109
|
const result = await next();
|
|
109
110
|
return `${result}:simpleaop`;
|
|
110
111
|
}
|
|
111
|
-
}) || _class$
|
|
112
|
+
}) || _class$X) || _class$X);
|
|
112
113
|
|
|
113
|
-
var _dec$
|
|
114
|
-
let AopMethodTest = (_dec$
|
|
114
|
+
var _dec$W, _dec2$W, _class$W;
|
|
115
|
+
let AopMethodTest = (_dec$W = AopMethod({
|
|
115
116
|
wrapper: ''
|
|
116
|
-
}), _dec2$
|
|
117
|
+
}), _dec2$W = BeanInfo({
|
|
117
118
|
module: "test-vona"
|
|
118
|
-
}), _dec$
|
|
119
|
+
}), _dec$W(_class$W = _dec2$W(_class$W = class AopMethodTest extends BeanAopMethodBase {
|
|
119
120
|
get(options, next, _receiver, _prop) {
|
|
120
121
|
const res = next();
|
|
121
122
|
return this._wrapper(options.wrapper, res);
|
|
@@ -142,7 +143,7 @@ let AopMethodTest = (_dec$V = AopMethod({
|
|
|
142
143
|
if (index === data.length - wrapper.length) data = data.substring(0, index);
|
|
143
144
|
return data;
|
|
144
145
|
}
|
|
145
|
-
}) || _class$
|
|
146
|
+
}) || _class$W) || _class$W);
|
|
146
147
|
|
|
147
148
|
function _applyDecoratedDescriptor(i, e, r, n, l) {
|
|
148
149
|
var a = {};
|
|
@@ -161,10 +162,10 @@ function _initializerDefineProperty(e, i, r, l) {
|
|
|
161
162
|
});
|
|
162
163
|
}
|
|
163
164
|
|
|
164
|
-
var _dec$
|
|
165
|
-
let EntityCategory = (_dec$
|
|
165
|
+
var _dec$V, _dec2$V, _dec3$q, _dec4$q, _dec5$p, _dec6$p, _class$V, _class2$q, _descriptor$a, _descriptor2$9;
|
|
166
|
+
let EntityCategory = (_dec$V = Entity('testVonaCategory'), _dec2$V = BeanInfo({
|
|
166
167
|
module: "test-vona"
|
|
167
|
-
}), _dec3$q = Api.field(), _dec4$q = Reflect.metadata("design:type", String), _dec5$p = Api.field(v.tableIdentity()), _dec6$p = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$
|
|
168
|
+
}), _dec3$q = Api.field(), _dec4$q = Reflect.metadata("design:type", String), _dec5$p = Api.field(v.optional(), v.tableIdentity()), _dec6$p = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$V(_class$V = _dec2$V(_class$V = (_class2$q = class EntityCategory extends EntityBase {
|
|
168
169
|
constructor(...args) {
|
|
169
170
|
super(...args);
|
|
170
171
|
_initializerDefineProperty(this, "name", _descriptor$a, this);
|
|
@@ -180,12 +181,12 @@ let EntityCategory = (_dec$U = Entity('testVonaCategory'), _dec2$U = BeanInfo({
|
|
|
180
181
|
enumerable: true,
|
|
181
182
|
writable: true,
|
|
182
183
|
initializer: null
|
|
183
|
-
}), _class2$q)) || _class$
|
|
184
|
+
}), _class2$q)) || _class$V) || _class$V);
|
|
184
185
|
|
|
185
|
-
var _dec$
|
|
186
|
-
let EntityPost = (_dec$
|
|
186
|
+
var _dec$U, _dec2$U, _dec3$p, _dec4$p, _dec5$o, _dec6$o, _dec7$k, _dec8$g, _class$U, _class2$p, _descriptor$9, _descriptor2$8, _descriptor3$4;
|
|
187
|
+
let EntityPost = (_dec$U = Entity('testVonaPost'), _dec2$U = BeanInfo({
|
|
187
188
|
module: "test-vona"
|
|
188
|
-
}), _dec3$p = Api.field(), _dec4$p = Reflect.metadata("design:type", String), _dec5$o = Api.field(v.tableIdentity()), _dec6$o = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec7$k = Api.field(v.optional()), _dec8$g = Reflect.metadata("design:type", Number), _dec$
|
|
189
|
+
}), _dec3$p = Api.field(), _dec4$p = Reflect.metadata("design:type", String), _dec5$o = Api.field(v.tableIdentity()), _dec6$o = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec7$k = Api.field(v.optional()), _dec8$g = Reflect.metadata("design:type", Number), _dec$U(_class$U = _dec2$U(_class$U = (_class2$p = class EntityPost extends EntityBase {
|
|
189
190
|
constructor(...args) {
|
|
190
191
|
super(...args);
|
|
191
192
|
_initializerDefineProperty(this, "title", _descriptor$9, this);
|
|
@@ -207,12 +208,12 @@ let EntityPost = (_dec$T = Entity('testVonaPost'), _dec2$T = BeanInfo({
|
|
|
207
208
|
enumerable: true,
|
|
208
209
|
writable: true,
|
|
209
210
|
initializer: null
|
|
210
|
-
}), _class2$p)) || _class$
|
|
211
|
+
}), _class2$p)) || _class$U) || _class$U);
|
|
211
212
|
|
|
212
|
-
var _dec$
|
|
213
|
-
let EntityPostContent = (_dec$
|
|
213
|
+
var _dec$T, _dec2$T, _dec3$o, _dec4$o, _dec5$n, _dec6$n, _class$T, _class2$o, _descriptor$8, _descriptor2$7;
|
|
214
|
+
let EntityPostContent = (_dec$T = Entity('testVonaPostContent'), _dec2$T = BeanInfo({
|
|
214
215
|
module: "test-vona"
|
|
215
|
-
}), _dec3$o = Api.field(), _dec4$o = Reflect.metadata("design:type", String), _dec5$n = Api.field(v.tableIdentity()), _dec6$n = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$
|
|
216
|
+
}), _dec3$o = Api.field(), _dec4$o = Reflect.metadata("design:type", String), _dec5$n = Api.field(v.tableIdentity()), _dec6$n = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$T(_class$T = _dec2$T(_class$T = (_class2$o = class EntityPostContent extends EntityBase {
|
|
216
217
|
constructor(...args) {
|
|
217
218
|
super(...args);
|
|
218
219
|
_initializerDefineProperty(this, "content", _descriptor$8, this);
|
|
@@ -228,12 +229,12 @@ let EntityPostContent = (_dec$S = Entity('testVonaPostContent'), _dec2$S = BeanI
|
|
|
228
229
|
enumerable: true,
|
|
229
230
|
writable: true,
|
|
230
231
|
initializer: null
|
|
231
|
-
}), _class2$o)) || _class$
|
|
232
|
+
}), _class2$o)) || _class$T) || _class$T);
|
|
232
233
|
|
|
233
|
-
var _dec$
|
|
234
|
-
let EntityRole = (_dec$
|
|
234
|
+
var _dec$S, _dec2$S, _dec3$n, _dec4$n, _class$S, _class2$n, _descriptor$7;
|
|
235
|
+
let EntityRole = (_dec$S = Entity('testVonaRole'), _dec2$S = BeanInfo({
|
|
235
236
|
module: "test-vona"
|
|
236
|
-
}), _dec3$n = Api.field(), _dec4$n = Reflect.metadata("design:type", String), _dec$
|
|
237
|
+
}), _dec3$n = Api.field(), _dec4$n = Reflect.metadata("design:type", String), _dec$S(_class$S = _dec2$S(_class$S = (_class2$n = class EntityRole extends EntityBase {
|
|
237
238
|
constructor(...args) {
|
|
238
239
|
super(...args);
|
|
239
240
|
_initializerDefineProperty(this, "name", _descriptor$7, this);
|
|
@@ -243,12 +244,12 @@ let EntityRole = (_dec$R = Entity('testVonaRole'), _dec2$R = BeanInfo({
|
|
|
243
244
|
enumerable: true,
|
|
244
245
|
writable: true,
|
|
245
246
|
initializer: null
|
|
246
|
-
}), _class2$n)) || _class$
|
|
247
|
+
}), _class2$n)) || _class$S) || _class$S);
|
|
247
248
|
|
|
248
|
-
var _dec$
|
|
249
|
-
let EntityRoleUser = (_dec$
|
|
249
|
+
var _dec$R, _dec2$R, _dec3$m, _dec4$m, _dec5$m, _dec6$m, _class$R, _class2$m, _descriptor$6, _descriptor2$6;
|
|
250
|
+
let EntityRoleUser = (_dec$R = Entity('testVonaRoleUser'), _dec2$R = BeanInfo({
|
|
250
251
|
module: "test-vona"
|
|
251
|
-
}), _dec3$m = Api.field(v.tableIdentity()), _dec4$m = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec5$m = Api.field(v.tableIdentity()), _dec6$m = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$
|
|
252
|
+
}), _dec3$m = Api.field(v.tableIdentity()), _dec4$m = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec5$m = Api.field(v.tableIdentity()), _dec6$m = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$R(_class$R = _dec2$R(_class$R = (_class2$m = class EntityRoleUser extends EntityBase {
|
|
252
253
|
constructor(...args) {
|
|
253
254
|
super(...args);
|
|
254
255
|
_initializerDefineProperty(this, "userId", _descriptor$6, this);
|
|
@@ -264,18 +265,18 @@ let EntityRoleUser = (_dec$Q = Entity('testVonaRoleUser'), _dec2$Q = BeanInfo({
|
|
|
264
265
|
enumerable: true,
|
|
265
266
|
writable: true,
|
|
266
267
|
initializer: null
|
|
267
|
-
}), _class2$m)) || _class$
|
|
268
|
+
}), _class2$m)) || _class$R) || _class$R);
|
|
268
269
|
|
|
269
|
-
var _dec$
|
|
270
|
-
let EntityTest = (_dec$
|
|
270
|
+
var _dec$Q, _dec2$Q, _dec3$l, _dec4$l, _dec5$l, _dec6$l, _dec7$j, _dec8$f, _class$Q, _class2$l, _descriptor$5, _descriptor2$5, _descriptor3$3;
|
|
271
|
+
let EntityTest = (_dec$Q = Entity('testVonaTest', {
|
|
271
272
|
openapi: {
|
|
272
273
|
title: $locale('Test')
|
|
273
274
|
}
|
|
274
|
-
}), _dec2$
|
|
275
|
+
}), _dec2$Q = BeanInfo({
|
|
275
276
|
module: "test-vona"
|
|
276
277
|
}), _dec3$l = Api.field(v.title($locale('Test'))), _dec4$l = Reflect.metadata("design:type", String), _dec5$l = Api.field(), _dec6$l = Reflect.metadata("design:type", String), _dec7$j = Api.field(v.default(() => {
|
|
277
278
|
return new Date();
|
|
278
|
-
})), _dec8$f = Reflect.metadata("design:type", typeof Date === "undefined" ? Object : Date), _dec$
|
|
279
|
+
})), _dec8$f = Reflect.metadata("design:type", typeof Date === "undefined" ? Object : Date), _dec$Q(_class$Q = _dec2$Q(_class$Q = (_class2$l = class EntityTest extends EntityBase {
|
|
279
280
|
constructor(...args) {
|
|
280
281
|
super(...args);
|
|
281
282
|
_initializerDefineProperty(this, "title", _descriptor$5, this);
|
|
@@ -297,12 +298,12 @@ let EntityTest = (_dec$P = Entity('testVonaTest', {
|
|
|
297
298
|
enumerable: true,
|
|
298
299
|
writable: true,
|
|
299
300
|
initializer: null
|
|
300
|
-
}), _class2$l)) || _class$
|
|
301
|
+
}), _class2$l)) || _class$Q) || _class$Q);
|
|
301
302
|
|
|
302
|
-
var _dec$
|
|
303
|
-
let EntityUser = (_dec$
|
|
303
|
+
var _dec$P, _dec2$P, _dec3$k, _dec4$k, _dec5$k, _dec6$k, _dec7$i, _dec8$e, _class$P, _class2$k, _descriptor$4, _descriptor2$4, _descriptor3$2;
|
|
304
|
+
let EntityUser = (_dec$P = Entity('testVonaUser'), _dec2$P = BeanInfo({
|
|
304
305
|
module: "test-vona"
|
|
305
|
-
}), _dec3$k = Api.field(), _dec4$k = Reflect.metadata("design:type", String), _dec5$k = Api.field(v.optional()), _dec6$k = Reflect.metadata("design:type", Number), _dec7$i = Api.field(v.optional()), _dec8$e = Reflect.metadata("design:type", Number), _dec$
|
|
306
|
+
}), _dec3$k = Api.field(), _dec4$k = Reflect.metadata("design:type", String), _dec5$k = Api.field(v.optional()), _dec6$k = Reflect.metadata("design:type", Number), _dec7$i = Api.field(v.optional()), _dec8$e = Reflect.metadata("design:type", Number), _dec$P(_class$P = _dec2$P(_class$P = (_class2$k = class EntityUser extends EntityBase {
|
|
306
307
|
constructor(...args) {
|
|
307
308
|
super(...args);
|
|
308
309
|
_initializerDefineProperty(this, "name", _descriptor$4, this);
|
|
@@ -324,20 +325,36 @@ let EntityUser = (_dec$O = Entity('testVonaUser'), _dec2$O = BeanInfo({
|
|
|
324
325
|
enumerable: true,
|
|
325
326
|
writable: true,
|
|
326
327
|
initializer: null
|
|
327
|
-
}), _class2$k)) || _class$
|
|
328
|
+
}), _class2$k)) || _class$P) || _class$P);
|
|
328
329
|
|
|
329
|
-
var _dec$
|
|
330
|
-
let ModelCategory = (_dec$
|
|
330
|
+
var _dec$O, _dec2$O, _class$O;
|
|
331
|
+
let ModelCategory = (_dec$O = Model({
|
|
331
332
|
entity: EntityCategory,
|
|
332
333
|
relations: {
|
|
333
334
|
children: $relation.hasMany(() => ModelCategory, 'categoryIdParent', {
|
|
334
335
|
autoload: true,
|
|
335
336
|
columns: ['id', 'name']
|
|
336
337
|
})
|
|
338
|
+
},
|
|
339
|
+
cache: {
|
|
340
|
+
modelsClear: () => ModelCategoryChain$1
|
|
341
|
+
}
|
|
342
|
+
}), _dec2$O = BeanInfo({
|
|
343
|
+
module: "test-vona"
|
|
344
|
+
}), _dec$O(_class$O = _dec2$O(_class$O = class ModelCategory extends BeanModelBase {}) || _class$O) || _class$O);
|
|
345
|
+
|
|
346
|
+
var _dec$N, _dec2$N, _class$N;
|
|
347
|
+
let ModelCategoryChain = (_dec$N = Model({
|
|
348
|
+
entity: EntityCategory,
|
|
349
|
+
relations: {
|
|
350
|
+
parent: $relation.belongsTo(() => ModelCategoryChain, () => ModelCategoryChain, 'categoryIdParent', {
|
|
351
|
+
autoload: true,
|
|
352
|
+
columns: ['id', 'name', 'categoryIdParent']
|
|
353
|
+
})
|
|
337
354
|
}
|
|
338
355
|
}), _dec2$N = BeanInfo({
|
|
339
356
|
module: "test-vona"
|
|
340
|
-
}), _dec$N(_class$N = _dec2$N(_class$N = class
|
|
357
|
+
}), _dec$N(_class$N = _dec2$N(_class$N = class ModelCategoryChain extends BeanModelBase {}) || _class$N) || _class$N);
|
|
341
358
|
|
|
342
359
|
var _dec$M, _dec2$M, _class$M;
|
|
343
360
|
let ModelPostContent = (_dec$M = Model({
|
|
@@ -1887,4 +1904,4 @@ function $locale(key) {
|
|
|
1887
1904
|
}
|
|
1888
1905
|
/** scope: end */
|
|
1889
1906
|
|
|
1890
|
-
export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, CacheRedisTest, ControllerBean, ControllerCacheMem, ControllerCacheRedis, ControllerDtoTest, ControllerGuardPassport, ControllerOnion, ControllerPassport, ControllerPerformAction, ControllerQueue, ControllerSummer, ControllerTail, ControllerTransaction, ControllerUpload, DtoCategoryTree, DtoPostCreate, DtoProfile, DtoRoleLazy, DtoUser, DtoUserCreate, DtoUserLazy, DtoUserUpdate, EntityCategory, EntityPost, EntityPostContent, EntityRole, EntityRoleUser, EntityTest, EntityUser, EventHelloEcho, EventListenerHelloEcho, MetaVersion, ModelCategory, ModelPost, ModelPostContent, ModelRole, ModelRoleUser, ModelTest, ModelTestDynamicTable, ModelUser, ModelUserStats, ModelUserStatsGroup, QueueTest, ScheduleTest, ScheduleTest3, ScopeModuleTestVona, ServiceAopMethod, ServiceCaching, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTestData, ServiceTransaction, SummerCacheTest, config, locales };
|
|
1907
|
+
export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, CacheRedisTest, ControllerBean, ControllerCacheMem, ControllerCacheRedis, ControllerDtoTest, ControllerGuardPassport, ControllerOnion, ControllerPassport, ControllerPerformAction, ControllerQueue, ControllerSummer, ControllerTail, ControllerTransaction, ControllerUpload, DtoCategoryTree, DtoPostCreate, DtoProfile, DtoRoleLazy, DtoUser, DtoUserCreate, DtoUserLazy, DtoUserUpdate, EntityCategory, EntityPost, EntityPostContent, EntityRole, EntityRoleUser, EntityTest, EntityUser, EventHelloEcho, EventListenerHelloEcho, MetaVersion, ModelCategory, ModelCategoryChain, ModelPost, ModelPostContent, ModelRole, ModelRoleUser, ModelTest, ModelTestDynamicTable, ModelUser, ModelUserStats, ModelUserStatsGroup, QueueTest, ScheduleTest, ScheduleTest3, ScopeModuleTestVona, ServiceAopMethod, ServiceCaching, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTestData, ServiceTransaction, SummerCacheTest, config, locales };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IDecoratorModelOptions } from 'vona-module-a-orm';
|
|
2
|
+
import { BeanModelBase } from 'vona-module-a-orm';
|
|
3
|
+
import { EntityCategory } from '../entity/category.ts';
|
|
4
|
+
export interface IModelOptionsCategoryChain extends IDecoratorModelOptions<EntityCategory> {
|
|
5
|
+
}
|
|
6
|
+
export declare class ModelCategoryChain extends BeanModelBase<EntityCategory> {
|
|
7
|
+
}
|