users.hrl 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. -include("types.hrl").
  2. -include("kvs.hrl").
  3. -record(user, {?ITERATOR(feed, true),
  4. email,
  5. username :: username_type() | '_', %% Dialyzer and record MatchSpec warnings http://j.mp/vZ8670
  6. display_name,
  7. password,
  8. facebook_id,
  9. twitter_id,
  10. googleplus_id,
  11. github_id,
  12. auth,
  13. avatar,
  14. name = undefined,
  15. surname = undefined,
  16. age,
  17. sex,
  18. location,
  19. education,
  20. register_date,
  21. status = not_verified :: user_state() | '_',
  22. verification_code :: string() | '_',
  23. zone,
  24. type,
  25. comments,
  26. discussions,
  27. transactions,
  28. team,
  29. aclver}).
  30. -record(user_status,{
  31. email,
  32. last_login,
  33. show_splash = true :: boolean()
  34. }).
  35. -record(user_info,{
  36. email,
  37. name,
  38. surname,
  39. age,
  40. avatar_url,
  41. sex,
  42. skill = 0 :: integer(),
  43. score = 0 :: integer()}).
  44. -record(user_address, {
  45. email,
  46. address = "",
  47. city = "",
  48. district = "",
  49. postal_code = "",
  50. phone = "",
  51. personal_id = "" }).
  52. -record(user_type,{
  53. id,
  54. aclver}).
  55. -record(subscription,{
  56. key,
  57. who,
  58. whom}).
  59. -record(forget_password, {
  60. token :: string(),
  61. uid :: string(),
  62. create :: {integer(), integer(), integer()}}).
  63. -record(prohibited,{
  64. ip :: {string(), atom()},
  65. activity :: any(),
  66. time :: {integer(),integer(),integer()},
  67. uid = undefined :: 'undefined' | string()}).
  68. -record(avatar,{
  69. big :: string(),
  70. small :: string(),
  71. tiny :: string()}).
  72. -record(user_game_status,{
  73. user,
  74. status %% strings: online|offline|busy|free_for_game|invisible
  75. }).
  76. -record(user_ignores, {who, whom}).
  77. -record(user_ignores_rev, {whom, who}).
  78. -record(twitter_oauth, {user_id, token, secret}).
  79. -record(facebook_oauth, {user_id, access_token}).
  80. -record(googleplus_oauth, {user_id, access_token}).
  81. -record(github_oauth, {user_id, access_token}).
  82. -define(ACTIVE_USERS_TOP_N, 12).
  83. -record(active_users_top, {
  84. no,
  85. user_id,
  86. entries_count,
  87. last_one_timestamp
  88. }).
  89. -define(USER_EXCHANGE(UserId), list_to_binary("user_exchange."++UserId++".fanout")).
  90. -record(uploads, {key, counter}).