forked from Nemusonaneko/llamaSubs-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
105 lines (96 loc) · 2.4 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
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
type Refundable @entity {
id: ID!
owner: Owner!
address: Bytes!
periodDuation: BigInt!
whitelist: [Bytes!]!
tiers: [Tier!]! @derivedFrom(field: "refundableContract")
history: [HistoryEvent!]! @derivedFrom(field: "refundableContract")
}
type NonRefundable @entity {
id: ID!
owner: Owner!
address: Bytes!
whitelist: [Bytes!]!
subs: [Sub!]! @derivedFrom(field: "nonRefundableContract")
history: [HistoryEvent!]! @derivedFrom(field: "nonRefundableContract")
}
type Token @entity {
id: ID!
address: Bytes!
symbol: String!
name: String!
decimals: Int!
}
type Tier @entity {
id: ID!
tierId: BigInt!
refundableContract: Refundable!
costPerPeriod: BigInt!
disabled: Boolean!
token: Token!
refundableSubs: [RefundableSub!]! @derivedFrom(field: "tier")
history: [HistoryEvent!]! @derivedFrom(field: "tier")
}
type Sub @entity {
id: ID!
subId: BigInt!
nonRefundableContract: NonRefundable!
costOfSub: BigInt!
duration: BigInt!
disabled: Boolean!
token: Token!
nonRefundableSubs: [NonRefundableSub!]! @derivedFrom(field: "sub")
history: [HistoryEvent!]! @derivedFrom(field: "sub")
}
type Owner @entity {
id: ID!
address: Bytes!
refundables: [Refundable!]! @derivedFrom(field: "owner")
nonrefundables: [NonRefundable!]! @derivedFrom(field: "owner")
history: [HistoryEvent!]! @derivedFrom(field: "owner")
}
type Subber @entity {
id: ID!
address: Bytes!
nonRefundableSubs: [NonRefundableSub!]! @derivedFrom(field: "subber")
refundableSubs: [RefundableSub!]! @derivedFrom(field: "subber")
history: [HistoryEvent!]! @derivedFrom(field: "subber")
}
type NonRefundableSub @entity {
id: ID!
tokenId: BigInt!
nonRefundableContract: NonRefundable!
subber: Subber!
expires: BigInt!
sub: Sub!
history: [HistoryEvent!]! @derivedFrom(field: "nonRefundableSub")
}
type RefundableSub @entity {
id: ID!
tokenId: BigInt!
refundableContract: Refundable!
subber: Subber!
expires: BigInt!
tier: Tier!
history: [HistoryEvent!]! @derivedFrom(field: "refundableSub")
}
type HistoryEvent @entity {
id: ID!
txHash: Bytes!
eventType: String!
nonRefundableContract: NonRefundable
refundableContract: Refundable
nonRefundableSub: NonRefundableSub
refundableSub: RefundableSub
owner: Owner
subber: Subber
sub: Sub
tier: Tier
expires: BigInt
whitelist: Bytes
token: Token
amount: BigInt
createdTimestamp: BigInt!
createdBlock: BigInt!
}