63 lines
1.5 KiB
Text
63 lines
1.5 KiB
Text
-- By default this file is used by `persistFileWith` in Model.hs (which is imported by Foundation.hs)
|
|
-- Syntax for this file here: https://github.com/yesodweb/persistent/blob/master/docs/Persistent-entity-syntax.md
|
|
|
|
-- User
|
|
-- ident Text
|
|
-- password Text Maybe
|
|
-- UniqueUser ident
|
|
-- deriving Typeable
|
|
-- Email
|
|
-- email Text
|
|
-- userId UserId Maybe
|
|
-- verkey Text Maybe
|
|
-- UniqueEmail email
|
|
-- Comment json -- Adding "json" causes ToJSON and FromJSON instances to be derived.
|
|
-- message Text
|
|
-- userId UserId Maybe
|
|
-- deriving Eq
|
|
-- deriving Show
|
|
|
|
User
|
|
ident Text
|
|
password Text Maybe
|
|
verkey Text Maybe
|
|
verified Bool
|
|
nickname Text
|
|
realName Text Maybe
|
|
UniqueNickname nickname
|
|
UniqueUser ident
|
|
deriving Show
|
|
Email
|
|
email Text
|
|
user UserId Maybe
|
|
verkey Text Maybe
|
|
UniqueEmail email
|
|
Entry
|
|
creator UserId
|
|
title Text
|
|
url Text Maybe
|
|
text Textarea Maybe
|
|
yeah Int default=0
|
|
neah Int default=0
|
|
nbView Int default=0
|
|
created UTCTime default=now()
|
|
Vote
|
|
creator UserId
|
|
entry EntryId
|
|
value Int
|
|
deriving Show
|
|
Comment json
|
|
entry EntryId
|
|
creator UserId Maybe
|
|
replyTo CommentId Maybe
|
|
created UTCTime default=now()
|
|
content Textarea
|
|
yeah Int default=0
|
|
neah Int default=0
|
|
nbView Int default=0
|
|
deriving Show
|
|
VoteComment
|
|
creator UserId
|
|
comment CommentId
|
|
value Int
|
|
deriving Show
|