{-# LANGUAGE DeriveGeneric #-}

module Model.Json.CreateIncome
  ( CreateIncome(..)
  ) where

import GHC.Generics

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

data CreateIncome = CreateIncome
  { date :: Day
  , amount :: Int
  } deriving (Show, Generic)

instance FromJSON CreateIncome