models compatible with pgsql

This commit is contained in:
Yann Esposito 2012-12-21 16:06:35 +01:00
parent 14fcfbdd2d
commit a6c861fec3

View file

@ -21,28 +21,24 @@ Entry
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
created UTCTime default=now()
Vote
creator UserId
entry EntryId
value Int
deriving Show
VoteComment
creator UserId
comment CommentId
value Int
deriving Show
Comment
entry EntryId
creator UserId Maybe
replyTo CommentId Maybe
created UTCTime default=CURRENT_TIME
created UTCTime default=now()
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)
VoteComment
creator UserId
comment CommentId
value Int
deriving Show