@@ -42,17 +42,11 @@ interface Contribution {
4242 contributor : User !
4343}
4444
45- interface EvidenceGroup {
46- id : ID !
47- evidences : [Evidence ! ]! @derivedFrom (field : " evidenceGroup" )
48- nextEvidenceIndex : BigInt !
49- }
50-
5145interface Evidence {
5246 id : ID !
5347 evidence : String !
54- evidenceGroup : EvidenceGroup !
55- evidenceIndex : String !
48+ evidenceIndex : BigInt !
49+ dispute : Dispute !
5650 sender : User !
5751 senderAddress : String !
5852 timestamp : BigInt !
@@ -63,7 +57,6 @@ interface Evidence {
6357 fileTypeExtension : String
6458}
6559
66-
6760############
6861# Entities #
6962############
@@ -88,7 +81,7 @@ type User @entity {
8881 coherenceScore : BigInt !
8982 votes : [Vote ! ]! @derivedFrom (field : " juror" )
9083 contributions : [Contribution ! ]! @derivedFrom (field : " contributor" )
91- evidences : [Evidence ! ]! @derivedFrom (field : " sender" )
84+ evidences : [ClassicEvidence ! ]! @derivedFrom (field : " sender" )
9285 penalties : [Penalty ! ]! @derivedFrom (field : " juror" )
9386}
9487
@@ -182,11 +175,14 @@ type Dispute @entity {
182175 shifts : [JurorRewardPenalty ! ]! @derivedFrom (field : " dispute" )
183176 disputeKitDispute : [DisputeKitDispute ! ]! @derivedFrom (field : " coreDispute" )
184177 isCrossChain : Boolean
185- arbitrableChainId :BigInt
186- externalDisputeId :BigInt
187- templateId :BigInt
188- rulingTimestamp :BigInt
189- rulingTransactionHash :String
178+ arbitrableChainId : BigInt
179+ externalDisputeId : BigInt
180+ templateId : BigInt
181+ rulingTimestamp : BigInt
182+ rulingTransactionHash : String
183+ # required to keep evidence unique
184+ evidenceCount : BigInt !
185+ evidences : [ClassicEvidence ! ]! @derivedFrom (field : " dispute" )
190186}
191187
192188type PeriodIndexCounter @entity {
@@ -285,7 +281,7 @@ type Answer @entity {
285281 count : BigInt !
286282 paidFee : BigInt !
287283 funded : Boolean !
288- localRound : ClassicRound !
284+ localRound : ClassicRound !
289285}
290286
291287type ClassicRound implements DisputeKitRound @entity {
@@ -332,17 +328,11 @@ type ClassicJustification @entity {
332328 timestamp : BigInt !
333329}
334330
335- type ClassicEvidenceGroup implements EvidenceGroup @entity {
336- id : ID !
337- evidences : [Evidence ! ]! @derivedFrom (field : " evidenceGroup" )
338- nextEvidenceIndex : BigInt !
339- }
340-
341331type ClassicEvidence implements Evidence @entity (immutable : true ) {
342332 id : ID ! # classicEvidenceGroup.id-nextEvidenceIndex
343333 evidence : String !
344- evidenceGroup : EvidenceGroup !
345- evidenceIndex : String !
334+ evidenceIndex : BigInt !
335+ dispute : Dispute !
346336 sender : User !
347337 senderAddress : String !
348338 timestamp : BigInt !
@@ -370,5 +360,10 @@ type _Schema_
370360 name : " evidenceSearch"
371361 language : en
372362 algorithm : rank
373- include : [{ entity : " ClassicEvidence" , fields : [{ name : " name" }, { name : " description" },{ name : " senderAddress" },{ name : " evidenceIndex" }] }]
374- )
363+ include : [
364+ {
365+ entity : " ClassicEvidence"
366+ fields : [{ name : " name" }, { name : " description" }, { name : " senderAddress" }, { name : " evidenceIndex" }]
367+ }
368+ ]
369+ )
0 commit comments