diff options
author | Joris Guyonvarch | 2015-07-06 00:16:45 +0200 |
---|---|---|
committer | Joris Guyonvarch | 2015-07-06 00:16:45 +0200 |
commit | 4ce9751c9e645916fdde71874c2cdadd252f32a0 (patch) | |
tree | 1014c58787231cbdc3ae2799f32127b40ab393ab /src/server/Model/Json |
Setting up Scotty, Persistent, Clay, Blaze, Esqueleto, Elm
Diffstat (limited to 'src/server/Model/Json')
-rw-r--r-- | src/server/Model/Json/Payment.hs | 21 |
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 |