eidolon/config/models
2017-08-06 04:42:31 +02:00

67 lines
1.8 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 Licence default=-1
active Bool default=True
UniqueUser name
deriving Typeable Eq Show
-- Activator
-- token Text
-- user User
-- deriving Eq Show
Token
token ByteString
kind Text
username Text
UniqueToken token
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 Markdown Maybe
tags Texts
album AlbumId
preview FP.FilePath
licence Licence 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)