20 lines
473 B
Haskell
20 lines
473 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
|