user.hrl 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. tokens,
  13. names,
  14. surnames,
  15. birth,
  16. auth,
  17. avatar,
  18. name = undefined,
  19. surname = undefined,
  20. age,
  21. sex,
  22. location,
  23. education,
  24. register_date,
  25. status = not_verified :: user_state() | '_',
  26. verification_code :: string() | '_',
  27. zone,
  28. type,
  29. comments,
  30. discussions,
  31. transactions,
  32. team,
  33. aclver}).
  34. -record(user_status,{
  35. email,
  36. last_login,
  37. show_splash = true :: boolean()
  38. }).
  39. -record(user_info,{
  40. email,
  41. name,
  42. surname,
  43. age,
  44. avatar_url,
  45. sex,
  46. skill = 0 :: integer(),
  47. score = 0 :: integer()}).
  48. -record(user_address, {
  49. email,
  50. address = "",
  51. city = "",
  52. district = "",
  53. postal_code = "",
  54. phone = "",
  55. personal_id = "" }).
  56. -record(user_type,{
  57. id,
  58. aclver}).
  59. -record(subscription,{
  60. key,
  61. who,
  62. whom}).
  63. -record(forget_password, {
  64. token :: string(),
  65. uid :: string(),
  66. create :: {integer(), integer(), integer()}}).
  67. -record(prohibited,{
  68. ip :: {string(), atom()},
  69. activity :: any(),
  70. time :: {integer(),integer(),integer()},
  71. uid = undefined :: 'undefined' | string()}).
  72. -record(avatar,{
  73. big :: string(),
  74. small :: string(),
  75. tiny :: string()}).
  76. -record(user_game_status,{
  77. user,
  78. status %% strings: online|offline|busy|free_for_game|invisible
  79. }).
  80. -record(user_ignores, {who, whom}).
  81. -record(user_ignores_rev, {whom, who}).
  82. -record(twitter_oauth, {user_id, token, secret}).
  83. -record(facebook_oauth, {user_id, access_token}).
  84. -record(googleplus_oauth, {user_id, access_token}).
  85. -record(github_oauth, {user_id, access_token}).
  86. -define(ACTIVE_USERS_TOP_N, 12).
  87. -record(active_users_top, {
  88. no,
  89. user_id,
  90. entries_count,
  91. last_one_timestamp
  92. }).
  93. -define(USER_EXCHANGE(UserId), list_to_binary("user_exchange."++UserId++".fanout")).
  94. -record(uploads, {key, counter}).