{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards   #-}
{-# LANGUAGE TemplateHaskell   #-}

module Json where

import ClassyPrelude.Yesod
import Data.Aeson.TH

data ResRound = ResRound
  { resRoundNumber :: Int
  , resRoundErstiePoints :: Int
  , resRoundTutorPoints :: Int
  }
  deriving Show
$(deriveJSON defaultOptions{fieldLabelModifier = drop 3} ''ResRound)

data ResStation = ResStation
  { resStationName :: Text
  }
  deriving Show
$(deriveJSON defaultOptions{fieldLabelModifier = drop 3} ''ResStation)

data ResScore = ResScore
  { resScoreErsties :: Int
  , resScoreTutors :: Int
  }
  deriving Show
$(deriveJSON defaultOptions{fieldLabelModifier = drop 3} ''ResScore)

data ReqRoundPoints = ReqRoundPoints
  { reqRoundPointsErsties :: Int
  , reqRoundPointTutors :: Int
  }
  deriving Show
$(deriveJSON defaultOptions{fieldLabelModifier = drop 3} ''ReqRoundPoints)

