vona-module-a-version 5.0.21 → 5.0.23
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 +147 -15
- package/dist/config/locale/en-us.d.ts +2 -0
- package/dist/config/locale/zh-cn.d.ts +2 -0
- package/dist/entity/version.d.ts +3 -2
- package/dist/entity/versionInit.d.ts +2 -2
- package/dist/entity/viewRecord.d.ts +2 -2
- package/dist/index.js +40 -21
- package/dist/model/version.d.ts +7 -0
- package/dist/model/versionInit.d.ts +7 -0
- package/dist/model/viewRecord.d.ts +4 -1
- package/dist/service/database.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TypeEntityMeta, TypeModelsClassLikeGeneral, TypeSymbolKeyFieldsMore } from 'vona-module-a-orm';
|
|
2
2
|
import type { TypeEntityOptionsFields } from 'vona-module-a-openapi';
|
|
3
3
|
/** entity: begin */
|
|
4
4
|
export * from '../entity/version.ts';
|
|
@@ -8,11 +8,11 @@ import type { IEntityOptionsVersion } from '../entity/version.ts';
|
|
|
8
8
|
import type { IEntityOptionsVersionInit } from '../entity/versionInit.ts';
|
|
9
9
|
import type { IEntityOptionsViewRecord } from '../entity/viewRecord.ts';
|
|
10
10
|
import 'vona';
|
|
11
|
-
declare module 'vona-module-a-
|
|
11
|
+
declare module 'vona-module-a-orm' {
|
|
12
12
|
interface IEntityRecord {
|
|
13
|
-
'a-version:version':
|
|
14
|
-
'a-version:versionInit':
|
|
15
|
-
'a-version:viewRecord':
|
|
13
|
+
'a-version:version': IEntityOptionsVersion;
|
|
14
|
+
'a-version:versionInit': IEntityOptionsVersionInit;
|
|
15
|
+
'a-version:viewRecord': IEntityOptionsViewRecord;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
declare module 'vona-module-a-version' {
|
|
@@ -23,16 +23,19 @@ import type { EntityVersion } from '../entity/version.ts';
|
|
|
23
23
|
import type { EntityVersionInit } from '../entity/versionInit.ts';
|
|
24
24
|
import type { EntityViewRecord } from '../entity/viewRecord.ts';
|
|
25
25
|
export interface IModuleEntity {
|
|
26
|
-
'version':
|
|
27
|
-
'versionInit':
|
|
28
|
-
'viewRecord':
|
|
26
|
+
'version': EntityVersionMeta;
|
|
27
|
+
'versionInit': EntityVersionInitMeta;
|
|
28
|
+
'viewRecord': EntityViewRecordMeta;
|
|
29
29
|
}
|
|
30
30
|
/** entity: end */
|
|
31
31
|
/** entity: begin */
|
|
32
32
|
export type EntityVersionTableName = 'aVersion';
|
|
33
33
|
export type EntityVersionInitTableName = 'aVersionInit';
|
|
34
34
|
export type EntityViewRecordTableName = 'aViewRecord';
|
|
35
|
-
|
|
35
|
+
export type EntityVersionMeta = TypeEntityMeta<EntityVersion, EntityVersionTableName>;
|
|
36
|
+
export type EntityVersionInitMeta = TypeEntityMeta<EntityVersionInit, EntityVersionInitTableName>;
|
|
37
|
+
export type EntityViewRecordMeta = TypeEntityMeta<EntityViewRecord, EntityViewRecordTableName>;
|
|
38
|
+
declare module 'vona-module-a-orm' {
|
|
36
39
|
interface ITableRecord {
|
|
37
40
|
'aVersion': never;
|
|
38
41
|
'aVersionInit': never;
|
|
@@ -41,35 +44,132 @@ declare module 'vona-module-a-database' {
|
|
|
41
44
|
}
|
|
42
45
|
declare module 'vona-module-a-version' {
|
|
43
46
|
interface IEntityOptionsVersion {
|
|
44
|
-
fields?: TypeEntityOptionsFields<EntityVersion, IEntityOptionsVersion[
|
|
47
|
+
fields?: TypeEntityOptionsFields<EntityVersion, IEntityOptionsVersion[TypeSymbolKeyFieldsMore]>;
|
|
45
48
|
}
|
|
46
49
|
interface IEntityOptionsVersionInit {
|
|
47
|
-
fields?: TypeEntityOptionsFields<EntityVersionInit, IEntityOptionsVersionInit[
|
|
50
|
+
fields?: TypeEntityOptionsFields<EntityVersionInit, IEntityOptionsVersionInit[TypeSymbolKeyFieldsMore]>;
|
|
48
51
|
}
|
|
49
52
|
interface IEntityOptionsViewRecord {
|
|
50
|
-
fields?: TypeEntityOptionsFields<EntityViewRecord, IEntityOptionsViewRecord[
|
|
53
|
+
fields?: TypeEntityOptionsFields<EntityViewRecord, IEntityOptionsViewRecord[TypeSymbolKeyFieldsMore]>;
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
/** entity: end */
|
|
54
57
|
/** model: begin */
|
|
58
|
+
export * from '../model/version.ts';
|
|
59
|
+
export * from '../model/versionInit.ts';
|
|
55
60
|
export * from '../model/viewRecord.ts';
|
|
56
|
-
import {
|
|
57
|
-
|
|
61
|
+
import type { IModelOptionsVersion } from '../model/version.ts';
|
|
62
|
+
import type { IModelOptionsVersionInit } from '../model/versionInit.ts';
|
|
63
|
+
import type { IModelOptionsViewRecord } from '../model/viewRecord.ts';
|
|
64
|
+
import 'vona';
|
|
65
|
+
declare module 'vona-module-a-orm' {
|
|
58
66
|
interface IModelRecord {
|
|
59
|
-
'a-version:
|
|
67
|
+
'a-version:version': IModelOptionsVersion;
|
|
68
|
+
'a-version:versionInit': IModelOptionsVersionInit;
|
|
69
|
+
'a-version:viewRecord': IModelOptionsViewRecord;
|
|
60
70
|
}
|
|
61
71
|
}
|
|
62
72
|
declare module 'vona-module-a-version' {
|
|
73
|
+
interface ModelVersion {
|
|
74
|
+
}
|
|
75
|
+
interface ModelVersion {
|
|
76
|
+
get $beanFullName(): 'a-version.model.version';
|
|
77
|
+
get $onionName(): 'a-version:version';
|
|
78
|
+
}
|
|
79
|
+
interface ModelVersionInit {
|
|
80
|
+
}
|
|
81
|
+
interface ModelVersionInit {
|
|
82
|
+
get $beanFullName(): 'a-version.model.versionInit';
|
|
83
|
+
get $onionName(): 'a-version:versionInit';
|
|
84
|
+
}
|
|
85
|
+
interface ModelViewRecord {
|
|
86
|
+
}
|
|
63
87
|
interface ModelViewRecord {
|
|
88
|
+
get $beanFullName(): 'a-version.model.viewRecord';
|
|
89
|
+
get $onionName(): 'a-version:viewRecord';
|
|
64
90
|
}
|
|
65
91
|
}
|
|
66
92
|
/** model: end */
|
|
67
93
|
/** model: begin */
|
|
94
|
+
import type { ModelVersion } from '../model/version.ts';
|
|
95
|
+
import type { ModelVersionInit } from '../model/versionInit.ts';
|
|
68
96
|
import type { ModelViewRecord } from '../model/viewRecord.ts';
|
|
69
97
|
export interface IModuleModel {
|
|
98
|
+
'version': ModelVersion;
|
|
99
|
+
'versionInit': ModelVersionInit;
|
|
70
100
|
'viewRecord': ModelViewRecord;
|
|
71
101
|
}
|
|
72
102
|
/** model: end */
|
|
103
|
+
/** model: begin */
|
|
104
|
+
import type { IModelGetOptions, IModelMethodOptions, IModelSelectParams, TableIdentity, TypeModelRelationResult, TypeModelWhere, IModelInsertOptions, TypeModelMutateRelationData, IModelDeleteOptions, IModelUpdateOptions, IModelMutateOptions, IModelSelectCountParams, IModelSelectAggrParams, TypeModelAggrRelationResult, IModelSelectGroupParams, TypeModelGroupRelationResult } from 'vona-module-a-orm';
|
|
105
|
+
import { SymbolKeyEntity, SymbolKeyEntityMeta, SymbolKeyModelOptions } from 'vona-module-a-orm';
|
|
106
|
+
declare module 'vona-module-a-version' {
|
|
107
|
+
interface ModelVersion {
|
|
108
|
+
[SymbolKeyEntity]: EntityVersion;
|
|
109
|
+
[SymbolKeyEntityMeta]: EntityVersionMeta;
|
|
110
|
+
[SymbolKeyModelOptions]: IModelOptionsVersion;
|
|
111
|
+
get<T extends IModelGetOptions<EntityVersion, ModelVersion>>(where: TypeModelWhere<EntityVersion>, options?: T): Promise<TypeModelRelationResult<EntityVersion, ModelVersion, T> | undefined>;
|
|
112
|
+
mget<T extends IModelGetOptions<EntityVersion, ModelVersion>>(ids: TableIdentity[], options?: T): Promise<TypeModelRelationResult<EntityVersion, ModelVersion, T>[]>;
|
|
113
|
+
select<T extends IModelSelectParams<EntityVersion, ModelVersion, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelRelationResult<EntityVersion, ModelVersion, T>[]>;
|
|
114
|
+
insert<T extends IModelInsertOptions<EntityVersion, ModelVersion>>(data?: TypeModelMutateRelationData<EntityVersion, ModelVersion, T>, options?: T): Promise<Required<TypeModelMutateRelationData<EntityVersion, ModelVersion, T>>>;
|
|
115
|
+
insertBulk<T extends IModelInsertOptions<EntityVersion, ModelVersion>>(items: TypeModelMutateRelationData<EntityVersion, ModelVersion, T>[], options?: T): Promise<Required<TypeModelMutateRelationData<EntityVersion, ModelVersion, T>>[]>;
|
|
116
|
+
update<T extends IModelUpdateOptions<EntityVersion, ModelVersion>>(data: TypeModelMutateRelationData<EntityVersion, ModelVersion, T>, options?: T): Promise<TypeModelMutateRelationData<EntityVersion, ModelVersion, T>>;
|
|
117
|
+
updateBulk<T extends IModelUpdateOptions<EntityVersion, ModelVersion>>(items: TypeModelMutateRelationData<EntityVersion, ModelVersion, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityVersion, ModelVersion, T>[]>;
|
|
118
|
+
delete<T extends IModelDeleteOptions<EntityVersion, ModelVersion>>(where?: TypeModelWhere<EntityVersion>, options?: T): Promise<void>;
|
|
119
|
+
deleteBulk<T extends IModelDeleteOptions<EntityVersion, ModelVersion>>(ids: TableIdentity[], options?: T): Promise<void>;
|
|
120
|
+
mutate<T extends IModelMutateOptions<EntityVersion, ModelVersion>>(data?: TypeModelMutateRelationData<EntityVersion, ModelVersion, T>, options?: T): Promise<TypeModelMutateRelationData<EntityVersion, ModelVersion, T>>;
|
|
121
|
+
mutateBulk<T extends IModelMutateOptions<EntityVersion, ModelVersion>>(items: TypeModelMutateRelationData<EntityVersion, ModelVersion, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityVersion, ModelVersion, T>[]>;
|
|
122
|
+
count<T extends IModelSelectCountParams<EntityVersion, ModelVersion, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<BigNumber | undefined>;
|
|
123
|
+
aggregate<T extends IModelSelectAggrParams<EntityVersion, ModelVersion, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelAggrRelationResult<T>>;
|
|
124
|
+
group<T extends IModelSelectGroupParams<EntityVersion, ModelVersion, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelGroupRelationResult<EntityVersion, T>[]>;
|
|
125
|
+
}
|
|
126
|
+
interface ModelVersionInit {
|
|
127
|
+
[SymbolKeyEntity]: EntityVersionInit;
|
|
128
|
+
[SymbolKeyEntityMeta]: EntityVersionInitMeta;
|
|
129
|
+
[SymbolKeyModelOptions]: IModelOptionsVersionInit;
|
|
130
|
+
get<T extends IModelGetOptions<EntityVersionInit, ModelVersionInit>>(where: TypeModelWhere<EntityVersionInit>, options?: T): Promise<TypeModelRelationResult<EntityVersionInit, ModelVersionInit, T> | undefined>;
|
|
131
|
+
mget<T extends IModelGetOptions<EntityVersionInit, ModelVersionInit>>(ids: TableIdentity[], options?: T): Promise<TypeModelRelationResult<EntityVersionInit, ModelVersionInit, T>[]>;
|
|
132
|
+
select<T extends IModelSelectParams<EntityVersionInit, ModelVersionInit, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelRelationResult<EntityVersionInit, ModelVersionInit, T>[]>;
|
|
133
|
+
insert<T extends IModelInsertOptions<EntityVersionInit, ModelVersionInit>>(data?: TypeModelMutateRelationData<EntityVersionInit, ModelVersionInit, T>, options?: T): Promise<Required<TypeModelMutateRelationData<EntityVersionInit, ModelVersionInit, T>>>;
|
|
134
|
+
insertBulk<T extends IModelInsertOptions<EntityVersionInit, ModelVersionInit>>(items: TypeModelMutateRelationData<EntityVersionInit, ModelVersionInit, T>[], options?: T): Promise<Required<TypeModelMutateRelationData<EntityVersionInit, ModelVersionInit, T>>[]>;
|
|
135
|
+
update<T extends IModelUpdateOptions<EntityVersionInit, ModelVersionInit>>(data: TypeModelMutateRelationData<EntityVersionInit, ModelVersionInit, T>, options?: T): Promise<TypeModelMutateRelationData<EntityVersionInit, ModelVersionInit, T>>;
|
|
136
|
+
updateBulk<T extends IModelUpdateOptions<EntityVersionInit, ModelVersionInit>>(items: TypeModelMutateRelationData<EntityVersionInit, ModelVersionInit, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityVersionInit, ModelVersionInit, T>[]>;
|
|
137
|
+
delete<T extends IModelDeleteOptions<EntityVersionInit, ModelVersionInit>>(where?: TypeModelWhere<EntityVersionInit>, options?: T): Promise<void>;
|
|
138
|
+
deleteBulk<T extends IModelDeleteOptions<EntityVersionInit, ModelVersionInit>>(ids: TableIdentity[], options?: T): Promise<void>;
|
|
139
|
+
mutate<T extends IModelMutateOptions<EntityVersionInit, ModelVersionInit>>(data?: TypeModelMutateRelationData<EntityVersionInit, ModelVersionInit, T>, options?: T): Promise<TypeModelMutateRelationData<EntityVersionInit, ModelVersionInit, T>>;
|
|
140
|
+
mutateBulk<T extends IModelMutateOptions<EntityVersionInit, ModelVersionInit>>(items: TypeModelMutateRelationData<EntityVersionInit, ModelVersionInit, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityVersionInit, ModelVersionInit, T>[]>;
|
|
141
|
+
count<T extends IModelSelectCountParams<EntityVersionInit, ModelVersionInit, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<BigNumber | undefined>;
|
|
142
|
+
aggregate<T extends IModelSelectAggrParams<EntityVersionInit, ModelVersionInit, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelAggrRelationResult<T>>;
|
|
143
|
+
group<T extends IModelSelectGroupParams<EntityVersionInit, ModelVersionInit, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelGroupRelationResult<EntityVersionInit, T>[]>;
|
|
144
|
+
}
|
|
145
|
+
interface ModelViewRecord {
|
|
146
|
+
[SymbolKeyEntity]: EntityViewRecord;
|
|
147
|
+
[SymbolKeyEntityMeta]: EntityViewRecordMeta;
|
|
148
|
+
[SymbolKeyModelOptions]: IModelOptionsViewRecord;
|
|
149
|
+
get<T extends IModelGetOptions<EntityViewRecord, ModelViewRecord>>(where: TypeModelWhere<EntityViewRecord>, options?: T): Promise<TypeModelRelationResult<EntityViewRecord, ModelViewRecord, T> | undefined>;
|
|
150
|
+
mget<T extends IModelGetOptions<EntityViewRecord, ModelViewRecord>>(ids: TableIdentity[], options?: T): Promise<TypeModelRelationResult<EntityViewRecord, ModelViewRecord, T>[]>;
|
|
151
|
+
select<T extends IModelSelectParams<EntityViewRecord, ModelViewRecord, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelRelationResult<EntityViewRecord, ModelViewRecord, T>[]>;
|
|
152
|
+
insert<T extends IModelInsertOptions<EntityViewRecord, ModelViewRecord>>(data?: TypeModelMutateRelationData<EntityViewRecord, ModelViewRecord, T>, options?: T): Promise<Required<TypeModelMutateRelationData<EntityViewRecord, ModelViewRecord, T>>>;
|
|
153
|
+
insertBulk<T extends IModelInsertOptions<EntityViewRecord, ModelViewRecord>>(items: TypeModelMutateRelationData<EntityViewRecord, ModelViewRecord, T>[], options?: T): Promise<Required<TypeModelMutateRelationData<EntityViewRecord, ModelViewRecord, T>>[]>;
|
|
154
|
+
update<T extends IModelUpdateOptions<EntityViewRecord, ModelViewRecord>>(data: TypeModelMutateRelationData<EntityViewRecord, ModelViewRecord, T>, options?: T): Promise<TypeModelMutateRelationData<EntityViewRecord, ModelViewRecord, T>>;
|
|
155
|
+
updateBulk<T extends IModelUpdateOptions<EntityViewRecord, ModelViewRecord>>(items: TypeModelMutateRelationData<EntityViewRecord, ModelViewRecord, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityViewRecord, ModelViewRecord, T>[]>;
|
|
156
|
+
delete<T extends IModelDeleteOptions<EntityViewRecord, ModelViewRecord>>(where?: TypeModelWhere<EntityViewRecord>, options?: T): Promise<void>;
|
|
157
|
+
deleteBulk<T extends IModelDeleteOptions<EntityViewRecord, ModelViewRecord>>(ids: TableIdentity[], options?: T): Promise<void>;
|
|
158
|
+
mutate<T extends IModelMutateOptions<EntityViewRecord, ModelViewRecord>>(data?: TypeModelMutateRelationData<EntityViewRecord, ModelViewRecord, T>, options?: T): Promise<TypeModelMutateRelationData<EntityViewRecord, ModelViewRecord, T>>;
|
|
159
|
+
mutateBulk<T extends IModelMutateOptions<EntityViewRecord, ModelViewRecord>>(items: TypeModelMutateRelationData<EntityViewRecord, ModelViewRecord, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityViewRecord, ModelViewRecord, T>[]>;
|
|
160
|
+
count<T extends IModelSelectCountParams<EntityViewRecord, ModelViewRecord, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<BigNumber | undefined>;
|
|
161
|
+
aggregate<T extends IModelSelectAggrParams<EntityViewRecord, ModelViewRecord, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelAggrRelationResult<T>>;
|
|
162
|
+
group<T extends IModelSelectGroupParams<EntityViewRecord, ModelViewRecord, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelGroupRelationResult<EntityViewRecord, T>[]>;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
declare module 'vona-module-a-orm' {
|
|
166
|
+
interface IModelClassRecord {
|
|
167
|
+
'a-version:version': ModelVersion;
|
|
168
|
+
'a-version:versionInit': ModelVersionInit;
|
|
169
|
+
'a-version:viewRecord': ModelViewRecord;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/** model: end */
|
|
73
173
|
/** service: begin */
|
|
74
174
|
export * from '../service/database.ts';
|
|
75
175
|
export * from '../service/version.ts';
|
|
@@ -83,7 +183,15 @@ declare module 'vona-module-a-bean' {
|
|
|
83
183
|
declare module 'vona-module-a-version' {
|
|
84
184
|
interface ServiceDatabase {
|
|
85
185
|
}
|
|
186
|
+
interface ServiceDatabase {
|
|
187
|
+
get $beanFullName(): 'a-version.service.database';
|
|
188
|
+
get $onionName(): 'a-version:database';
|
|
189
|
+
}
|
|
190
|
+
interface ServiceVersion {
|
|
191
|
+
}
|
|
86
192
|
interface ServiceVersion {
|
|
193
|
+
get $beanFullName(): 'a-version.service.version';
|
|
194
|
+
get $onionName(): 'a-version:version';
|
|
87
195
|
}
|
|
88
196
|
}
|
|
89
197
|
/** service: end */
|
|
@@ -112,6 +220,10 @@ declare module 'vona' {
|
|
|
112
220
|
declare module 'vona-module-a-version' {
|
|
113
221
|
interface EventVersionDone {
|
|
114
222
|
}
|
|
223
|
+
interface EventVersionDone {
|
|
224
|
+
get $beanFullName(): 'a-version.event.versionDone';
|
|
225
|
+
get $onionName(): 'a-version:versionDone';
|
|
226
|
+
}
|
|
115
227
|
}
|
|
116
228
|
/** event: end */
|
|
117
229
|
/** event: begin */
|
|
@@ -140,6 +252,10 @@ declare module 'vona' {
|
|
|
140
252
|
declare module 'vona-module-a-version' {
|
|
141
253
|
interface MetaVersion {
|
|
142
254
|
}
|
|
255
|
+
interface MetaVersion {
|
|
256
|
+
get $beanFullName(): 'a-version.meta.version';
|
|
257
|
+
get $onionName(): 'a-version:version';
|
|
258
|
+
}
|
|
143
259
|
}
|
|
144
260
|
/** meta: end */
|
|
145
261
|
/** startup: begin */
|
|
@@ -157,16 +273,32 @@ declare module 'vona-module-a-startup' {
|
|
|
157
273
|
declare module 'vona-module-a-version' {
|
|
158
274
|
interface StartupDatabaseInit {
|
|
159
275
|
}
|
|
276
|
+
interface StartupDatabaseInit {
|
|
277
|
+
get $beanFullName(): 'a-version.startup.databaseInit';
|
|
278
|
+
get $onionName(): 'a-version:databaseInit';
|
|
279
|
+
}
|
|
160
280
|
interface StartupDatabaseName {
|
|
161
281
|
}
|
|
282
|
+
interface StartupDatabaseName {
|
|
283
|
+
get $beanFullName(): 'a-version.startup.databaseName';
|
|
284
|
+
get $onionName(): 'a-version:databaseName';
|
|
285
|
+
}
|
|
286
|
+
interface StartupInstanceInit {
|
|
287
|
+
}
|
|
162
288
|
interface StartupInstanceInit {
|
|
289
|
+
get $beanFullName(): 'a-version.startup.instanceInit';
|
|
290
|
+
get $onionName(): 'a-version:instanceInit';
|
|
163
291
|
}
|
|
164
292
|
}
|
|
165
293
|
export declare const locales: {
|
|
166
294
|
'en-us': {
|
|
295
|
+
Module: string;
|
|
296
|
+
Version: string;
|
|
167
297
|
ModuleOld: string;
|
|
168
298
|
};
|
|
169
299
|
'zh-cn': {
|
|
300
|
+
Module: string;
|
|
301
|
+
Version: string;
|
|
170
302
|
ModuleOld: string;
|
|
171
303
|
};
|
|
172
304
|
};
|
package/dist/entity/version.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { IDecoratorEntityOptions } from 'vona-module-a-
|
|
2
|
-
import { EntityBaseSimple } from 'vona-module-a-
|
|
1
|
+
import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
|
|
2
|
+
import { EntityBaseSimple } from 'vona-module-a-orm';
|
|
3
|
+
import '../.metadata/index.ts';
|
|
3
4
|
export interface IEntityOptionsVersion extends IDecoratorEntityOptions {
|
|
4
5
|
}
|
|
5
6
|
declare const EntityVersion_base: import("vona").Constructable<Omit<EntityBaseSimple, "iid" | "deleted">>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IDecoratorEntityOptions } from 'vona-module-a-
|
|
2
|
-
import { EntityBaseSimple } from 'vona-module-a-
|
|
1
|
+
import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
|
|
2
|
+
import { EntityBaseSimple } from 'vona-module-a-orm';
|
|
3
3
|
export interface IEntityOptionsVersionInit extends IDecoratorEntityOptions {
|
|
4
4
|
}
|
|
5
5
|
declare const EntityVersionInit_base: import("vona").Constructable<Omit<EntityBaseSimple, "iid" | "deleted">>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IDecoratorEntityOptions } from 'vona-module-a-
|
|
2
|
-
import { EntityBaseSimple } from 'vona-module-a-
|
|
1
|
+
import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
|
|
2
|
+
import { EntityBaseSimple } from 'vona-module-a-orm';
|
|
3
3
|
export interface IEntityOptionsViewRecord extends IDecoratorEntityOptions {
|
|
4
4
|
}
|
|
5
5
|
declare const EntityViewRecord_base: import("vona").Constructable<Omit<EntityBaseSimple, "iid">>;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BeanInfo,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { BeanInfo, $Class, BeanBase, BeanScopeBase } from 'vona';
|
|
2
|
+
import { Api, v } from 'vona-module-a-openapi';
|
|
3
|
+
import { Entity, EntityBaseSimple, Model, BeanModelBase } from 'vona-module-a-orm';
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
import moment from 'moment';
|
|
6
6
|
import { Service, Scope } from 'vona-module-a-bean';
|
|
@@ -26,10 +26,10 @@ function _initializerDefineProperty(e, i, r, l) {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
var _dec$
|
|
30
|
-
let EntityVersion = (_dec$
|
|
29
|
+
var _dec$d, _dec2$d, _dec3$2, _dec4$2, _dec5$2, _dec6$2, _class$d, _class2$2, _descriptor$2, _descriptor2$2;
|
|
30
|
+
let EntityVersion = (_dec$d = Entity('aVersion'), _dec2$d = BeanInfo({
|
|
31
31
|
module: "a-version"
|
|
32
|
-
}), _dec3$2 = Api.field(), _dec4$2 = Reflect.metadata("design:type", String), _dec5$2 = Api.field(), _dec6$2 = Reflect.metadata("design:type", Number), _dec$
|
|
32
|
+
}), _dec3$2 = Api.field(v.title($locale('Module'))), _dec4$2 = Reflect.metadata("design:type", String), _dec5$2 = Api.field(v.title($locale('Version'))), _dec6$2 = Reflect.metadata("design:type", Number), _dec$d(_class$d = _dec2$d(_class$d = (_class2$2 = class EntityVersion extends $Class.omit(EntityBaseSimple, ['iid', 'deleted']) {
|
|
33
33
|
constructor(...args) {
|
|
34
34
|
super(...args);
|
|
35
35
|
_initializerDefineProperty(this, "module", _descriptor$2, this);
|
|
@@ -45,12 +45,12 @@ let EntityVersion = (_dec$b = Entity('aVersion'), _dec2$b = BeanInfo({
|
|
|
45
45
|
enumerable: true,
|
|
46
46
|
writable: true,
|
|
47
47
|
initializer: null
|
|
48
|
-
}), _class2$2)) || _class$
|
|
48
|
+
}), _class2$2)) || _class$d) || _class$d);
|
|
49
49
|
|
|
50
|
-
var _dec$
|
|
51
|
-
let EntityVersionInit = (_dec$
|
|
50
|
+
var _dec$c, _dec2$c, _dec3$1, _dec4$1, _dec5$1, _dec6$1, _dec7, _dec8, _class$c, _class2$1, _descriptor$1, _descriptor2$1, _descriptor3;
|
|
51
|
+
let EntityVersionInit = (_dec$c = Entity('aVersionInit'), _dec2$c = BeanInfo({
|
|
52
52
|
module: "a-version"
|
|
53
|
-
}), _dec3$1 = Api.field(), _dec4$1 = Reflect.metadata("design:type", String), _dec5$1 = Api.field(), _dec6$1 = Reflect.metadata("design:type", String), _dec7 = Api.field(), _dec8 = Reflect.metadata("design:type", Number), _dec$
|
|
53
|
+
}), _dec3$1 = Api.field(), _dec4$1 = Reflect.metadata("design:type", String), _dec5$1 = Api.field(), _dec6$1 = Reflect.metadata("design:type", String), _dec7 = Api.field(), _dec8 = Reflect.metadata("design:type", Number), _dec$c(_class$c = _dec2$c(_class$c = (_class2$1 = class EntityVersionInit extends $Class.omit(EntityBaseSimple, ['iid', 'deleted']) {
|
|
54
54
|
constructor(...args) {
|
|
55
55
|
super(...args);
|
|
56
56
|
_initializerDefineProperty(this, "instanceName", _descriptor$1, this);
|
|
@@ -72,12 +72,12 @@ let EntityVersionInit = (_dec$a = Entity('aVersionInit'), _dec2$a = BeanInfo({
|
|
|
72
72
|
enumerable: true,
|
|
73
73
|
writable: true,
|
|
74
74
|
initializer: null
|
|
75
|
-
}), _class2$1)) || _class$
|
|
75
|
+
}), _class2$1)) || _class$c) || _class$c);
|
|
76
76
|
|
|
77
|
-
var _dec$
|
|
78
|
-
let EntityViewRecord = (_dec$
|
|
77
|
+
var _dec$b, _dec2$b, _dec3, _dec4, _dec5, _dec6, _class$b, _class2, _descriptor, _descriptor2;
|
|
78
|
+
let EntityViewRecord = (_dec$b = Entity('aViewRecord'), _dec2$b = BeanInfo({
|
|
79
79
|
module: "a-version"
|
|
80
|
-
}), _dec3 = Api.field(), _dec4 = Reflect.metadata("design:type", String), _dec5 = Api.field(), _dec6 = Reflect.metadata("design:type", String), _dec$
|
|
80
|
+
}), _dec3 = Api.field(), _dec4 = Reflect.metadata("design:type", String), _dec5 = Api.field(), _dec6 = Reflect.metadata("design:type", String), _dec$b(_class$b = _dec2$b(_class$b = (_class2 = class EntityViewRecord extends $Class.omit(EntityBaseSimple, ['iid']) {
|
|
81
81
|
constructor(...args) {
|
|
82
82
|
super(...args);
|
|
83
83
|
_initializerDefineProperty(this, "viewName", _descriptor, this);
|
|
@@ -93,7 +93,25 @@ let EntityViewRecord = (_dec$9 = Entity('aViewRecord'), _dec2$9 = BeanInfo({
|
|
|
93
93
|
enumerable: true,
|
|
94
94
|
writable: true,
|
|
95
95
|
initializer: null
|
|
96
|
-
}), _class2)) || _class$
|
|
96
|
+
}), _class2)) || _class$b) || _class$b);
|
|
97
|
+
|
|
98
|
+
var _dec$a, _dec2$a, _class$a;
|
|
99
|
+
let ModelVersion = (_dec$a = Model({
|
|
100
|
+
entity: EntityVersion,
|
|
101
|
+
disableInstance: true,
|
|
102
|
+
disableDeleted: true
|
|
103
|
+
}), _dec2$a = BeanInfo({
|
|
104
|
+
module: "a-version"
|
|
105
|
+
}), _dec$a(_class$a = _dec2$a(_class$a = class ModelVersion extends BeanModelBase {}) || _class$a) || _class$a);
|
|
106
|
+
|
|
107
|
+
var _dec$9, _dec2$9, _class$9;
|
|
108
|
+
let ModelVersionInit = (_dec$9 = Model({
|
|
109
|
+
entity: EntityVersionInit,
|
|
110
|
+
disableInstance: true,
|
|
111
|
+
disableDeleted: true
|
|
112
|
+
}), _dec2$9 = BeanInfo({
|
|
113
|
+
module: "a-version"
|
|
114
|
+
}), _dec$9(_class$9 = _dec2$9(_class$9 = class ModelVersionInit extends BeanModelBase {}) || _class$9) || _class$9);
|
|
97
115
|
|
|
98
116
|
var _dec$8, _dec2$8, _class$8;
|
|
99
117
|
let ModelViewRecord = (_dec$8 = Model({
|
|
@@ -391,7 +409,7 @@ let ServiceVersion = (_dec$6 = Service(), _dec2$6 = BeanInfo({
|
|
|
391
409
|
});
|
|
392
410
|
// insert record
|
|
393
411
|
if (version > 0) {
|
|
394
|
-
await this.
|
|
412
|
+
await this.scope.model.version.insert({
|
|
395
413
|
module: module.info.relativeName,
|
|
396
414
|
version
|
|
397
415
|
});
|
|
@@ -409,13 +427,10 @@ let ServiceVersion = (_dec$6 = Service(), _dec2$6 = BeanInfo({
|
|
|
409
427
|
}
|
|
410
428
|
// insert record
|
|
411
429
|
if (version > 0) {
|
|
412
|
-
await this.
|
|
430
|
+
await this.scope.model.versionInit.insert({
|
|
413
431
|
instanceName: options.instanceName,
|
|
414
432
|
module: module.info.relativeName,
|
|
415
433
|
version
|
|
416
|
-
}, {
|
|
417
|
-
disableInstance: true,
|
|
418
|
-
disableDeleted: true
|
|
419
434
|
});
|
|
420
435
|
}
|
|
421
436
|
}
|
|
@@ -532,10 +547,14 @@ let StartupInstanceInit = (_dec$1 = Startup({
|
|
|
532
547
|
}) || _class$1) || _class$1);
|
|
533
548
|
|
|
534
549
|
var locale_en_us = {
|
|
550
|
+
Module: 'Module',
|
|
551
|
+
Version: 'Version',
|
|
535
552
|
ModuleOld: 'Module %s is Old'
|
|
536
553
|
};
|
|
537
554
|
|
|
538
555
|
var locale_zh_cn = {
|
|
556
|
+
Module: '模块',
|
|
557
|
+
Version: '版本',
|
|
539
558
|
ModuleOld: '模块 %s 过旧'
|
|
540
559
|
};
|
|
541
560
|
|
|
@@ -557,4 +576,4 @@ function $locale(key) {
|
|
|
557
576
|
}
|
|
558
577
|
/** scope: end */
|
|
559
578
|
|
|
560
|
-
export { $locale, EntityVersion, EntityVersionInit, EntityViewRecord, Errors, EventVersionDone, MetaVersion, ModelViewRecord, ScopeModuleAVersion, ServiceDatabase, ServiceVersion, StartupDatabaseInit, StartupDatabaseName, StartupInstanceInit, locales };
|
|
579
|
+
export { $locale, EntityVersion, EntityVersionInit, EntityViewRecord, Errors, EventVersionDone, MetaVersion, ModelVersion, ModelVersionInit, ModelViewRecord, ScopeModuleAVersion, ServiceDatabase, ServiceVersion, StartupDatabaseInit, StartupDatabaseName, StartupInstanceInit, locales };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IDecoratorModelOptions } from 'vona-module-a-orm';
|
|
2
|
+
import { BeanModelBase } from 'vona-module-a-orm';
|
|
3
|
+
import { EntityVersion } from '../entity/version.ts';
|
|
4
|
+
export interface IModelOptionsVersion extends IDecoratorModelOptions<EntityVersion> {
|
|
5
|
+
}
|
|
6
|
+
export declare class ModelVersion extends BeanModelBase<EntityVersion> {
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IDecoratorModelOptions } from 'vona-module-a-orm';
|
|
2
|
+
import { BeanModelBase } from 'vona-module-a-orm';
|
|
3
|
+
import { EntityVersionInit } from '../entity/versionInit.ts';
|
|
4
|
+
export interface IModelOptionsVersionInit extends IDecoratorModelOptions<EntityVersionInit> {
|
|
5
|
+
}
|
|
6
|
+
export declare class ModelVersionInit extends BeanModelBase<EntityVersionInit> {
|
|
7
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IDecoratorModelOptions } from 'vona-module-a-orm';
|
|
2
|
+
import { BeanModelBase } from 'vona-module-a-orm';
|
|
2
3
|
import { EntityViewRecord } from '../entity/viewRecord.ts';
|
|
4
|
+
export interface IModelOptionsViewRecord extends IDecoratorModelOptions<EntityViewRecord> {
|
|
5
|
+
}
|
|
3
6
|
export declare class ModelViewRecord extends BeanModelBase<EntityViewRecord> {
|
|
4
7
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ServiceDatabaseClient } from 'vona-module-a-
|
|
1
|
+
import type { ServiceDatabaseClient } from 'vona-module-a-orm';
|
|
2
2
|
import { BeanBase } from 'vona';
|
|
3
3
|
export declare class ServiceDatabase extends BeanBase {
|
|
4
|
-
get configDatabase(): import("vona-module-a-
|
|
4
|
+
get configDatabase(): import("vona-module-a-orm").ConfigDatabase;
|
|
5
5
|
get databasePrefix(): string;
|
|
6
6
|
databaseInitStartup(): Promise<void>;
|
|
7
7
|
databaseNameStartup(): Promise<void>;
|
|
8
|
-
__fetchDatabases(client: ServiceDatabaseClient): Promise<import("vona-module-a-
|
|
8
|
+
__fetchDatabases(client: ServiceDatabaseClient): Promise<import("vona-module-a-orm").IFetchDatabasesResultItem[]>;
|
|
9
9
|
__createDatabase(client: ServiceDatabaseClient): Promise<string>;
|
|
10
10
|
__database(): Promise<void>;
|
|
11
11
|
}
|