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