users.hrl 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. -include("types.hrl").
  2. -record(user, {
  3. username :: username_type() | '_', %% Dialyzer and record MatchSpec warnings http://j.mp/vZ8670
  4. password,
  5. facebook_id,
  6. twitter_id,
  7. email,
  8. avatar,
  9. name = undefined,
  10. surname = undefined,
  11. age,
  12. sex,
  13. location,
  14. education,
  15. register_date,
  16. status = 'not_verified' :: user_state() | '_',
  17. verification_code :: string() | '_',
  18. type,
  19. feed,
  20. direct,
  21. starred,
  22. pinned,
  23. comments,
  24. discussions,
  25. team,
  26. aclver}).
  27. -record(user_status,{
  28. username :: username_type(),
  29. last_login,
  30. show_splash = true :: boolean()
  31. }).
  32. -record(user_info,{
  33. username :: username_type(),
  34. name,
  35. surname,
  36. age,
  37. avatar_url,
  38. sex,
  39. skill = 0 :: integer(),
  40. score = 0 :: integer()}).
  41. -record(user_address, {
  42. username :: username_type(),
  43. address = "",
  44. city = "",
  45. district = "",
  46. postal_code = "",
  47. phone = "",
  48. personal_id = ""
  49. }).
  50. -record(user_type,{
  51. id,
  52. aclver}).
  53. -record(subsctiptioins,{
  54. {who,
  55. whom}).
  56. -record(forget_password, {
  57. token :: string(),
  58. uid :: string(),
  59. create :: {integer(), integer(), integer()}}).
  60. -record(prohibited,{
  61. ip :: {string(), atom()},
  62. activity :: any(),
  63. time :: {integer(),integer(),integer()},
  64. uid = undefined :: 'undefined' | string()}).
  65. -record(avatar,{
  66. big :: string(),
  67. small :: string(),
  68. tiny :: string()}).
  69. -record(user_game_status,{
  70. user,
  71. status %% strings: online|offline|busy|free_for_game|invisible
  72. }).
  73. -record(user_ignores, {who, whom}).
  74. -record(user_ignores_rev, {whom, who}).
  75. -record(user_bought_gifts, {
  76. username,
  77. timestamp,
  78. gift_id
  79. }).
  80. -record(user_count, {count}).
  81. -record(twitter_oauth, {user_id, token, secret}).
  82. -record(facebook_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")).