We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Internal.hs 820 Bytes
Newer Older
Mitchell Rosen's avatar
Mitchell Rosen committed
1 2 3
module Model.SnowdriftEvent.Internal
    ( SnowdriftEvent(..)
    ) where
Mitchell Rosen's avatar
Mitchell Rosen committed
4 5 6

import Model

7 8 9
import Data.Int (Int64)
import Data.Time (UTCTime)

Mitchell Rosen's avatar
Mitchell Rosen committed
10 11
-- A sum type of all events, each of which have their own database table.
data SnowdriftEvent
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
    -- Comment approved.
    = ECommentPosted  CommentId Comment
    -- Comment unapproved (pending approval).
    | ECommentPending CommentId Comment
    | EMessageSent MessageId Message
    -- New WikiEdit made.
    | EWikiEdit WikiEditId WikiEdit
    -- New WikiPage posted.
    | EWikiPage WikiPageId WikiPage
    -- New pledge.
    | ENewPledge PledgeId Pledge
    -- Pledge that has changed in value.
    | EUpdatedPledge Int64 {- old shares -}
                     PledgeId Pledge {- new pledge info -}
    -- Deleted pledge.
    | EDeletedPledge UTCTime UserId ProjectId Int64