groups.hrl 659 B

12345678910111213141516171819202122
  1. -include("types.hrl").
  2. -include("kvs.hrl").
  3. -record(group,{?ITERATOR(feed, true),
  4. name,
  5. description,
  6. scope :: public | private,
  7. creator,
  8. created,
  9. owner,
  10. users_count = 0 :: integer(), % we have to store this, counting would be very expensive and this number is sufficient for sorting and stuff
  11. entries_count = 0}).
  12. -record(group_subscription, {
  13. key,
  14. who,
  15. where,
  16. type,
  17. posts_count = 0 :: integer() % we need this for sorting and counting is expensive
  18. }).
  19. -define(GROUP_EXCHANGE(GroupId), list_to_binary("group_exchange."++GroupId++".fanout")).