aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model/Json/Income.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/Model/Json/Income.hs')
-rw-r--r--src/server/Model/Json/Income.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/server/Model/Json/Income.hs b/src/server/Model/Json/Income.hs
new file mode 100644
index 0000000..4549ca5
--- /dev/null
+++ b/src/server/Model/Json/Income.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE DeriveGeneric #-}
+
+module Model.Json.Income
+ ( Income(..)
+ ) where
+
+import GHC.Generics
+
+import Data.Aeson
+import Data.Time.Clock (UTCTime)
+
+data Income = Income
+ { creation :: UTCTime
+ , amount :: Int
+ } deriving (Show, Generic)
+
+instance FromJSON Income
+instance ToJSON Income