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

20 lines
565 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
{ id :: Int
, oID :: Text
, body :: Text
, markdown :: Text
, author :: Text
, page :: Int
} deriving (Show, Eq)
instance FromRow Post where
fromRow = Post <$> field <*> field <*> field <*> field <*> field <*> field