aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model/Json/User.hs
blob: ebc347bea30d70ba18233c4d5dfee4b26fe25e02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{-# 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