-
Notifications
You must be signed in to change notification settings - Fork 7
/
schema.graphql
32 lines (30 loc) · 1.12 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
type Player @model {
id: ID! @isUnique
discordId: String! @isUnique
username: String! @isUnique
rating: Int
sigma: Float
ratingPro: Int @defaultValue(value: 2500)
sigmaPro: Float @defaultValue(value: 1.813)
pro: Boolean @defaultValue(value: false)
playerMatchRatingsChanges: [PlayerMatchRatingsChange!]! @relation(name: "PlayerMatchRatingsChangeOnPlayer")
matches: [Match!]! @relation(name: "PlayerOnMatch")
wonMatches: [Match!]! @relation(name: "PlayerOnWonMatch")
lostMatches: [Match!]! @relation(name: "PlayerOnLostMatch")
}
type Match @model {
id: ID! @isUnique
date: DateTime!
playerMatchRatingsChanges: [PlayerMatchRatingsChange!]! @relation(name: "PlayerMatchRatingsChangeOnMatch")
players: [Player!]! @relation(name: "PlayerOnMatch")
winners: [Player!]! @relation(name: "PlayerOnWonMatch")
losers: [Player!]! @relation(name: "PlayerOnLostMatch")
league: String
}
type PlayerMatchRatingsChange @model {
id: ID! @isUnique
ratingsChange: Int
sigmaChange: Float
match: Match @relation(name: "PlayerMatchRatingsChangeOnMatch")
player: Player @relation(name: "PlayerMatchRatingsChangeOnPlayer")
}