tournaments.hrl 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. -ifndef(TOURNAMENTS_HRL).
  2. -define(TOURNAMENTS_HRL, "tournaments.hrl").
  3. -include_lib("kvs/include/kvs.hrl").
  4. -record(team,{?ITERATOR(feed),
  5. name, %% team name for now will bu just first player username
  6. play_record, %% linked list history of played users under that ticket
  7. type}).
  8. -record(tournament,{?ITERATOR(feed),
  9. name, %% tournament name
  10. game_type,
  11. description,
  12. creator,
  13. created,
  14. start_date,
  15. start_time,
  16. end_date,
  17. status, %% activated, ongoing, finished, canceled
  18. quota,
  19. tours,
  20. awards,
  21. winners :: list(), %% [{UserId, Position, GiftId}]
  22. waiting_queue, %% play_record, added here when user wants to join tournament
  23. avatar,
  24. owner,
  25. players_count,
  26. speed,
  27. type,
  28. game_mode}). %% eliminatin, pointing, etc
  29. -record(play_record,{?ITERATOR(feed),
  30. who, %% user
  31. tournament, %% tournament in which user played
  32. team, %% team under which user player tournament
  33. game_id, %% game id that user played under that team
  34. realname,
  35. game_points,
  36. kakush,
  37. kakush_currency,
  38. quota,
  39. other}).
  40. -endif.