groups.hrl 729 B

12345678910111213141516171819202122232425
  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_subscription, {
  15. key,
  16. user_id,
  17. group_id,
  18. user_type,
  19. user_posts_count = 0 :: integer() % we need this for sorting and counting is expensive
  20. }).
  21. -define(GROUP_EXCHANGE(GroupId), list_to_binary("group_exchange."++GroupId++".fanout")).