{-# LANGUAGE RankNTypes                 #-}
# LANGUAGE FlexibleContexts            #
{-# LANGUAGE GADTs                      #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses       #
{-# LANGUAGE OverloadedStrings          #-}
{-# LANGUAGE QuasiQuotes                #-}
{-# LANGUAGE TemplateHaskell            #-}
# LANGUAGE TypeFamilies                #
module Model
     where

import           Database.Persist()
import           Database.Persist.TH

share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase|
Person
    name String
    age Int Maybe
    deriving Show
BlogPost
    title String
    authorId PersonId
    deriving Show
|]


# LANGUAGE RankNTypes                 #
# LANGUAGE GADTs                      #
# LANGUAGE OverloadedStrings          #
# LANGUAGE QuasiQuotes                #
# LANGUAGE TemplateHaskell            #
# LANGUAGE FlexibleContexts            #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses       #
# LANGUAGE TypeFamilies                #
module Model
     where

import           Database.Persist()
import           Database.Persist.TH

share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase|
Person
    name String
    age Int Maybe
    deriving Show
BlogPost
    title String
    authorId PersonId
    deriving Show
|]

