From 8816cf758119a6a2073e561c8df297a833630986 Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 8 Aug 2016 20:58:17 +0200 Subject: Show incomes in a table and update like payments are updated --- src/server/Model/Json/EditIncome.hs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/server/Model/Json/EditIncome.hs (limited to 'src/server/Model/Json/EditIncome.hs') diff --git a/src/server/Model/Json/EditIncome.hs b/src/server/Model/Json/EditIncome.hs new file mode 100644 index 0000000..be3c7dc --- /dev/null +++ b/src/server/Model/Json/EditIncome.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE DeriveGeneric #-} + +module Model.Json.EditIncome + ( EditIncome(..) + ) where + +import GHC.Generics + +import Data.Aeson +import Data.Time.Calendar (Day) + +import Model.Database (IncomeId) + +data EditIncome = EditIncome + { id :: IncomeId + , date :: Day + , amount :: Int + } deriving (Show, Generic) + +instance FromJSON EditIncome -- cgit v1.2.3