aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model/Json/Payer.hs
blob: 2101e40a700dd9bfc39ca9532307d604ebd5c67b (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.Payer
  ( Payer(..)
  ) where

import GHC.Generics

import Data.Aeson

import Model.Database (UserId)
import Model.Json.Income

data Payer = Payer
  { userId :: UserId
  , preIncomePaymentSum :: Int
  , postIncomePaymentSum :: Int
  , incomes :: [Income]
  } deriving (Show, Generic)

instance FromJSON Payer
instance ToJSON Payer