eidolon/config/models
2016-12-19 00:28:07 +01:00

65 lines
1.7 KiB
Text
Executable file

-- eidolon -- A simple gallery in Haskell and Yesod
-- Copyright (C) 2015 Amedeo Molnár
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as published
-- by the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU Affero General Public License for more details.
--
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
User
name Text
slug Text
email Text
salt ByteString
salted ByteString
albums [AlbumId]
admin Bool
defaultLicence Int default=-1
UniqueUser name
deriving Typeable Eq Show
Activator
token Text
user User
deriving Eq Show
Token
token ByteString
kind Text
user UserId Maybe
deriving Eq Show
Album
title Text
owner UserId
shares [UserId]
content [MediumId]
samplePic FP.FilePath Maybe
deriving Eq Show
Medium
title Text
path FP.FilePath
thumb FP.FilePath
mime Text
time UTCTime
owner UserId
description Textarea Maybe
tags Texts
album AlbumId
preview FP.FilePath
licence Int default=-1
deriving Eq Show
Comment
author UserId
origin MediumId
parent CommentId Maybe
time UTCTime
content Markdown
deriving Show
-- By default this file is used in Model.hs (which is imported by Foundation.hs)