{-# LANGUAGE DeriveGeneric #-}

module Model.Json.User
  ( User(..)
  ) where

import GHC.Generics

import Data.Aeson
import Data.Text (Text)

import Model.Database (UserId)

data User = User
  { id :: UserId
  , name :: Text
  , email :: Text
  } deriving (Show, Generic)

instance FromJSON User
instance ToJSON User