aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model/Json
diff options
context:
space:
mode:
authorJoris2015-08-29 13:30:09 +0200
committerJoris2015-08-29 13:30:09 +0200
commit6b466f616035c2fc03359d182c074f096d6b7f17 (patch)
tree47708f2e96614d71059f98c757d6a3fe88c8b923 /src/server/Model/Json
parentaa7f70d172be9ef322f9a0d19d1d9d9489f9fa75 (diff)
Showing exceeding payers
Diffstat (limited to 'src/server/Model/Json')
-rw-r--r--src/server/Model/Json/TotalPayment.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/server/Model/Json/TotalPayment.hs b/src/server/Model/Json/TotalPayment.hs
new file mode 100644
index 0000000..e386c79
--- /dev/null
+++ b/src/server/Model/Json/TotalPayment.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE DeriveGeneric #-}
+
+module Model.Json.TotalPayment
+ ( TotalPayment(..)
+ ) where
+
+import GHC.Generics
+
+import Data.Text (Text)
+import Data.Aeson
+
+data TotalPayment = TotalPayment
+ { userName :: Text
+ , totalPayment :: Int
+ } deriving (Show, Generic)
+
+instance FromJSON TotalPayment
+instance ToJSON TotalPayment