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

module Model.Json.Income
  ( Income(..)
  ) where

import GHC.Generics

import Data.Aeson
import Data.Time.Calendar (Day)

import Model.Database (IncomeId, UserId)

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

instance ToJSON Income