diff options
author | Joris | 2016-06-27 14:36:03 +0200 |
---|---|---|
committer | Joris | 2016-06-27 14:36:03 +0200 |
commit | f605541cbaaa3c339eef8f345547bcd653d3f721 (patch) | |
tree | 1e800df7736e482290ca138726595e067e4a5cf9 /src/server/Model/Json/EditPayment.hs | |
parent | 885dfd7708e338a3220c85b7f22a3ac267aad3f7 (diff) |
Add the edit functionnality on payments
Diffstat (limited to 'src/server/Model/Json/EditPayment.hs')
-rw-r--r-- | src/server/Model/Json/EditPayment.hs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/server/Model/Json/EditPayment.hs b/src/server/Model/Json/EditPayment.hs new file mode 100644 index 0000000..4e91000 --- /dev/null +++ b/src/server/Model/Json/EditPayment.hs @@ -0,0 +1,24 @@ +{-# LANGUAGE DeriveGeneric #-} + +module Model.Json.EditPayment + ( EditPayment(..) + ) where + +import GHC.Generics + +import Data.Aeson +import Data.Time.Calendar (Day) +import Data.Text (Text) + +import Model.Frequency (Frequency) +import Model.Database (PaymentId) + +data EditPayment = EditPayment + { id :: PaymentId + , name :: Text + , cost :: Int + , date :: Day + , frequency :: Frequency + } deriving (Show, Generic) + +instance FromJSON EditPayment |