generated from Molunerfinn/typescript-node-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.ts
48 lines (40 loc) · 798 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
export enum IDBStatus {
inited = 'inited',
loaded = 'loaded',
started = 'started',
stopped = 'stopped'
}
export interface IFilter {
orderBy?: 'asc' | 'desc'
limit?: number
offset?: number
}
export interface IGetResult<T> {
total: number
data: Array<IResult<T>>
}
export interface IObject {
id?: string
[propName: string]: any
}
export type IInsertData = IObject[] | [string, IObject] | [IObject[]]
export enum IMetaInfoMode {
createMany,
create,
update,
updateMany
}
export type IResult<T> = T & {
id: string
createdAt: number
updatedAt: number
}
export interface ILowData {
[propName: string]: IObject[] | ILowDataKeyMap
}
export interface ILowDataKeyMap {
[id: string]: 1
}
export interface IJSON {
[propsName: string]: string | number | IJSON
}