From 9ec84e3a20c767f6525639f58cd22715e302b88d Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 26 Jun 2016 12:31:24 +0200 Subject: Add an editable date field for punctual payment creation --- src/server/Model/Json/CreateIncome.hs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/server/Model/Json/CreateIncome.hs (limited to 'src/server/Model/Json/CreateIncome.hs') diff --git a/src/server/Model/Json/CreateIncome.hs b/src/server/Model/Json/CreateIncome.hs new file mode 100644 index 0000000..cf9b1c3 --- /dev/null +++ b/src/server/Model/Json/CreateIncome.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE DeriveGeneric #-} + +module Model.Json.CreateIncome + ( CreateIncome(..) + ) where + +import GHC.Generics + +import Data.Aeson +import Data.Time.Calendar (Day) + +data CreateIncome = CreateIncome + { date :: Day + , amount :: Int + } deriving (Show, Generic) + +instance FromJSON CreateIncome -- cgit v1.2.3