-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
77 lines (70 loc) · 1.36 KB
/
schema.graphql
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
type Profile @entity {
id: Bytes!
owner: Bytes!
salt: Bytes!
address: Bytes!
tokenId: BigInt!
subscriptions: BigInt!
subscribers: BigInt!
createdAt: BigInt!
permissions: [ProfilePermission!]! @derivedFrom(field: "profile")
}
type Vault @entity {
id: Bytes!
address: Bytes!
minRate: BigInt!
maxRate: BigInt!
paused: Boolean!
deactivated: Boolean!
}
type Balance @entity {
id: Bytes!
vault: Vault!
profile: Profile!
amount: BigInt!
flow: BigInt!
inflow: BigInt!
outflow: BigInt!
lastUpdate: BigInt!
liquidationTime: BigInt
}
type GratefulSubscription @entity {
id: Bytes!
giver: Profile!
creator: Profile!
vault: Vault
rate: BigInt
feeRate: BigInt
lastUpdate: BigInt!
historyCounter: BigInt!
histories: [SubscriptionHistory!]! @derivedFrom(field: "subscription")
}
type SubscriptionHistory @entity {
id: Bytes!
subscription: GratefulSubscription!
vault: Vault
rate: BigInt!
feeRate: BigInt!
from: BigInt!
to: BigInt
}
type ProfilePermission @entity {
id: Bytes!
profile: Profile!
user: Bytes!
permissions: [Bytes!]!
}
type LiquidatedSubscription @entity {
id: Bytes!
giver: Profile!
creator: Profile!
liquidator: Profile!
vault: Vault!
subscription: GratefulSubscription!
reward: BigInt!
surplus: BigInt!
}
type ProfileTracker @entity {
id: Bytes!
profilesCreated: BigInt!
}