users.hrl 2.3 KB

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