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

Internal.hs 975 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
    -- 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 23
    -- New WikiEdit made.
    | EWikiEdit WikiEditId WikiEdit
    -- New WikiPage posted.
    | EWikiPage WikiPageId WikiPage
    -- New pledge.
24
    | ENewPledge SharesPledgedId SharesPledged
25
    -- Pledge that has changed in value.
26 27
    | EUpdatedPledge Int64                         -- old shares
                     SharesPledgedId SharesPledged -- new pledge info
28 29
    -- Deleted pledge.
    | EDeletedPledge UTCTime UserId ProjectId Int64