aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model/Json/Income.hs
blob: 6ad331a15ace3d340a8976bb5bff55f29dec033b (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.Income
  ( Income(..)
  ) where

import GHC.Generics

import Data.Aeson
import Data.Time.Clock (UTCTime)

import Model.Database (IncomeId, UserId)

data Income = Income
  { id :: IncomeId
  , userId :: UserId
  , creation :: UTCTime
  , amount :: Int
  } deriving (Show, Generic)

instance FromJSON Income
instance ToJSON Income