blob: 7f4de156894cc8132f5834be9e9f0ee10f0bb6b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
{-# LANGUAGE DeriveGeneric #-}
module Model.Json.Payment
( Payment(..)
) where
import GHC.Generics
import Data.Time
import Data.Text (Text)
import Data.Aeson
import Model.Database (PaymentId, UserId)
import Model.Frequency
data Payment = Payment
{ id :: PaymentId
, creation :: UTCTime
, name :: Text
, cost :: Int
, userId :: UserId
, frequency :: Frequency
} deriving (Show, Generic)
instance FromJSON Payment
instance ToJSON Payment
|