-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
87 lines (82 loc) · 1.73 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
type Listing @entity {
id: ID!
canceled: Boolean
groupable: Boolean
hasSuppliers: Boolean
winner: Bytes
ltMax: BigInt
creationTime: BigInt
auctionTime: BigInt
endTime: BigInt
revealTime: BigInt
minMerit: BigInt
maxPrice: BigInt
maxPriceEth: BigDecimal
highestBid: BigInt
highestBidEth: BigDecimal
address: Bytes
uri: String
quantityToFulfil: BigInt
totalQuantity: BigInt
fPBid: Int
buyers: [Buyer!]! @derivedFrom(field: "listing")
suppliers: [Supplier!]! @derivedFrom(field: "listing")
creator: Bytes!
tokenID: BigInt
}
type Buyer @entity {
id: ID!
weiAmount: BigInt!
weiAmountEth: BigDecimal!
quantity: BigInt!
canWithdraw: Boolean!
isParticipating: Boolean!
deliveryStartTime: BigInt
inputKeyTTime: BigInt
distributionLeadTime: BigInt
transporterAddress: Bytes
listing: Listing!
user: User!
token: Token @derivedFrom(field: "buyer")
blockNumber: BigInt!
transactionHash: Bytes!
withdrawn: Boolean!
}
type Supplier @entity {
id: ID!
weiAmount: BigInt!
weiAmountEth: BigDecimal!
isParticipating: Boolean!
revealed: Boolean!
refunded: Boolean!
invalidBid: Boolean!
canWithdraw: Boolean!
listing: Listing!
user: User!
bid: Bid!
joinedBlock: BigInt!
withdrawn: Boolean!
}
type Bid @entity {
id: ID!
encryptedBid: Bytes!
unencryptedBid: BigInt
unencryptedBidEth: BigDecimal
blockNumber: BigInt!
transactionHash: Bytes!
transactionLogIndex: BigInt!
supplier: Supplier! @derivedFrom(field: "bid")
}
type User @entity{
id: ID!
role: String!
active: Boolean!
buying: [Buyer!] @derivedFrom(field: "user")
supplying: [Supplier!] @derivedFrom(field: "user")
}
type Token @entity {
id: ID!
owner: Bytes!
value: BigInt!
buyer: Buyer
}