aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model/Json
diff options
context:
space:
mode:
authorJoris2016-08-08 20:58:17 +0200
committerJoris2016-08-08 20:58:17 +0200
commit8816cf758119a6a2073e561c8df297a833630986 (patch)
tree20e63f3c0de15945b818a6d7a78359f9134b5e82 /src/server/Model/Json
parentb54d8e45fc8784d8fa6eaa03f58536b7a19cf70b (diff)
downloadbudget-8816cf758119a6a2073e561c8df297a833630986.tar.gz
budget-8816cf758119a6a2073e561c8df297a833630986.tar.bz2
budget-8816cf758119a6a2073e561c8df297a833630986.zip
Show incomes in a table and update like payments are updated
Diffstat (limited to 'src/server/Model/Json')
-rw-r--r--src/server/Model/Json/EditIncome.hs20
1 files changed, 20 insertions, 0 deletions
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