groups.hrl 716 B

123456789101112131415161718192021222324
  1. -include("types.hrl").
  2. -record(group,{
  3. username, % this is an id, has nothing to do with users or name
  4. name,
  5. description,
  6. publicity,
  7. creator,
  8. created,
  9. owner,
  10. feed,
  11. users_count = 0 :: integer(), % we have to store this, counting would be very expensive and this number is sufficient for sorting and stuff
  12. entries_count = 0 :: integer()
  13. }).
  14. -record(group_subscriptions, {
  15. user_id,
  16. group_id,
  17. user_type,
  18. user_posts_count = 0 :: integer() % we need this for sorting and counting is expensive
  19. }).
  20. define(GROUP_EXCHANGE(GroupId), list_to_binary("group_exchange."++GroupId++".fanout")).