aboutsummaryrefslogtreecommitdiff
path: root/common/src/Common/Model/CreatePayment.hs
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/Common/Model/CreatePayment.hs')
-rw-r--r--common/src/Common/Model/CreatePayment.hs14
1 files changed, 13 insertions, 1 deletions
diff --git a/common/src/Common/Model/CreatePayment.hs b/common/src/Common/Model/CreatePayment.hs
index cd0b01d..c61423c 100644
--- a/common/src/Common/Model/CreatePayment.hs
+++ b/common/src/Common/Model/CreatePayment.hs
@@ -1,5 +1,6 @@
module Common.Model.CreatePayment
- ( CreatePayment(..)
+ ( CreatePaymentError(..)
+ , CreatePayment(..)
) where
import Data.Aeson (FromJSON, ToJSON)
@@ -10,6 +11,17 @@ import GHC.Generics (Generic)
import Common.Model.Category (CategoryId)
import Common.Model.Frequency (Frequency)
+data CreatePaymentError = CreatePaymentError
+ { _createPaymentError_name :: Maybe Text
+ , _createPaymentError_cost :: Maybe Text
+ , _createPaymentError_date :: Maybe Text
+ , _createPaymentError_category :: Maybe Text
+ , _createPaymentError_frequency :: Maybe Text
+ } deriving (Show, Generic)
+
+instance FromJSON CreatePaymentError
+instance ToJSON CreatePaymentError
+
data CreatePayment = CreatePayment
{ _createPayment_name :: Text
, _createPayment_cost :: Int