generated from wslyvh/nexth
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathschema.graphql
86 lines (76 loc) · 1.68 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
type _Schema_
@fulltext(
name: "eventSearch"
language: en
algorithm: rank
include: [{ entity: "Event", fields: [{ name: "title" }, { name: "description" }, { name: "location" }] }]
)
enum Status {
Active
Cancelled
Settled
}
type ConditionModule @entity {
id: Bytes! # address
name: String!
createdAt: BigInt!
createdBy: Bytes! # address
whitelisted: Boolean! # true
blockNumber: BigInt!
transactionHash: Bytes!
}
type Record @entity {
id: String!
createdAt: BigInt!
createdBy: Bytes!
updatedAt: BigInt
blockNumber: BigInt!
transactionHash: Bytes!
status: Status! # Active
message: String
conditionModule: Bytes! # address
condition: Condition
contentUri: String!
metadata: Event
participants: [Participant!]! @derivedFrom(field: "record")
}
type User @entity {
id: Bytes! # address
participations: [Participant!] @derivedFrom(field: "user")
}
type Participant @entity {
id: String! # Set to `record.id.concat(user.id)`
createdAt: BigInt!
createdBy: Bytes!
transactionHash: Bytes!
address: Bytes! # address
checkedIn: Boolean! # false
user: User!
record: Record!
}
type Event @entity {
id: ID!
appId: String
title: String!
description: String
start: String!
end: String!
timezone: String!
location: String!
website: String
imageUrl: String
visibility: String
}
type Condition @entity(immutable: true) {
id: String! # Set to `record.id.concat(conditionModule.id)`
address: Bytes! # address
name: String!
owner: Bytes! # address
endDate: BigInt!
depositFee: BigInt!
maxParticipants: BigInt!
tokenAddress: Bytes! # address
tokenSymbol: String
tokenName: String
tokenDecimals: BigInt
}