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