deriving
This commit is contained in:
parent
7d8d41c6de
commit
0c163228b7
2 changed files with 9 additions and 5 deletions
4
Model.hs
4
Model.hs
|
@ -3,10 +3,14 @@ module Model where
|
|||
import Yesod
|
||||
import Data.Text (Text)
|
||||
import Database.Persist.Quasi
|
||||
import Database.Persist
|
||||
import Database.Persist.TH
|
||||
import Data.Typeable (Typeable)
|
||||
import Data.Eq (Eq)
|
||||
import Data.Time (UTCTime)
|
||||
import Data.ByteString
|
||||
import Data.Bool
|
||||
import Text.Show (Show)
|
||||
import System.FilePath (FilePath)
|
||||
|
||||
-- You can define all of your database entities in the entities file.
|
||||
|
|
|
@ -6,22 +6,22 @@ User
|
|||
salted ByteString
|
||||
albums [AlbumId]
|
||||
admin Bool
|
||||
deriving Typeable
|
||||
deriving Typeable Eq Show
|
||||
Activator
|
||||
token Text
|
||||
user User
|
||||
deriving
|
||||
deriving Eq Show
|
||||
Token
|
||||
token ByteString
|
||||
kind Text
|
||||
user UserId Maybe
|
||||
deriving
|
||||
deriving Eq Show
|
||||
Album
|
||||
title Text
|
||||
owner UserId
|
||||
content [MediumId]
|
||||
samplePic FilePath Maybe
|
||||
deriving
|
||||
deriving Eq Show
|
||||
Medium
|
||||
title Text
|
||||
path FilePath
|
||||
|
@ -30,6 +30,6 @@ Medium
|
|||
description Textarea
|
||||
tags Texts
|
||||
album AlbumId
|
||||
deriving
|
||||
deriving Eq Show
|
||||
|
||||
-- By default this file is used in Model.hs (which is imported by Foundation.hs)
|
||||
|
|
Loading…
Reference in a new issue