groups.hrl 682 B

123456789101112131415161718192021222324
  1. -include("types.hrl").
  2. -include("kvs.hrl").
  3. -record(group,{?ITERATOR(feed),
  4. % id,
  5. name,
  6. description,
  7. scope :: public | private,
  8. creator,
  9. created,
  10. owner,
  11. % feeds,
  12. users_count = 0 :: integer(), % we have to store this, counting would be very expensive and this number is sufficient for sorting and stuff
  13. entries_count = 0}).
  14. -record(group_subscription, {
  15. key,
  16. who,
  17. where,
  18. type,
  19. 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")).