This repository has been archived by the owner on Aug 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.graphql
133 lines (122 loc) · 2.82 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
type GigPactEntity @entity {
id: Bytes!
creator: Bytes!
created: BigInt!
employer: Bytes!
employee: Bytes!
payAmount: String!
erc20TokenAddress: Bytes!
pactPayScheduleDays: BigInt!
pactName: String!
employeeSignedDate: BigInt
employerSignedDate: BigInt
pactStartedDate: BigInt
pactId: Bytes!
inputData: Bytes!
documentHash: Bytes
disputeData: DisputeData!
payData: PayData!
stakeAmount: String!
pactState: Int!
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
employeeDelegates: [Bytes!]!
employerDelegates: [Bytes!]!
paymentHistory: [LogPaymentMade!]! @derivedFrom(field: "pact")
pactTransactions: [GigTransactionEntity!]! @derivedFrom(field: "pactId")
}
type ProposalTransactionEntity @entity(immutable: true) {
id: Bytes!
action: Int!
pactType: Int!
pactId: ProposalPactEntity
gasPrice: String!
gasUsed: String!
transactionHash: Bytes!
blockTimestamp: BigInt!
from: Bytes!
}
type GigTransactionEntity @entity(immutable: true) {
id: Bytes!
action: Int!
pactType: Int!
pactId: GigPactEntity
gasPrice: String!
gasUsed: String!
transactionHash: Bytes!
blockTimestamp: BigInt!
from: Bytes!
}
# type Arbitrator @entity{
# id: Bytes!
# dispute: DisputeData!
# addr: Bytes!
# hasResolved: Boolean!
# }
type DisputeData @entity {
id: Bytes!
arbitratorAccepted: Boolean!
arbitratorProposedFlag: Boolean!
arbitratorProposer: Bytes!
proposedAmount: String!
proposedArbitrators: [Bytes!]!
hasResolved: [Boolean!]!
}
type PayData @entity {
id: Bytes!
lastPayAmount: String!
lastPayTimeStamp: BigInt!
pauseDuration: BigInt!
pauseResumeTime: BigInt!
proposedAmount: String!
}
type LogPaymentMade @entity(immutable: true) {
id: Bytes!
pactId: Bytes!
amount: BigInt!
payer: Bytes!
blockNumber: BigInt!
timestamp: BigInt!
transactionHash: Bytes!
pact: GigPactEntity!
}
type VotingInfo @entity {
id: Bytes!
votingEnabled: Boolean!
openParticipation: Boolean!
refundOnVotedYes: Boolean!
refundOnVotedNo: Boolean!
votingConcluded: Boolean!
duration: Int!
votingStartTimestamp: Int!
minContribution: String!
}
type UserInteractionData @entity {
id: Bytes!
canVote: Boolean!
hasVoted: Boolean!
castedVote: Boolean!
contribution: String!
pact: ProposalPactEntity!
}
type ProposalPactEntity @entity {
id: Bytes!
creator: Bytes!
uid: Bytes!
pactText: String!
refundAvailable: Boolean!
totalValue: String!
yesVotes: BigInt!
noVotes: BigInt!
votingInfo: VotingInfo!
voters: [Bytes!]!
yesBeneficiaries: [Bytes!]!
noBeneficiaries: [Bytes!]!
isEditable: Boolean!
userInteractionData: [UserInteractionData!]! @derivedFrom(field: "pact")
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
pactTransactions: [ProposalTransactionEntity!]! @derivedFrom(field: "pactId")
}