aboutsummaryrefslogtreecommitdiff
path: root/common/src/Common/Model
diff options
context:
space:
mode:
authorJoris2019-08-11 22:40:09 +0200
committerJoris2019-08-11 22:40:09 +0200
commit2d79ab0e0a11f55255fc21a5dfab1598d3beeba3 (patch)
tree80ab3cd98cebfb9694f66aa7718f6bc5d1c83d22 /common/src/Common/Model
parentc542424b7b41c78a170763f6996c12f56b359860 (diff)
Add payment clone
Diffstat (limited to 'common/src/Common/Model')
-rw-r--r--common/src/Common/Model/EditPayment.hs3
-rw-r--r--common/src/Common/Model/SavedPayment.hs (renamed from common/src/Common/Model/CreatedPayment.hs)14
2 files changed, 9 insertions, 8 deletions
diff --git a/common/src/Common/Model/EditPayment.hs b/common/src/Common/Model/EditPayment.hs
index d2c223f..8860b84 100644
--- a/common/src/Common/Model/EditPayment.hs
+++ b/common/src/Common/Model/EditPayment.hs
@@ -2,7 +2,7 @@ module Common.Model.EditPayment
( EditPayment(..)
) where
-import Data.Aeson (FromJSON)
+import Data.Aeson (FromJSON, ToJSON)
import Data.Text (Text)
import Data.Time.Calendar (Day)
import GHC.Generics (Generic)
@@ -21,3 +21,4 @@ data EditPayment = EditPayment
} deriving (Show, Generic)
instance FromJSON EditPayment
+instance ToJSON EditPayment
diff --git a/common/src/Common/Model/CreatedPayment.hs b/common/src/Common/Model/SavedPayment.hs
index c1bba29..f45c479 100644
--- a/common/src/Common/Model/CreatedPayment.hs
+++ b/common/src/Common/Model/SavedPayment.hs
@@ -1,5 +1,5 @@
-module Common.Model.CreatedPayment
- ( CreatedPayment(..)
+module Common.Model.SavedPayment
+ ( SavedPayment(..)
) where
import Data.Aeson (FromJSON, ToJSON)
@@ -8,10 +8,10 @@ import GHC.Generics (Generic)
import Common.Model.Payment (Payment)
import Common.Model.PaymentCategory (PaymentCategory)
-data CreatedPayment = CreatedPayment
- { _createdPayment_payment :: Payment
- , _createdPayment_paymentCategory :: PaymentCategory
+data SavedPayment = SavedPayment
+ { _savedPayment_payment :: Payment
+ , _savedPayment_paymentCategory :: PaymentCategory
} deriving (Show, Generic)
-instance FromJSON CreatedPayment
-instance ToJSON CreatedPayment
+instance FromJSON SavedPayment
+instance ToJSON SavedPayment