aboutsummaryrefslogtreecommitdiff
path: root/common/src/Common/Model/EditPayment.hs
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/Common/Model/EditPayment.hs')
-rw-r--r--common/src/Common/Model/EditPayment.hs25
1 files changed, 25 insertions, 0 deletions
diff --git a/common/src/Common/Model/EditPayment.hs b/common/src/Common/Model/EditPayment.hs
new file mode 100644
index 0000000..172c0c1
--- /dev/null
+++ b/common/src/Common/Model/EditPayment.hs
@@ -0,0 +1,25 @@
+{-# LANGUAGE DeriveGeneric #-}
+
+module Common.Model.EditPayment
+ ( EditPayment(..)
+ ) where
+
+import Data.Aeson (FromJSON)
+import Data.Text (Text)
+import Data.Time.Calendar (Day)
+import GHC.Generics (Generic)
+
+import Common.Model.Category (CategoryId)
+import Common.Model.Frequency (Frequency)
+import Common.Model.Payment (PaymentId)
+
+data EditPayment = EditPayment
+ { _editPayment_id :: PaymentId
+ , _editPayment_name :: Text
+ , _editPayment_cost :: Int
+ , _editPayment_date :: Day
+ , _editPayment_category :: CategoryId
+ , _editPayment_frequency :: Frequency
+ } deriving (Show, Generic)
+
+instance FromJSON EditPayment