blob: 6ab3a5ba9eff328ffbd9abf751c45aaa9c8bc548 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{-# LANGUAGE DeriveGeneric #-}
module Model.Json.CreatePayment
( CreatePayment(..)
) where
import Data.Aeson
import Data.Text (Text)
import Data.Time.Calendar (Day)
import GHC.Generics
import Model.Category (CategoryId)
import Model.Frequency (Frequency)
data CreatePayment = CreatePayment
{ name :: Text
, cost :: Int
, date :: Day
, category :: CategoryId
, frequency :: Frequency
} deriving (Show, Generic)
instance FromJSON CreatePayment
|