-
Notifications
You must be signed in to change notification settings - Fork 0
/
1-init.graphql
52 lines (45 loc) · 1.4 KB
/
1-init.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
#
# Generic interface used by all point allocations and aggregations
#
interface PointsInterface
@createModel(description: "Interface for a generic points association to an account") {
issuer: DID! @documentAccount
recipient: DID! @accountReference
points: Int!
}
#
# Interfaces for points allocations and aggregations
#
interface PointsAllocationInterface implements PointsInterface
@createModel(description: "Interface for a single allocation of points to an account") {
issuer: DID! @documentAccount
recipient: DID! @accountReference
points: Int!
}
interface PointsAggregationInterface implements PointsInterface
@createModel(description: "Interface for an aggregation of points to an account") {
issuer: DID! @documentAccount
recipient: DID! @accountReference
points: Int!
date: DateTime!
}
#
# Default models implementing the interfaces
#
type SimplePointsAllocation implements PointsAllocationInterface
@createModel(description: "Simple points allocation to an account") {
issuer: DID! @documentAccount
recipient: DID! @accountReference
points: Int!
}
type SimplePointsAggregation implements PointsAggregationInterface
@createModel(
description: "Simple points aggregation to an account at a specific date"
accountRelation: SET
accountRelationFields: ["recipient"]
) {
issuer: DID! @documentAccount
recipient: DID! @accountReference
points: Int!
date: DateTime!
}