time-wasting-thread-memorial/web/src/Within/DBMemorial/Post.hs

20 lines
529 B
Haskell

{-# LANGUAGE OverloadedStrings #-}
module Within.DBMemorial.Post where
import Control.Applicative
import Data.Monoid()
import Data.Text
import Database.SQLite.Simple.FromRow
data Post = Post
{ postID :: Int
, postOID :: Text
, postBody :: Text
, postMarkdown :: Text
, postAuthor :: Text
, postPage :: Int
} deriving (Show, Eq)
instance FromRow Post where
fromRow = Post <$> field <*> field <*> field <*> field <*> field <*> field