aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model/Json/Payment.hs
blob: f22c8cf90721be30ec3bde3d780b40f7957799eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{-# LANGUAGE DeriveGeneric #-}

module Model.Json.Payment
  ( Payment(..)
  ) where

import GHC.Generics

import Data.Time
import Data.Text (Text)
import Data.Aeson

data Payment = Payment
  { id :: Text
  , creation :: UTCTime
  , name :: Text
  , cost :: Int
  , userName :: Text
  } deriving (Show, Generic)

instance FromJSON Payment
instance ToJSON Payment