aboutsummaryrefslogtreecommitdiff
path: root/common/src/Common/Model/PaymentPage.hs
blob: 94203a22cfea7da6c8ee03f9f54418b08e6e236f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module Common.Model.PaymentPage
  ( PaymentPage(..)
  ) where

import           Data.Aeson                 (FromJSON, ToJSON)
import           GHC.Generics               (Generic)

import           Common.Model.Frequency     (Frequency)
import           Common.Model.Payment       (Payment)
import           Common.Model.PaymentHeader (PaymentHeader)

data PaymentPage = PaymentPage
  { _paymentPage_page       :: Int
  , _paymentPage_frequency  :: Frequency
  , _paymentPage_header     :: PaymentHeader
  , _paymentPage_payments   :: [Payment]
  , _paymentPage_totalCount :: Int
  } deriving (Show, Generic)

instance FromJSON PaymentPage
instance ToJSON PaymentPage