invites.hrl 754 B

12345678910111213141516171819202122232425
  1. -include("types.hrl").
  2. -record(invite_code, {
  3. code,
  4. create_date,
  5. issuer :: username_type() | '_', %% Dialyzer and record MatchSpec warnings http://j.mp/vZ8670
  6. recipient,
  7. next,
  8. prev,
  9. created_user :: username_type() | '_'}).
  10. -record(invite_by_issuer, {
  11. user,
  12. top}).
  13. -record(invitation_tree, {
  14. user, % user id
  15. parent, % parent user id
  16. next_sibling = none, % user id of next child of the same parent
  17. first_child = none, % link to the children list
  18. invite_code, % invite code, for this user
  19. children = empty % can be filled in traversal
  20. }).
  21. -define(INVITATION_TREE_ROOT, {root}).