inter-hub-haskell/Web/Types.hs

52 lines
1.4 KiB
Haskell
Raw Normal View History

module Web.Types where
import IHP.Prelude
import IHP.ModelSupport
import IHP.LoginSupport.Types
import Generated.Types
-- | Authentication type alias
type CurrentUserRecord = User
instance HasNewSessionUrl User where
newSessionUrl _ = "/NewSession"
-- Controllers
data WebApplication = WebApplication deriving (Eq, Show)
data HubsController
= HubsAction
| NewHubAction
| ShowHubAction { hubId :: !(Id Hub) }
| CreateHubAction
| EditHubAction { hubId :: !(Id Hub) }
| UpdateHubAction { hubId :: !(Id Hub) }
| DeleteHubAction { hubId :: !(Id Hub) }
deriving (Eq, Show, Data)
data WidgetsController
= WidgetsAction
| NewWidgetAction
| ShowWidgetAction { widgetId :: !(Id Widget) }
| CreateWidgetAction
| EditWidgetAction { widgetId :: !(Id Widget) }
| UpdateWidgetAction { widgetId :: !(Id Widget) }
deriving (Eq, Show, Data)
data InteractionEventsController
= CreateInteractionEventAction { widgetId :: !(Id Widget) }
deriving (Eq, Show, Data)
data AnnotationsController
= WidgetAnnotationsAction { widgetId :: !(Id Widget) }
| NewAnnotationAction { widgetId :: !(Id Widget) }
| CreateAnnotationAction { widgetId :: !(Id Widget) }
deriving (Eq, Show, Data)
data SessionsController
= NewSessionAction
| CreateSessionAction
| DeleteSessionAction
deriving (Eq, Show, Data)