diff options
Diffstat (limited to 'src/server/Model/Json/User.hs')
-rw-r--r-- | src/server/Model/Json/User.hs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/server/Model/Json/User.hs b/src/server/Model/Json/User.hs new file mode 100644 index 0000000..ebc347b --- /dev/null +++ b/src/server/Model/Json/User.hs @@ -0,0 +1,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 |