aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model/Json/PaymentCategory.hs
diff options
context:
space:
mode:
authorJoris2017-03-24 09:21:04 +0000
committerJoris2017-03-24 09:21:04 +0000
commitcfca18262c1ff48dcb683ddab7d03cf8e55573ff (patch)
tree8a438430cee7411259fc395d8f3898488e85d750 /src/server/Model/Json/PaymentCategory.hs
parent293eb8295162bf0a038f488237db9c9d1316c04d (diff)
Features/categories
Diffstat (limited to 'src/server/Model/Json/PaymentCategory.hs')
-rw-r--r--src/server/Model/Json/PaymentCategory.hs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/server/Model/Json/PaymentCategory.hs b/src/server/Model/Json/PaymentCategory.hs
new file mode 100644
index 0000000..edd4388
--- /dev/null
+++ b/src/server/Model/Json/PaymentCategory.hs
@@ -0,0 +1,19 @@
+{-# LANGUAGE DeriveGeneric #-}
+
+module Model.Json.PaymentCategory
+ ( PaymentCategory(..)
+ ) where
+
+import GHC.Generics
+
+import Data.Aeson
+import Data.Text (Text)
+
+import Model.Database (CategoryId)
+
+data PaymentCategory = PaymentCategory
+ { name :: Text
+ , category :: CategoryId
+ } deriving (Show, Generic)
+
+instance ToJSON PaymentCategory