44 lines
953 B
Text
44 lines
953 B
Text
User
|
|
ident Text
|
|
password Text Maybe
|
|
verkey Text Maybe
|
|
verified Bool
|
|
UniqueUser ident
|
|
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=CURRENT_TIME
|
|
|
|
-- nbView must be equal to nbVotes for entry
|
|
Vote
|
|
creator UserId
|
|
entry EntryId
|
|
value Int
|
|
deriving Show
|
|
VoteComment
|
|
creator UserId
|
|
comment CommentId
|
|
value Int
|
|
deriving Show
|
|
Comment
|
|
entry EntryId
|
|
creator UserId
|
|
replyTo CommentId Maybe
|
|
created UTCTime default=CURRENT_TIME
|
|
content Textarea
|
|
yeah Int default=0
|
|
neah Int default=0
|
|
nbView Int default=0
|
|
deriving Show
|
|
|
|
-- By default this file is used in Model.hs (which is imported by Foundation.hs)
|