aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model/Json/Income.hs
blob: bb1ac97f16e6ad71ca3ad38f512362c0800f6256 (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
  , date :: Day
  , amount :: Int
  } deriving (Show, Generic)

instance ToJSON Income