Skip to content

Instantly share code, notes, and snippets.

@mrmurphy
Created December 18, 2014 18:10
Show Gist options
  • Save mrmurphy/935633f8ced0fa3b680a to your computer and use it in GitHub Desktop.
Save mrmurphy/935633f8ced0fa3b680a to your computer and use it in GitHub Desktop.
data User = User {
id :: String,
email :: String,
hash :: String,
institutionId :: String
} deriving (Show, Generic)
instance ToJSON User
instance FromJSON User
instance ToDatum User
instance FromDatum User
instance Expr User
data UserPrintable = UserPrintable {
email :: String,
id :: String,
institutionId :: String
} deriving (Generic)
instance ToJSON UserPrintable
instance FromJSON UserPrintable
instance ToDatum UserPrintable
instance FromDatum UserPrintable
data UserCreatable = UserCreatable {
email :: String,
hash :: String,
institutionId :: String
} deriving (Generic)
instance ToJSON UserCreatable
instance FromJSON UserCreatable
instance ToDatum UserCreatable
instance FromDatum UserCreatable
instance Expr UserCreatable
data UserFromRequest = UserFromRequest {
email :: String,
institutionId :: String,
password :: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment