This commit is contained in:
nek0 2014-09-14 05:05:06 +02:00
parent 7d8d41c6de
commit 0c163228b7
2 changed files with 9 additions and 5 deletions

View file

@ -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.

View 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)