diff options
author | Joris | 2016-06-26 12:31:24 +0200 |
---|---|---|
committer | Joris | 2016-06-26 12:31:24 +0200 |
commit | 9ec84e3a20c767f6525639f58cd22715e302b88d (patch) | |
tree | a080552859180707472c1a289080857c0a54fc06 /src/server/Model/Json/CreatePayment.hs | |
parent | 5cb36652ccf07c9e0995ebc421a837ad7d258469 (diff) |
Add an editable date field for punctual payment creation
Diffstat (limited to 'src/server/Model/Json/CreatePayment.hs')
-rw-r--r-- | src/server/Model/Json/CreatePayment.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/server/Model/Json/CreatePayment.hs b/src/server/Model/Json/CreatePayment.hs new file mode 100644 index 0000000..f117daf --- /dev/null +++ b/src/server/Model/Json/CreatePayment.hs @@ -0,0 +1,22 @@ +{-# LANGUAGE DeriveGeneric #-} + +module Model.Json.CreatePayment + ( CreatePayment(..) + ) where + +import GHC.Generics + +import Data.Aeson +import Data.Time.Calendar (Day) +import Data.Text (Text) + +import Model.Frequency (Frequency) + +data CreatePayment = CreatePayment + { date :: Day + , name :: Text + , cost :: Int + , frequency :: Frequency + } deriving (Show, Generic) + +instance FromJSON CreatePayment |