content: {-# LANGUAGE EmptyDataDecls             #-}
  {-# LANGUAGE FlexibleInstances          #-}
  {-# LANGUAGE GADTs                      #-}
  {-# LANGUAGE GeneralizedNewtypeDeriving #-}
  {-# LANGUAGE MultiParamTypeClasses      #-}
  {-# LANGUAGE NoImplicitPrelude          #-}
  {-# LANGUAGE OverloadedStrings          #-}
  {-# LANGUAGE RecordWildCards            #-}
  {-# LANGUAGE TemplateHaskell            #-}
  {-# LANGUAGE TypeFamilies               #-}
  
  module Model where
  
  import           ClassyPrelude.Yesod
  import           Data.Aeson                      (Value (String))
  import           Database.Persist.Quasi
  import           Database.Persist.Types.Email
  import           Database.Persist.Types.Password
  
  -- You can define all of your database entities in the entities file.
  -- You can find more information on persistent and how to declare entities
  -- at:
  -- http://www.yesodweb.com/book/persistent/
  share
    [ mkPersist sqlSettings
    , mkDeleteCascade sqlSettings
    , mkMigrate "migrateAll"
    ]
    $(persistFileWith lowerCaseSettings "config/models")
  
  instance ToJSON (Entity Tag) where
    toJSON (Entity _ Tag {..}) = String tagName
  