-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.graphql
119 lines (111 loc) · 2.19 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
type Device {
id: ID! @id
createdAt: DateTime! @createdAt
protocol: Protocol
powerRatings: [PowerRating!]!
powerReports: [PowerReport!]!
rvnShares: [ShareData!]!
workUnits: [WorkUnit!]!
wcgid: String @unique
wcgAccount: String
rvnid: String @unique
name: String! @unique
key: String! @unique
owner: String!
}
type ShareData {
id: ID! @id
createdAt: DateTime! @createdAt
shareId:Int!
time: DateTime!
valid: Boolean! @default(value:true)
difficulty:Float!
shareDifficulty:Float!
device: Device
shareHash: String! @unique
power: Float
deviceId: String!
}
type PowerRound {
id: ID! @id
createdAt: DateTime! @createdAt
start: DateTime!
end: DateTime!
reports: [PowerReport!]!
ratings: [PowerRating!]!
}
type PowerReport {
id: ID! @id
round: PowerRound
ratings: [PowerRating!]!
validated: Boolean! @default(value:false)
txid: String
txMeta:String
blockDate:DateTime
blockNum:Int
cpuMicroSec:Int
}
type PowerRating {
id: ID! @id
createdAt: DateTime! @createdAt
power: Float!
units: Float!
device: Device
round: PowerRound
report: PowerReport
error: String
}
type CronJob {
id: ID! @id
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
name: String! @unique
enabled: Boolean! @default(value:true)
runs: [CronRun!]!
}
type CronRun {
id: ID! @id
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
job: CronJob!
runtime: Int
results: Json
errors: Json
jobName: String
}
type WorkUnit {
id: ID! @id
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
validatedAt: DateTime
appName: String
claimedCredit: Float
cpuTime: Float
elapsedTime: Float
exitStatus: Int
grantedCredit: Float
deviceId: Int
deviceName: String
workUnitId: Int @unique
resultId: Int
name: String
outcome: Int
receivedTime: DateTime
reportDeadline: DateTime
sentTime: DateTime
serverState: Int
validateState: Int
fileDeleteState: Int
device: Device
power: Float
}
type Protocol {
id: ID! @id
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
name: String! @unique
description: String
meta: Json
difficulty: Float!
type: Int! @unique
}