aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model/Json
diff options
context:
space:
mode:
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