-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
62 lines (56 loc) · 1.57 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
type PublicPhaseActivated @entity {
id: ID! @unique
activatedAt: DateTime! @index
}
type Domain @entity @index(fields: ["tld", "name"], unique: true) {
id: ID! @index @unique
tld: String! @index
name: String! @index
owner: Owner! @index
registeredAt: DateTime! @index
expiresAt: DateTime @index
}
type Owner @entity {
id: ID! @index @unique
domains: [Domain!] @derivedFrom(field: "owner")
}
type Reservation @entity @index(fields: ["tld", "name"], unique: true) {
id: ID! @index @unique
tld: String! @index
name: String! @index
address: String @index
reservedAt: DateTime! @index
}
type Referral @entity @index(fields: ["tld", "name", "referredAt"], unique: true) {
id: ID! @unique
tld: String! @index
name: String! @index
address: String! @index
referrerName: String! @index
referrerAddress: String! @index
referralAmount: BigInt!
receivedFeeAmount: BigInt!
referredAt: DateTime! @index
}
type GiveawayCoupon @entity @index(fields: ["tld", "name", "reservedAt"], unique: true) {
id: ID! @unique
tld: String! @index
name: String! @index
publicCode: String! @index
reservedAt: DateTime! @index
claimedBy: String @index
claimedAt: DateTime @index
claimDurationInSeconds: Int
}
type ReceivedFee @entity @index(fields: ["tld", "name", "eventType", "receivedAt"], unique: true) {
id: ID! @unique
blockHash: String! @index
tld: String! @index
name: String! @index
from: String! @index
eventType: String! @index
receivedAt: DateTime! @index
receivedAmount: BigInt!
receivedAmountEUR: Float!
registrationDurationInYears: Int!
}