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

Internal.hs 1.02 KB
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
    -- Comment approved.
13
    = ECommentPosted CommentId Comment
14 15
    -- Comment unapproved (pending approval).
    | ECommentPending CommentId Comment
16 17
    -- Comment rethreaded.
    | ECommentRethreaded RethreadId Rethread -- rethreaded-from-URL
18
    | ENotificationSent NotificationId Notification
19 20 21 22
    -- New WikiEdit made.
    | EWikiEdit WikiEditId WikiEdit
    -- New WikiPage posted.
    | EWikiPage WikiPageId WikiPage
David L. L. Thomas's avatar
David L. L. Thomas committed
23 24
    -- New blog post posted.
    | EBlogPost BlogPostId BlogPost
25
    -- New pledge.
26
    | ENewPledge SharesPledgedId SharesPledged
27
    -- Pledge that has changed in value.
28 29
    | EUpdatedPledge Int64                         -- old shares
                     SharesPledgedId SharesPledged -- new pledge info
30 31
    -- Deleted pledge.
    | EDeletedPledge UTCTime UserId ProjectId Int64