From 24633871359ec9fbd63fdfebf79a6351b2792f77 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 6 Sep 2015 00:05:50 +0200 Subject: Can add monthly payments, not visible at the moment though, just the count is printed --- src/server/Model/Frequency.hs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/server/Model/Frequency.hs (limited to 'src/server/Model/Frequency.hs') diff --git a/src/server/Model/Frequency.hs b/src/server/Model/Frequency.hs new file mode 100644 index 0000000..2b747b7 --- /dev/null +++ b/src/server/Model/Frequency.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TemplateHaskell #-} + +module Model.Frequency + ( Frequency(..) + ) where + +import Web.Scotty + +import Database.Persist.TH + +data Frequency = + Punctual + | Monthly + deriving (Eq, Show, Read) + +derivePersistField "Frequency" + +instance Parsable Frequency where parseParam = readEither -- cgit v1.2.3