-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModel.hs
More file actions
24 lines (20 loc) · 800 Bytes
/
Model.hs
File metadata and controls
24 lines (20 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving, TemplateHaskell #-}
module Model where
import Yesod
import Yesod.Auth.HashDB
import Data.Text (Text,unpack)
import Database.Persist
import Database.Persist.Sqlite
import Database.Persist.TH
import Data.Time
data EventType = Class | Workshop
deriving (Show, Read, Eq)
derivePersistField "EventType"
data UserType = CoFounder | Member | Collaborator | Student | Presenter
deriving (Show, Read, Eq)
derivePersistField "UserType"
-- You can define all of your database entities in the entities file.
-- You can find more information on persistent and how to declare entities
-- at:
-- http://www.yesodweb.com/book/persistent/
share [mkPersist, mkMigrate "migrateAll"] $(persistFile "config/models")