{-# OPTIONS_GHC -fcontext-stack42 #-}
-- NOTE: use GHC flag -fcontext-stack42 with this module if GHC < 6.8.1
---------------------------------------------------------------------------
-- Generated by DB/Direct
---------------------------------------------------------------------------
module ShareGuardDB.Directory_user where

import Database.HaskellDB.DBLayout

---------------------------------------------------------------------------
-- Table type
---------------------------------------------------------------------------

type Directory_user =
    (RecCons User_id (Expr Integer)
     (RecCons Directory_id (Expr Integer) RecNil))

---------------------------------------------------------------------------
-- Table
---------------------------------------------------------------------------
directory_user :: Table Directory_user

directory_user = baseTable "directory_user" $
                 hdbMakeEntry User_id #
                 hdbMakeEntry Directory_id

---------------------------------------------------------------------------
-- Fields
---------------------------------------------------------------------------
---------------------------------------------------------------------------
-- User_id Field
---------------------------------------------------------------------------

data User_id = User_id

instance FieldTag User_id where fieldName _ = "user_id"

user_id :: Attr User_id Integer
user_id = mkAttr User_id

---------------------------------------------------------------------------
-- Directory_id Field
---------------------------------------------------------------------------

data Directory_id = Directory_id

instance FieldTag Directory_id where fieldName _ = "directory_id"

directory_id :: Attr Directory_id Integer
directory_id = mkAttr Directory_id