Add User model
This commit is contained in:
parent
32acbcedda
commit
1a31e0146a
|
@ -0,0 +1,17 @@
|
|||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module Within.DBMemorial.User where
|
||||
|
||||
import Control.Applicative
|
||||
import Data.Monoid()
|
||||
import Data.Text
|
||||
import Database.SQLite.Simple.FromRow
|
||||
|
||||
data User = User
|
||||
{ id :: Int
|
||||
, oID :: Text
|
||||
, name :: Text
|
||||
, avatar :: Text
|
||||
} deriving (Show, Eq)
|
||||
|
||||
instance FromRow User where
|
||||
fromRow = User <$> field <*> field <*> field <*> field
|
Loading…
Reference in New Issue