diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/common.cabal | 2 | ||||
-rw-r--r-- | common/src/Common/Model.hs | 2 | ||||
-rw-r--r-- | common/src/Common/Model/EditPayment.hs | 3 | ||||
-rw-r--r-- | common/src/Common/Model/SavedPayment.hs (renamed from common/src/Common/Model/CreatedPayment.hs) | 14 |
4 files changed, 11 insertions, 10 deletions
diff --git a/common/common.cabal b/common/common.cabal index 0edd8e2..a454270 100644 --- a/common/common.cabal +++ b/common/common.cabal @@ -30,9 +30,9 @@ Library Exposed-modules: Common.Model Common.Model.CreatePayment - Common.Model.CreatedPayment Common.Model.Email Common.Model.Payment + Common.Model.SavedPayment Common.Model.SignInForm Common.Model.User Common.Msg diff --git a/common/src/Common/Model.hs b/common/src/Common/Model.hs index 64db890..1abc3e3 100644 --- a/common/src/Common/Model.hs +++ b/common/src/Common/Model.hs @@ -2,7 +2,6 @@ module Common.Model (module X) where import Common.Model.Category as X import Common.Model.CreateCategory as X -import Common.Model.CreatedPayment as X import Common.Model.CreateIncome as X import Common.Model.CreatePayment as X import Common.Model.Currency as X @@ -17,5 +16,6 @@ import Common.Model.InitResult as X import Common.Model.Payer as X import Common.Model.Payment as X import Common.Model.PaymentCategory as X +import Common.Model.SavedPayment as X import Common.Model.SignInForm as X import Common.Model.User as X 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 |