Selda schema for database

This commit is contained in:
2018-08-02 23:59:08 +03:00
parent 2e5e64feae
commit 9dc1a7dca2
6 changed files with 72 additions and 3 deletions

15
src/Database/Schema.hs Normal file
View File

@ -0,0 +1,15 @@
{-# Language NoImplicitPrelude #-}
{-# Language DeriveGeneric #-}
{-# Language OverloadedStrings #-}
module Database.Schema where
import ClassyPrelude
import Database.Selda.Generic
data User = User { email :: Text
, username :: Text
, password :: ByteString }
deriving (Show, Generic)
users :: GenTable User
users = genTable "users" [ email :- primaryGen ]