Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. data User = User {
  2. id :: String,
  3. email :: String,
  4. hash :: String,
  5. institutionId :: String
  6. } deriving (Show, Generic)
  7.  
  8. instance ToJSON User
  9. instance FromJSON User
  10. instance ToDatum User
  11. instance FromDatum User
  12. instance Expr User
  13.  
  14.  
  15. data UserPrintable = UserPrintable {
  16. email :: String,
  17. id :: String,
  18. institutionId :: String
  19. } deriving (Generic)
  20.  
  21. instance ToJSON UserPrintable
  22. instance FromJSON UserPrintable
  23. instance ToDatum UserPrintable
  24. instance FromDatum UserPrintable
  25.  
  26. data UserCreatable = UserCreatable {
  27. email :: String,
  28. hash :: String,
  29. institutionId :: String
  30. } deriving (Generic)
  31.  
  32. instance ToJSON UserCreatable
  33. instance FromJSON UserCreatable
  34. instance ToDatum UserCreatable
  35. instance FromDatum UserCreatable
  36. instance Expr UserCreatable
  37.  
  38. data UserFromRequest = UserFromRequest {
  39. email :: String,
  40. institutionId :: String,
  41. password :: String
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement