{-# 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