--  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
    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
    sampleWidth Int
    deriving Eq Show
Medium
    title Text
    path FP.FilePath
    thumb FP.FilePath
    mime Text
    time UTCTime
    owner UserId
    description Textarea Maybe
    tags Texts
    width Int
    thumbWidth Int
    album AlbumId
    preview FP.FilePath
    previewWidth Int
    deriving Eq Show
Comment
    author UserId
    authorSlug Text
    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)
