-
Notifications
You must be signed in to change notification settings - Fork 2
/
schema.prisma
121 lines (100 loc) · 2.98 KB
/
schema.prisma
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
generator client {
provider = "prisma-client-js"
}
generator typegraphql {
provider = "typegraphql-prisma"
}
datasource db {
provider = "postgresql"
url = env("POSTGRES_CONNECTION_STRING")
}
model subscriptions {
block_number Int
txIndex Int
eventIndex Int
txHash String
user String
is_active Boolean
min_health_factor Int
max_health_factor Int
target_health_factor Int
protocol String
timestamp Int
cursor BigInt? @map("_cursor")
@@unique([block_number, txIndex, eventIndex], name: "event_id")
}
model rebalances {
block_number Int
txIndex Int
eventIndex Int
txHash String
user String
strategy String
token String
amount BigInt
protocol String
is_outflow Boolean
previous_health_factor Int
new_health_factor Int
cursor BigInt? @map("_cursor")
@@unique([block_number, txIndex, eventIndex], name: "event_id")
}
model zklend_liquidations {
block_number Int
txIndex Int @default(0)
eventIndex Int @default(0)
txHash String
user String
debt_token String
debt_face_amount BigInt
cursor BigInt? @map("_cursor")
@@unique([block_number, txIndex, eventIndex], name: "event_id")
}
model dnmm_user_actions {
block_number Int
txIndex Int @default(0)
eventIndex Int @default(0)
txHash String
sender String
receiver String
owner String
type String // deposit | withdraw
assets String
position_acc1_supply_shares String
position_acc1_borrow_shares String
position_acc2_supply_shares String
position_acc2_borrow_shares String
contract String
timestamp Int
cursor BigInt? @map("_cursor")
@@unique([block_number, txIndex, eventIndex], name: "event_id")
}
model investment_flows {
block_number Int
txIndex Int @default(0)
eventIndex Int @default(0)
txHash String
sender String // caller of tx
receiver String // owner on deposit, could be anyone on withdraw
owner String // the one who received or sent the asset
amount String
asset String
contract String
type String // deposit | withdraw
timestamp Int
cursor BigInt? @map("_cursor")
@@unique([block_number, txIndex, eventIndex], name: "event_id")
}
model harvests {
block_number Int
txIndex Int @default(0)
eventIndex Int @default(0)
txHash String
user String
contract String
amount String
price Float @default(0) // the indexer will set this 0, but when reading, it will be set to the price at the time of the harvest
timestamp Int
cursor BigInt? @map("_cursor")
@@unique([block_number, txIndex, eventIndex], name: "event_id")
}