users.hrl 2.4 KB

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