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 Yesod
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import Database.Persist.Quasi
|
import Database.Persist.Quasi
|
||||||
|
import Database.Persist
|
||||||
|
import Database.Persist.TH
|
||||||
import Data.Typeable (Typeable)
|
import Data.Typeable (Typeable)
|
||||||
|
import Data.Eq (Eq)
|
||||||
import Data.Time (UTCTime)
|
import Data.Time (UTCTime)
|
||||||
import Data.ByteString
|
import Data.ByteString
|
||||||
import Data.Bool
|
import Data.Bool
|
||||||
|
import Text.Show (Show)
|
||||||
import System.FilePath (FilePath)
|
import System.FilePath (FilePath)
|
||||||
|
|
||||||
-- You can define all of your database entities in the entities file.
|
-- You can define all of your database entities in the entities file.
|
||||||
|
|
|
@ -6,22 +6,22 @@ User
|
||||||
salted ByteString
|
salted ByteString
|
||||||
albums [AlbumId]
|
albums [AlbumId]
|
||||||
admin Bool
|
admin Bool
|
||||||
deriving Typeable
|
deriving Typeable Eq Show
|
||||||
Activator
|
Activator
|
||||||
token Text
|
token Text
|
||||||
user User
|
user User
|
||||||
deriving
|
deriving Eq Show
|
||||||
Token
|
Token
|
||||||
token ByteString
|
token ByteString
|
||||||
kind Text
|
kind Text
|
||||||
user UserId Maybe
|
user UserId Maybe
|
||||||
deriving
|
deriving Eq Show
|
||||||
Album
|
Album
|
||||||
title Text
|
title Text
|
||||||
owner UserId
|
owner UserId
|
||||||
content [MediumId]
|
content [MediumId]
|
||||||
samplePic FilePath Maybe
|
samplePic FilePath Maybe
|
||||||
deriving
|
deriving Eq Show
|
||||||
Medium
|
Medium
|
||||||
title Text
|
title Text
|
||||||
path FilePath
|
path FilePath
|
||||||
|
@ -30,6 +30,6 @@ Medium
|
||||||
description Textarea
|
description Textarea
|
||||||
tags Texts
|
tags Texts
|
||||||
album AlbumId
|
album AlbumId
|
||||||
deriving
|
deriving Eq Show
|
||||||
|
|
||||||
-- By default this file is used in Model.hs (which is imported by Foundation.hs)
|
-- By default this file is used in Model.hs (which is imported by Foundation.hs)
|
||||||
|
|
Loading…
Reference in a new issue