@aiao/rxdb-test 0.0.15 → 0.0.17

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.
Files changed (50) hide show
  1. package/README.md +30 -1
  2. package/dist/entities/FileLarge.d.ts +339 -0
  3. package/dist/entities/FileLarge.js +77 -0
  4. package/dist/entities/FileNode.d.ts +335 -0
  5. package/dist/entities/FileNode.js +77 -0
  6. package/dist/entities/MenuLarge.d.ts +294 -0
  7. package/dist/entities/MenuLarge.js +41 -0
  8. package/dist/entities/MenuSimple.d.ts +290 -0
  9. package/dist/entities/MenuSimple.js +41 -0
  10. package/dist/entities/Todo.d.ts +165 -0
  11. package/dist/entities/Todo.js +34 -0
  12. package/dist/entities/TypeDemo.d.ts +289 -0
  13. package/dist/entities/TypeDemo.js +137 -0
  14. package/dist/entities/index.d.ts +14 -1655
  15. package/dist/entities/index.js +6 -360
  16. package/dist/graph/index.d.ts +1 -2
  17. package/dist/graph/index.js +1 -1
  18. package/dist/shop/Attribute.d.ts +992 -0
  19. package/dist/shop/Attribute.js +50 -0
  20. package/dist/shop/AttributeValue.d.ts +999 -0
  21. package/dist/shop/AttributeValue.js +51 -0
  22. package/dist/shop/Category.d.ts +772 -0
  23. package/dist/shop/Category.js +52 -0
  24. package/dist/shop/IdCard.d.ts +647 -0
  25. package/dist/shop/IdCard.js +43 -0
  26. package/dist/shop/Order.d.ts +690 -0
  27. package/dist/shop/Order.js +66 -0
  28. package/dist/shop/OrderItem.d.ts +665 -0
  29. package/dist/shop/OrderItem.js +76 -0
  30. package/dist/shop/Product.d.ts +761 -0
  31. package/dist/shop/Product.js +58 -0
  32. package/dist/shop/SKU.d.ts +634 -0
  33. package/dist/shop/SKU.js +74 -0
  34. package/dist/shop/SKUAttributes.d.ts +625 -0
  35. package/dist/shop/SKUAttributes.js +56 -0
  36. package/dist/shop/User.d.ts +679 -0
  37. package/dist/shop/User.js +74 -0
  38. package/dist/shop/index.d.ts +52 -2990
  39. package/dist/shop/index.js +10 -528
  40. package/dist/system/RxDBBranch.d.ts +396 -0
  41. package/dist/system/RxDBBranch.js +106 -0
  42. package/dist/system/RxDBChange.d.ts +361 -0
  43. package/dist/system/RxDBChange.js +123 -0
  44. package/dist/system/RxDBMigration.d.ts +167 -0
  45. package/dist/system/RxDBMigration.js +40 -0
  46. package/dist/system/RxDBSync.d.ts +339 -0
  47. package/dist/system/RxDBSync.js +122 -0
  48. package/dist/system/index.d.ts +9 -1240
  49. package/dist/system/index.js +4 -384
  50. package/package.json +3 -3
@@ -0,0 +1,361 @@
1
+ import { BooleanRules, CountOptions, DateRules, ENTITY_STATIC_TYPES, EntityType, FindAllOptions, FindByCursorOptions, FindOneOptions, FindOneOrFailOptions, FindOptions, IEntity, ITreeEntity, NumberRules, RelationBooleanRules, RelationDateRules, RelationEntityObservable, RelationExistsRules, RelationNumberRules, RelationStringRules, RuleGroupBase, StringRules, UUID, UUIDRules } from '@aiao/rxdb';
2
+ import { Observable } from 'rxjs';
3
+
4
+ /**
5
+ * rule
6
+ */
7
+ declare type RxDBChangeRule = NumberRules<RxDBChange, 'id'>
8
+ | NumberRules<RxDBChange, 'remoteId'>
9
+ | StringRules<RxDBChange, 'type'>
10
+ | UUIDRules<RxDBChange, 'transactionId'>
11
+ | StringRules<RxDBChange, 'namespace'>
12
+ | StringRules<RxDBChange, 'entity'>
13
+ | UUIDRules<RxDBChange, 'entityId'>
14
+ | DateRules<RxDBChange, 'createdAt'>
15
+ | DateRules<RxDBChange, 'updatedAt'>
16
+ | DateRules<RxDBChange, 'revertChangedAt'>
17
+ | NumberRules<RxDBChange, 'revertChangeId'>
18
+ | DateRules<RxDBChange, 'redoInvalidatedAt'>
19
+ | StringRules<RxDBChange, 'branchId'>
20
+ | RelationExistsRules<'branch', RxDBBranchRuleGroup>
21
+ | RelationStringRules<'branch.id', string>
22
+ | RelationBooleanRules<'branch.activated', boolean>
23
+ | RelationNumberRules<'branch.fromChangeId', number | null>
24
+ | RelationBooleanRules<'branch.local', boolean>
25
+ | RelationBooleanRules<'branch.remote', boolean>
26
+ | RelationDateRules<'branch.createdAt', Date | null>
27
+ | RelationDateRules<'branch.updatedAt', Date | null>
28
+ | StringRules<RxDBBranch, 'parentId'>
29
+ | RelationStringRules<'branch.syncs.id', string>
30
+ | RelationStringRules<'branch.syncs.namespace', string>
31
+ | RelationStringRules<'branch.syncs.entity', string>
32
+ | RelationStringRules<'branch.syncs.syncType', string>
33
+ | RelationNumberRules<'branch.syncs.lastPushedChangeId', number | null>
34
+ | RelationDateRules<'branch.syncs.lastPushedAt', Date | null>
35
+ | RelationDateRules<'branch.syncs.lastPulledAt', Date | null>
36
+ | RelationNumberRules<'branch.syncs.lastPullRemoteChangeId', number | null>
37
+ | RelationBooleanRules<'branch.syncs.enabled', boolean>
38
+ | RelationDateRules<'branch.syncs.createdAt', Date | null>
39
+ | RelationDateRules<'branch.syncs.updatedAt', Date | null>
40
+ | StringRules<RxDBSync, 'branchId'>
41
+ | RelationStringRules<'branch.children.id', string>
42
+ | RelationBooleanRules<'branch.children.activated', boolean>
43
+ | RelationNumberRules<'branch.children.fromChangeId', number | null>
44
+ | RelationBooleanRules<'branch.children.local', boolean>
45
+ | RelationBooleanRules<'branch.children.remote', boolean>
46
+ | RelationDateRules<'branch.children.createdAt', Date | null>
47
+ | RelationDateRules<'branch.children.updatedAt', Date | null>
48
+ | RelationStringRules<'branch.parent.id', string>
49
+ | RelationBooleanRules<'branch.parent.activated', boolean>
50
+ | RelationNumberRules<'branch.parent.fromChangeId', number | null>
51
+ | RelationBooleanRules<'branch.parent.local', boolean>
52
+ | RelationBooleanRules<'branch.parent.remote', boolean>
53
+ | RelationDateRules<'branch.parent.createdAt', Date | null>
54
+ | RelationDateRules<'branch.parent.updatedAt', Date | null>;
55
+
56
+ /**
57
+ * RuleGroupBase
58
+ */
59
+ export declare type RxDBChangeRuleGroup = RuleGroupBase<typeof RxDBChange,
60
+ |'id'
61
+ |'remoteId'
62
+ |'type'
63
+ |'transactionId'
64
+ |'namespace'
65
+ |'entity'
66
+ |'entityId'
67
+ |'createdAt'
68
+ |'updatedAt'
69
+ |'revertChangedAt'
70
+ |'revertChangeId'
71
+ |'redoInvalidatedAt'
72
+ |'branchId'
73
+ |'branch'
74
+ |'branch.id'
75
+ |'branch.activated'
76
+ |'branch.fromChangeId'
77
+ |'branch.local'
78
+ |'branch.remote'
79
+ |'branch.createdAt'
80
+ |'branch.updatedAt'
81
+ |'parentId'
82
+ |'branch.syncs.id'
83
+ |'branch.syncs.namespace'
84
+ |'branch.syncs.entity'
85
+ |'branch.syncs.syncType'
86
+ |'branch.syncs.lastPushedChangeId'
87
+ |'branch.syncs.lastPushedAt'
88
+ |'branch.syncs.lastPulledAt'
89
+ |'branch.syncs.lastPullRemoteChangeId'
90
+ |'branch.syncs.enabled'
91
+ |'branch.syncs.createdAt'
92
+ |'branch.syncs.updatedAt'
93
+ |'branchId'
94
+ |'branch.children.id'
95
+ |'branch.children.activated'
96
+ |'branch.children.fromChangeId'
97
+ |'branch.children.local'
98
+ |'branch.children.remote'
99
+ |'branch.children.createdAt'
100
+ |'branch.children.updatedAt'
101
+ |'parentId'
102
+ |'branch.parent.id'
103
+ |'branch.parent.activated'
104
+ |'branch.parent.fromChangeId'
105
+ |'branch.parent.local'
106
+ |'branch.parent.remote'
107
+ |'branch.parent.createdAt'
108
+ |'branch.parent.updatedAt'
109
+ |'parentId',
110
+ RxDBChangeRule>;
111
+
112
+ /**
113
+ * OrderByField
114
+ */
115
+ declare type RxDBChangeOrderByField = "id" | "remoteId" | "type" | "transactionId" | "namespace" | "entity" | "entityId" | "inversePatch" | "patch" | "createdAt" | "updatedAt" | "revertChangedAt" | "revertChangeId" | "redoInvalidatedAt";
116
+
117
+ /**
118
+ * 静态类型
119
+ */
120
+ export interface RxDBChangeStaticTypes {
121
+ /**
122
+ * id 类型
123
+ */
124
+ idType: number;
125
+ /**
126
+ * 查询选项
127
+ */
128
+ getOptions: number;
129
+ /**
130
+ * 查询选项
131
+ */
132
+ findOneOrFailOptions: FindOneOrFailOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>;
133
+ /**
134
+ * 查询选项
135
+ */
136
+ findOptions: FindOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>;
137
+ /**
138
+ * 查询选项
139
+ */
140
+ findOneOptions: FindOneOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>;
141
+ /**
142
+ * 查询选项
143
+ */
144
+ findAllOptions: FindAllOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>;
145
+ /**
146
+ * 查询选项
147
+ */
148
+ findByCursorOptions: FindByCursorOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>;
149
+ /**
150
+ * 查询选项
151
+ */
152
+ countOptions: CountOptions<typeof RxDBChange,RxDBChangeRuleGroup>;
153
+ }
154
+
155
+ /**
156
+ * 初始化数据
157
+ */
158
+ export interface RxDBChangeInitData {
159
+ /**
160
+ * id
161
+ */
162
+ id?: number;
163
+ /**
164
+ * remoteId
165
+ */
166
+ remoteId?: number | null;
167
+ /**
168
+ * type
169
+ */
170
+ type?: string;
171
+ /**
172
+ * transactionId
173
+ */
174
+ transactionId?: UUID | null;
175
+ /**
176
+ * namespace
177
+ */
178
+ namespace?: string;
179
+ /**
180
+ * entity
181
+ */
182
+ entity?: string;
183
+ /**
184
+ * entityId
185
+ */
186
+ entityId?: UUID;
187
+ /**
188
+ * inversePatch
189
+ */
190
+ inversePatch?: Record<string, any> | null;
191
+ /**
192
+ * patch
193
+ */
194
+ patch?: Record<string, any> | null;
195
+ /**
196
+ * createdAt
197
+ * @default new Date()
198
+ */
199
+ createdAt?: Date;
200
+ /**
201
+ * updatedAt
202
+ * @default new Date()
203
+ */
204
+ updatedAt?: Date;
205
+ /**
206
+ * revertChangedAt
207
+ */
208
+ revertChangedAt?: Date | null;
209
+ /**
210
+ * revertChangeId
211
+ */
212
+ revertChangeId?: number | null;
213
+ /**
214
+ * redoInvalidatedAt
215
+ */
216
+ redoInvalidatedAt?: Date | null;
217
+ /**
218
+ * branch id
219
+ */
220
+ branchId?: string | null;
221
+ }
222
+
223
+ /**
224
+ * RxDBChange
225
+ */
226
+ export declare class RxDBChange {
227
+ static [ENTITY_STATIC_TYPES]: RxDBChangeStaticTypes;
228
+ /**
229
+ * branch
230
+ */
231
+ readonly branch$: RelationEntityObservable<typeof RxDBBranch>;
232
+ /**
233
+ * createdAt
234
+ * @default new Date()
235
+ */
236
+ readonly createdAt: Date;
237
+ /**
238
+ * entity
239
+ */
240
+ readonly entity: string;
241
+ /**
242
+ * entityId
243
+ */
244
+ readonly entityId: UUID;
245
+ /**
246
+ * inversePatch
247
+ */
248
+ readonly inversePatch?: Record<string, any> | null;
249
+ /**
250
+ * namespace
251
+ */
252
+ readonly namespace: string;
253
+ /**
254
+ * patch
255
+ */
256
+ readonly patch?: Record<string, any> | null;
257
+ /**
258
+ * remoteId
259
+ */
260
+ readonly remoteId?: number | null;
261
+ /**
262
+ * type
263
+ */
264
+ readonly type: string;
265
+ /**
266
+ * updatedAt
267
+ * @default new Date()
268
+ */
269
+ readonly updatedAt: Date;
270
+ /**
271
+ * branch id
272
+ */
273
+ branchId?: string | null;
274
+ /**
275
+ * id
276
+ */
277
+ id: number;
278
+ /**
279
+ * redoInvalidatedAt
280
+ */
281
+ redoInvalidatedAt?: Date | null;
282
+ /**
283
+ * revertChangedAt
284
+ */
285
+ revertChangedAt?: Date | null;
286
+ /**
287
+ * revertChangeId
288
+ */
289
+ revertChangeId?: number | null;
290
+ /**
291
+ * transactionId
292
+ */
293
+ transactionId?: UUID | null;
294
+ /**
295
+ * 初始化数据
296
+ * @param initData 初始化数据
297
+ */
298
+ constructor(initData?: RxDBChangeInitData);
299
+ /**
300
+ * 统计实体数量
301
+ * @param options 查询选项
302
+ * @example
303
+ * RxDBChange.count({ where: { combinator: 'and', rules: [] } }).subscribe(total => console.log(total));
304
+ */
305
+ static count(options: CountOptions<typeof RxDBChange,RxDBChangeRuleGroup>): Observable<number>;
306
+ /**
307
+ * 查询多个实体
308
+ * @param options 查询选项
309
+ * @example
310
+ * RxDBChange.find({ where: { combinator: 'and', rules: [] }] }).subscribe(list => console.log(list));
311
+ */
312
+ static find(options: FindOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>): Observable<RxDBChange[]>;
313
+ /**
314
+ * 查询所有实体
315
+ * @param options 查询选项
316
+ * @example
317
+ * RxDBChange.findAll({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
318
+ */
319
+ static findAll(options: FindAllOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>): Observable<RxDBChange[]>;
320
+ /**
321
+ * 游标分页查询
322
+ * @param options 查询选项
323
+ * @example
324
+ * RxDBChange.findByCursor({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
325
+ */
326
+ static findByCursor(options: FindByCursorOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>): Observable<RxDBChange[]>;
327
+ /**
328
+ * 查询单个实体,未找到时返回 undefined
329
+ * @param options 查询选项
330
+ * @example
331
+ * RxDBChange.findOne({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
332
+ */
333
+ static findOne(options: FindOneOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>): Observable<RxDBChange | undefined>;
334
+ /**
335
+ * 查询单个实体,未找到时抛出错误
336
+ * @param options 查询选项
337
+ * @example
338
+ * RxDBChange.findOneOrFail({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
339
+ */
340
+ static findOneOrFail(options: FindOneOrFailOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>): Observable<RxDBChange>;
341
+ /**
342
+ * 根据 ID 获取单个实体
343
+ * @param options 查询选项
344
+ * @example
345
+ * RxDBChange.get('123').subscribe(entity => console.log(entity));
346
+ */
347
+ static get(options: number): Observable<RxDBChange>;
348
+ /**
349
+ * 删除
350
+ */
351
+ remove(): Promise<RxDBChange>;
352
+ /**
353
+ * 重置数据
354
+ */
355
+ reset(): void;
356
+ /**
357
+ * 保存
358
+ */
359
+ save(): Promise<RxDBChange>;
360
+ }
361
+
@@ -0,0 +1,123 @@
1
+ import { Entity, PropertyType, RelationKind, __decorateClass } from '@aiao/rxdb';
2
+ let RxDBChange = class {};
3
+ RxDBChange = __decorateClass(
4
+ [
5
+ Entity({
6
+ name: "RxDBChange",
7
+ tableName: "rxdb_change",
8
+ log: false,
9
+ properties: [
10
+ {
11
+ name: "id",
12
+ type: PropertyType.integer,
13
+ primary: true,
14
+ columnName: "id"
15
+ },
16
+ {
17
+ name: "remoteId",
18
+ columnName: "remote_id",
19
+ type: PropertyType.integer,
20
+ readonly: true,
21
+ nullable: true
22
+ },
23
+ {
24
+ name: "type",
25
+ type: PropertyType.string,
26
+ readonly: true,
27
+ columnName: "type"
28
+ },
29
+ {
30
+ name: "transactionId",
31
+ columnName: "transaction_id",
32
+ type: PropertyType.uuid,
33
+ nullable: true
34
+ },
35
+ {
36
+ name: "namespace",
37
+ type: PropertyType.string,
38
+ readonly: true,
39
+ columnName: "namespace"
40
+ },
41
+ {
42
+ name: "entity",
43
+ type: PropertyType.string,
44
+ readonly: true,
45
+ columnName: "entity"
46
+ },
47
+ {
48
+ name: "entityId",
49
+ columnName: "entity_id",
50
+ type: PropertyType.uuid,
51
+ readonly: true
52
+ },
53
+ {
54
+ name: "inversePatch",
55
+ columnName: "inverse_patch",
56
+ type: PropertyType.json,
57
+ readonly: true,
58
+ nullable: true
59
+ },
60
+ {
61
+ name: "patch",
62
+ type: PropertyType.json,
63
+ readonly: true,
64
+ nullable: true,
65
+ columnName: "patch"
66
+ },
67
+ {
68
+ name: "createdAt",
69
+ columnName: "created_at",
70
+ type: PropertyType.date,
71
+ default: "CURRENT_TIMESTAMP",
72
+ readonly: true
73
+ },
74
+ {
75
+ name: "updatedAt",
76
+ columnName: "updated_at",
77
+ type: PropertyType.date,
78
+ default: "CURRENT_TIMESTAMP",
79
+ readonly: true
80
+ },
81
+ {
82
+ name: "revertChangedAt",
83
+ columnName: "revert_changed_at",
84
+ type: PropertyType.date,
85
+ nullable: true
86
+ },
87
+ {
88
+ name: "revertChangeId",
89
+ columnName: "revert_change_id",
90
+ type: PropertyType.integer,
91
+ nullable: true
92
+ },
93
+ {
94
+ name: "redoInvalidatedAt",
95
+ columnName: "redo_invalidated_at",
96
+ type: PropertyType.date,
97
+ nullable: true
98
+ }
99
+ ],
100
+ relations: [
101
+ {
102
+ name: "branch",
103
+ kind: RelationKind.MANY_TO_ONE,
104
+ mappedEntity: "RxDBBranch",
105
+ mappedProperty: "changes",
106
+ nullable: true,
107
+ mappedNamespace: "public",
108
+ onDelete: "SET NULL",
109
+ onUpdate: "RESTRICT",
110
+ columnName: "branchId"
111
+ }
112
+ ],
113
+ repository: "Repository",
114
+ namespace: "public",
115
+ indexes: [],
116
+ computedProperties: [],
117
+ extends: [],
118
+ displayName: "RxDBChange"
119
+ })
120
+ ],
121
+ RxDBChange
122
+ );
123
+ export { RxDBChange };
@@ -0,0 +1,167 @@
1
+ import { CountOptions, DateRules, ENTITY_STATIC_TYPES, EntityType, FindAllOptions, FindByCursorOptions, FindOneOptions, FindOneOrFailOptions, FindOptions, IEntity, ITreeEntity, NumberRules, RuleGroupBase, StringRules, UUID } from '@aiao/rxdb';
2
+ import { Observable } from 'rxjs';
3
+
4
+ /**
5
+ * rule
6
+ */
7
+ declare type RxDBMigrationRule = NumberRules<RxDBMigration, 'id'>
8
+ | StringRules<RxDBMigration, 'name'>
9
+ | DateRules<RxDBMigration, 'executedAt'>;
10
+
11
+ /**
12
+ * RuleGroupBase
13
+ */
14
+ export declare type RxDBMigrationRuleGroup = RuleGroupBase<typeof RxDBMigration,
15
+ |'id'
16
+ |'name'
17
+ |'executedAt',
18
+ RxDBMigrationRule>;
19
+
20
+ /**
21
+ * OrderByField
22
+ */
23
+ declare type RxDBMigrationOrderByField = "id" | "name" | "executedAt";
24
+
25
+ /**
26
+ * 静态类型
27
+ */
28
+ export interface RxDBMigrationStaticTypes {
29
+ /**
30
+ * id 类型
31
+ */
32
+ idType: number;
33
+ /**
34
+ * 查询选项
35
+ */
36
+ getOptions: number;
37
+ /**
38
+ * 查询选项
39
+ */
40
+ findOneOrFailOptions: FindOneOrFailOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>;
41
+ /**
42
+ * 查询选项
43
+ */
44
+ findOptions: FindOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>;
45
+ /**
46
+ * 查询选项
47
+ */
48
+ findOneOptions: FindOneOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>;
49
+ /**
50
+ * 查询选项
51
+ */
52
+ findAllOptions: FindAllOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>;
53
+ /**
54
+ * 查询选项
55
+ */
56
+ findByCursorOptions: FindByCursorOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>;
57
+ /**
58
+ * 查询选项
59
+ */
60
+ countOptions: CountOptions<typeof RxDBMigration,RxDBMigrationRuleGroup>;
61
+ }
62
+
63
+ /**
64
+ * 初始化数据
65
+ */
66
+ export interface RxDBMigrationInitData {
67
+ /**
68
+ * id
69
+ */
70
+ id?: number;
71
+ /**
72
+ * name
73
+ */
74
+ name?: string;
75
+ /**
76
+ * executedAt
77
+ * @default new Date()
78
+ */
79
+ executedAt?: Date;
80
+ }
81
+
82
+ /**
83
+ * RxDBMigration
84
+ */
85
+ export declare class RxDBMigration {
86
+ static [ENTITY_STATIC_TYPES]: RxDBMigrationStaticTypes;
87
+ /**
88
+ * executedAt
89
+ * @default new Date()
90
+ */
91
+ readonly executedAt: Date;
92
+ /**
93
+ * name
94
+ */
95
+ readonly name: string;
96
+ /**
97
+ * id
98
+ */
99
+ id: number;
100
+ /**
101
+ * 初始化数据
102
+ * @param initData 初始化数据
103
+ */
104
+ constructor(initData?: RxDBMigrationInitData);
105
+ /**
106
+ * 统计实体数量
107
+ * @param options 查询选项
108
+ * @example
109
+ * RxDBMigration.count({ where: { combinator: 'and', rules: [] } }).subscribe(total => console.log(total));
110
+ */
111
+ static count(options: CountOptions<typeof RxDBMigration,RxDBMigrationRuleGroup>): Observable<number>;
112
+ /**
113
+ * 查询多个实体
114
+ * @param options 查询选项
115
+ * @example
116
+ * RxDBMigration.find({ where: { combinator: 'and', rules: [] }] }).subscribe(list => console.log(list));
117
+ */
118
+ static find(options: FindOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>): Observable<RxDBMigration[]>;
119
+ /**
120
+ * 查询所有实体
121
+ * @param options 查询选项
122
+ * @example
123
+ * RxDBMigration.findAll({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
124
+ */
125
+ static findAll(options: FindAllOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>): Observable<RxDBMigration[]>;
126
+ /**
127
+ * 游标分页查询
128
+ * @param options 查询选项
129
+ * @example
130
+ * RxDBMigration.findByCursor({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
131
+ */
132
+ static findByCursor(options: FindByCursorOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>): Observable<RxDBMigration[]>;
133
+ /**
134
+ * 查询单个实体,未找到时返回 undefined
135
+ * @param options 查询选项
136
+ * @example
137
+ * RxDBMigration.findOne({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
138
+ */
139
+ static findOne(options: FindOneOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>): Observable<RxDBMigration | undefined>;
140
+ /**
141
+ * 查询单个实体,未找到时抛出错误
142
+ * @param options 查询选项
143
+ * @example
144
+ * RxDBMigration.findOneOrFail({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
145
+ */
146
+ static findOneOrFail(options: FindOneOrFailOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>): Observable<RxDBMigration>;
147
+ /**
148
+ * 根据 ID 获取单个实体
149
+ * @param options 查询选项
150
+ * @example
151
+ * RxDBMigration.get('123').subscribe(entity => console.log(entity));
152
+ */
153
+ static get(options: number): Observable<RxDBMigration>;
154
+ /**
155
+ * 删除
156
+ */
157
+ remove(): Promise<RxDBMigration>;
158
+ /**
159
+ * 重置数据
160
+ */
161
+ reset(): void;
162
+ /**
163
+ * 保存
164
+ */
165
+ save(): Promise<RxDBMigration>;
166
+ }
167
+
@@ -0,0 +1,40 @@
1
+ import { Entity, PropertyType, __decorateClass } from '@aiao/rxdb';
2
+ let RxDBMigration = class {};
3
+ RxDBMigration = __decorateClass(
4
+ [
5
+ Entity({
6
+ name: "RxDBMigration",
7
+ tableName: "rxdb_migration",
8
+ log: false,
9
+ properties: [
10
+ {
11
+ name: "id",
12
+ type: PropertyType.integer,
13
+ primary: true,
14
+ columnName: "id"
15
+ },
16
+ {
17
+ name: "name",
18
+ type: PropertyType.string,
19
+ readonly: true,
20
+ columnName: "name"
21
+ },
22
+ {
23
+ name: "executedAt",
24
+ columnName: "executed_at",
25
+ type: PropertyType.date,
26
+ readonly: true
27
+ }
28
+ ],
29
+ repository: "Repository",
30
+ namespace: "public",
31
+ relations: [],
32
+ indexes: [],
33
+ computedProperties: [],
34
+ extends: [],
35
+ displayName: "RxDBMigration"
36
+ })
37
+ ],
38
+ RxDBMigration
39
+ );
40
+ export { RxDBMigration };